Clarification of Question by
chiporange-ga
on
03 Jul 2003 05:15 PDT
I need to send an initialization string to a SiRFStar GPS receiver
using the $PSRF104 NMEA command; I *believe* I need, for this
initialization, the current time express as "time of week" and "week
number" (terms meaningful to GPS). I *believe* that this means first,
translating local time into UTC, then, translating UTC into the date
into the number of weeks since Aug 22, 1999, and the number of seconds
elapsed in the current week (and then the correction for leap seconds
added to the result). I *need* these assumptions confirmed as much as
I need the algorithm itself.
I need the question answered as to whether I should add the 1024 value
to the week number to compensate for the week number roll-over that
occurred on August 22, 1999, since the original epock was from Jan 6,
1980.
I'm working in Visual FoxPro, but any sufficiently commented code
fragment that looks anything like VB should do (assuming it doesn't
make use of language features not available in other programming
languages (such as a handy-dandy time/date conversion function for the
UTC conversion).