Code: GPS time issues
Introduction
In general to better understand matter of things we are dealing with here, some history is called for. Epoch of GPS time began at 19th January 1980 and it was synchronized to UTC (Universal Coordinated Time). However GPS time is not adjusted for leap seconds which are added to or subtracted from UTC in regards to earth rotation speed which changes in time. At GPS time epoch difference between UTC and TAI (International Atomic Time) was 19 seconds. Which means that GPS time is behind TAI by 19 seconds and that does not change. UTC however is actively being adjusted and since then, at the time of writing that difference grew by additional 18 seconds, adding up to 37 seconds total. More on that here
This does point us to take a look into hardware interface code, mainly used library to see how it handles GPS time signal, what shift is used
Issue
Not only do we need to allow for adjustment of leap seconds and whatnot to be spot on, but also we have to take into consideration our time zones. How we go about it is yet to be determined. Maybe that handshake thing we've been trying previously but failed could exchange some information between hardware interface and computer to settle the right timezone (taking that information from OS)? Or just bake into the binary, although I'd rather avoid this solution for lack of portability and malleability reduction from something so petty as timezone setup.
Useful Links
- https://www.cnmoc.usff.navy.mil/Our-Commands/United-States-Naval-Observatory/Precise-Time-Department/The-USNO-Master-Clock/USNO-Time-Scales/ - USNO Time Scales
- https://www.cnmoc.usff.navy.mil/Our-Commands/United-States-Naval-Observatory/Precise-Time-Department/The-USNO-Master-Clock/The-USNO-Master-Clock/ - USNO Master Clock
- https://www.cnmoc.usff.navy.mil/Our-Commands/United-States-Naval-Observatory/Precise-Time-Department/Global-Positioning-System/USNO-GPS-Time-Transfer/Leap-Seconds/ - Leap Seconds
- https://aviation.stackexchange.com/a/90844 - Stack exchange post on GPS/UTC/TIA