Shop OBEX P1 Docs P2 Docs Learn Events
GPS Module Interesting Date Returned — Parallax Forums

GPS Module Interesting Date Returned

tomcrawfordtomcrawford Posts: 1,126
edited 2013-04-04 13:21 in Accessories
I have a 595K GPS Module (28501) that I am using for time and date only (this is a static project). Here is what it returns around midnite GMT:
I am using the RMC string.


Hour Minute Second Date Month Year
23 59 58 03 04 13
23 59 59 03 04 13
00 00 00 03 04 13 !!!!!!
00 00 01 04 04 13

In other words, it returns what seems to me to be the wrong date for the first second of the day.

Now, here is my question:

Do I not understand when the day begins; that is, is the returned date correct? Or is there a bug in this module?

Comments

  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2013-04-04 11:08
    I know this too well as we are teaching our daughter the whole AM/PM thing and part of it includes the 12:00 A.M. = Midnight discussion. At 00:00:00, the date should be rolled to the new day as it signifies the start of that day. The module's firmware does have a bug in that regard. However, I wonder how it determines the date. Since a GPS module will lock on to several satellites and your time signal on each could be spanned across the 11:59:59 and 00:00:00 timeframe, your dates from satellites would span across 4/3 and 4/4 as well. Maybe it is averaging the time, but taking the date from just one satellite?
  • SRLMSRLM Posts: 5,045
    edited 2013-04-04 13:21
    Interesting. The closest thing that I can find is ISO 8601 time, which says:
    Midnight is a special case and can be referred to as both "00:00" and "24:00". The notation "00:00" is used at the beginning of a calendar day and is the more frequently used. At the end of a day use "24:00". Note that "2007-04-05T24:00" is the same instant as "2007-04-06T00:00" (see Combined date and time representations below).

    So, it almost looks like your GPS is using the ISO 8601 standard, but their programmers did a modulo 24 on the hour.
    I know this too well as we are teaching our daughter the whole AM/PM thing and part of it includes the 12:00 A.M. = Midnight discussion. At 00:00:00, the date should be rolled to the new day as it signifies the start of that day. The module's firmware does have a bug in that regard. However, I wonder how it determines the date. Since a GPS module will lock on to several satellites and your time signal on each could be spanned across the 11:59:59 and 00:00:00 timeframe, your dates from satellites would span across 4/3 and 4/4 as well. Maybe it is averaging the time, but taking the date from just one satellite?

    According to this page, GPS time and date is calculated by an offset in weeks and seconds from 1980-01-06T12:00am. There is a handy calculator here. But, I couldn't find anything of relevance to the conversation in regards to the GPS time calculations.
Sign In or Register to comment.