Y
Yngve Skogseide
I am working on an application using a GPS receiver to obtain the
absolute time. The GPS transmits the current UTC time and date together
with a synchronization (PPS) pulse every second. The problem is that at
the time the PPS pulse is asserted, the current time is still being
transmitted, and is not known.
A seemingly simple solution is to take the previously received UTC time,
and add one second to this to obtain the current time. Adding one second
is not a trivial task (especially not in a HDL), taking into account
the varying number of days per month, and even leap years. The only
algorithm I can conceive which achieves this involves deeply chained
decision logic that would be an absolute mess to implement.
Does anyone know if this has been done before and if a more elegant
solution (or working piece of code) already exists?
BR
Yngve
absolute time. The GPS transmits the current UTC time and date together
with a synchronization (PPS) pulse every second. The problem is that at
the time the PPS pulse is asserted, the current time is still being
transmitted, and is not known.
A seemingly simple solution is to take the previously received UTC time,
and add one second to this to obtain the current time. Adding one second
is not a trivial task (especially not in a HDL), taking into account
the varying number of days per month, and even leap years. The only
algorithm I can conceive which achieves this involves deeply chained
decision logic that would be an absolute mess to implement.
Does anyone know if this has been done before and if a more elegant
solution (or working piece of code) already exists?
BR
Yngve