The following example demonstrates:
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-txrx --antenna-lna-gain 25 \ --start-tx-coordinated-via "$LOGPREFIX"/start_gps_time \ ! tracker \ ! decoder \ ! static-kf2 --abort-signals-ignored-for 2 --p-log 1e-9 --p-ignore 1e-12 \ ! gpsdo --force-zero-frequency-offset --disable-fast-slew
In the above pipeline:
--start-now-coordinated-via FILENAME option:
Option Description --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
... which samples CLOCK_REALTIME and writes its value (converted to GNSS time) to FILENAME, which is read by the sylphase-simulator-txrx node below.
--start-tx-coordinated-via FILENAME option, which makes the simulator start transmitting such that the first sample in the raw stream coincides with the instant where the system CLOCK_REALTIME clock's value, converted from UTC to GNSS time, is equal to the GNSS time value read from FILENAME.