-
Notifications
You must be signed in to change notification settings - Fork 7
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
Dealing with "Satellite Time" #3
Comments
TL;DR: In essence, the whole GPS system works because all the satellites are synced to the same clock, and GPS time doesn't (and shouldn't) care about time zones: http://leapsecond.com/java/gpsclock.htm. I guess we/the user could take the coordinates and back-calculate the local time based on the timezone (and date), but that code would likely be some combination of large, messy, and/or reliant on a network connection. Also: we're using this module for all our NMEA parsing. It's being parsed correctly. We get time information as soon we we get a strong signal from a single satellite, so we don't necessarily know where we are when we know what (GPS) time it is. |
Ever logged into a message board? They usually ask you to set a timezone. We can explicitly pass your current TZ information along with the build and just use that unless your datetime is changed. With that said, any dates we generate from GPS will be timezone-unaware anyway. They're just UTC dates, it's up to the user to calibrate them. I have no qualms with loading info from |
How do I get the date/time format from the module? At the moment I am only getting timestamp in the form hhmmss.xxx. I would like to get the date out of it as well but so far have been unable to work out how to get it!. |
So most of the GPS processing is actually done in firmware. It's been a while since I did the parsing, but IIRC I only parsed 2 GPS message types: GPRMC and GPGGA. These gps functions are called from lua here and here. Then the GPS js code is able to call the functions by binding to the It looks like you want the GPZDA parsed as well. In order to do that you'll have to modify the gps-nema shim and add in some additional parsing here. Then probably add in an additional "get date" function that can be exposed from within JS. |
Looks like the get date function is already there, but simply calls the get timestamp. I wanted to avoid firmware development, but I think I'll jump in and have a look at this. Thanks for your thorough reply. |
It's getting parsed from the GPGGA data which doesn't have the full date, only the timestamp. |
@jiahuang https://github.com/tessel/t1-firmware/blob/master/src/module_shims/gps-nmea.c#L163 could parse $GPZDA to get the date. But the code seems to parse $GPRMC field 9 which should be a "UT date". (except for the bug in |
partial fix for tessel#3
We currently send back a date and time like the following:
That timestamp says that it's 9:01pm when it's actually 2:01 pm.
Is that time parsed wrong? If not, can we get the timezone information? It would be ideal if the time was a
Date
objectThe text was updated successfully, but these errors were encountered: