Sylphase SDGPS
The software-defined GPS(/GNSS) toolkit
shift-gnss-time

Type signature: (solution->solution)

Help

Usage:

shift-gnss-time [OPTION]...

Description:

The shift-gnss-time node applies a constant OFFSET to the GNSS time value of all solution packets that pass through it.

Exactly one of the following "mode" options must be provided to specify the method used to obtain the OFFSET value:
* --offset
* --start-at
* --start-now
* --start-now-coordinated-via
* --write-start-time-to
* --read-start-time-from

Background info:
* The "START_TIME" of a solution stream is defined as the GNSS time of the first valid packet in the solution stream.

Allowed options:

Option Description
--help produce help message
--offset OFFSET add OFFSET to all packets' GNSS times
--start-at START_TIME offset all packets' GNSS times so that the first packet with GNSS time has it equal to START_TIME
--start-now --start-at, but calculate START_TIME to be the value sampled from the system's CLOCK_REALTIME clock, sampled at the instant the packet passes through this node, converted from UTC to GNSS time, and snapped to the nearest multiple of SNAP_PERIOD
--start-now-coordinated-via FILENAME --start-now, but allow for synchronizing multiple shift-gnss-time nodes; synchronization is coordinated via the provided FILENAME, which must initially either not exist or be empty

Startup process:
1. The first shift-gnss-time node to start up will atomically write its START_TIME to FILENAME
2. Additional shift-gnss-time nodes will read their START_TIME from FILENAME
--write-start-time-to FILENAME don't apply any offset to packets' GNSS times; instead, just wait for the first solution packet with GNSS time and atomically write its START_TIME value to FILENAME
* Note: START_TIME is asserted to be a multiple of SNAP_PERIOD.
--read-start-time-from FILENAME --start-at, but obtain START_TIME from a file

Startup process:
1. Wait for the first solution packet with GNSS time
2. Block packet stream until FILENAME exists
3. Read START_TIME value from FILENAME
4. Apply fixed offset to all packets' GNSS times such that the first packet's GNSS time is equal to START_TIME
--snap-start-time SNAP_PERIOD (=1) snap START_TIME to the nearest multiple of SNAP_PERIOD (units: seconds); useful for e.g. aligning the second boundaries of stream time to the second boundaries of GNSS time in order to generate a PPS signal aligned to GNSS time
* Note: only used for --start-now and --start-now-coordinated-via
* Note: also affects the behavior of --write-start-time-to
--display-offset-relative-to-real-time display offset of output packet's GNSS time relative to CLOCK_REALTIME (converted from UTC to GNSS time) in console status line (also enables output of "Offset (seconds)/shift-gnss-time packet.time-CLOCK_REALTIME" statlog variable)