ronzul
Posts: 29
Joined: Mon Dec 27, 2004 1:46 am
Location: Australia

Incorrect date in OnGpsFix event at midnight

Thu Sep 24, 2009 11:28 am

Hi

The date provided in the GpsToolsNET.GpsFix object's UTC property seems to be incorrect at midnight.

Version: 2.20 (version I have been using for ages, and still happens on 2.31 that i just trialled)

I use NmeaParser.Parse on the following input sequence:

Input 1:
$GPRMC,235959.16,A,3353.4007,S,15112.6786,E,0.000,0.000,220909,0,W,A*2E
UTC: 22/09/2009 23:59:59 [Correct]

Input 2:
$GPGGA,000000.16,3353.4007,S,15112.6786,E,1,12,0.745,79.324,M,19.787,M,0,0*44
UTC: 22/09/2009 00:00:00 [Incorrect]
Time has gone backwards by one day. Great party trick, not so useful when analysing NMEA files

Input 3:
$GPRMC,000000.16,A,3353.4007,S,15112.6786,E,0.000,0.000,230909,0,W,A*2E
UTC: 23/09/2009 00:00:00 [Correct]

I guess I will have to put a workaround to catch this until a fix is available.

Ronny

User avatar
johan
GpsGate
Posts: 14958
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Incorrect date in OnGpsFix event at midnight

Thu Sep 24, 2009 12:31 pm

Yes, you have to make your app aware of this limitation.

Regards,
Johan

Franson Support

ronzul
Posts: 29
Joined: Mon Dec 27, 2004 1:46 am
Location: Australia

RE: Incorrect date in OnGpsFix event at midnight

Thu Sep 24, 2009 6:12 pm

Hi Johan

Is there any way to know what NMEA sentence has been parsed to generate the OnGpsFix event?

ie is there any way to know if OnGpsFix has been called because a $GPRMC sentence was parsed and both date and time are valid. Or if a $GPGGA was parsed and only the time component is valid?

I see that there are GGA and RMC events. However the specification says that those events are for legacy reasons and the use of OnGpsFix is recommended. To overcome this date problem, is it best to use the GGA/RMC events instead of GpsFix?

Thanks

User avatar
johan
GpsGate
Posts: 14958
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Incorrect date in OnGpsFix event at midnight

Thu Sep 24, 2009 6:18 pm

I would use the system clock (UTC) and make a smart decision from that.

Regards,
Johan

Franson Support

Return to “GpsTools”