Sylphase SDGPS
The software-defined GPS(/GNSS) toolkit
Synchronizing to system time (initial time alignment)

The GNSS simulation time can be initially set from the simulator computer ("host")'s CLOCK_REALTIME (wall-clock) time with ±1 ms accuracy. However, the difference between GNSS simulation time and CLOCK_REALTIME will slowly drift due to frequency error between the simulator's OCXO and the computer's clock; disciplining the OCXO from the computer's clock during runtime is not currently supported.

Example 1: Aligning initial GNSS simulation time to the host system time

The following example demonstrates:

  • Simulating a static trajectory on a single antenna.
  • Aligning the initial GNSS simulation time to the host system time.
mkdir -p simlog && LOGPREFIX=simlog/$(date +%s) && mkdir "$LOGPREFIX" && \
sdgps \
    generate-simple-trajectory --rate inf --position-ecef '[-3884259, 4607249, 2082592]' \
    ! shift-gnss-time --start-now-coordinated-via "$LOGPREFIX"/start_gps_time \
    ! simulate-raw sylphase-simulator: --cn0 40 --start-stream-time 0 \
    ! sylphase-simulator --antenna-lna-gain 25 --start-tx-coordinated-via "$LOGPREFIX"/start_gps_time

In the above pipeline:

  • The shift-gnss-time node is used with the --start-now-coordinated-via FILENAME option to convert the current host system time to GNSS time and convey that to the sylphase-simulator node with the --start-tx-coordinated-via FILENAME option, which makes the simulator delay the instant it starts transmitting to align it to that time.