Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LatLonToDouble(const char *data, const char sign) return 0 instead NA when given "" #27

Open
lsoltero opened this issue Jul 6, 2021 · 1 comment

Comments

@lsoltero
Copy link

lsoltero commented Jul 6, 2021

this family of routines should return NMEA183xxxxNA when given arguments of "". They mostly all return 0.

NMEA0183GPSDateTimetotime_t(NMEA0183Msg.Field(8),0) is particularly bad since it returns bogus time instead of NMEA0183time_tNA (which does not exist).

$GPGGA,,,,,,0,00,99.99,,,,,,*48

for example returns 0 for Time, Lat, Lon, Alt the fields are really NA.

same is true for
$GPGLL,,,,,,V,N64
$GPRMC,,V,,,,,,,,,,N
53

although these have status flags that tag the data as invalid.

RMC returns bogus data time data since it calls
lDT=NMEA0183GPSDateTimetotime_t(NMEA0183Msg.Field(8),0)+floor(GPSTime);

and NMEA0183GPSDateTimetotime_t returns bogus data when passed "" for arguments.

@ttlappalainen
Copy link
Owner

Sorry for delay. I am working with this. I had these fixed on my other code by using NMEA0183GetDouble instead of atof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants