GPS/GNSS Synchronization

Open in ClaudeOpen in ChatGPT

For GPS wiring instructions, see GPS/GNSS Synchronization in the hardware user manual.

Configuring the Ouster Sensor

With GPS connections in place, configure the following parameters to synchronize the sensor’s timestamp to the GPS signal:

ParameterValue
timestamp_modeTIME_FROM_SYNC_PULSE_IN
multipurpose_io_modeINPUT_NMEA_UART
sync_pulse_in_polarityMatch the polarity of the GPS PPS signal
multipurpose_io_polarityMatch the polarity of the GPS NMEA UART signal
nmea_baud_rateMatch the baud rate of the GPS output
nmea_leap_secondsCurrent TAI–UTC offset — check leapsecond.com; at time of writing the value is 37

Checking for Sync

After applying the configuration above, verify synchronization using GET /api/v1/time:

  1. PPS lock — the response should include:

    "sync_pulse_in": { "locked": 1 }

    If not, recheck sync_pulse_in_polarity.

  2. NMEA lock — the response should include:

    "nmea": { "locked": 1 }

    If not, recheck multipurpose_io_polarity and nmea_baud_rate.

  3. NMEA decoding — last_read_message should contain a valid GPRMC sentence:

    "decoding": { "last_read_message": "GPRMC,024041.00,A,5107.0017737,N,11402.3291611,W,0.080,323.3,020420,0.0,E,A*20" }
  4. Timestamp — timestamp.mode should be TIME_FROM_SYNC_PULSE_IN and timestamp.time should reflect valid GPS time.

Example Response

Full example output from GET /api/v1/time:

{
"timestamp": {
"time": 1585881641.96139565999999,
"mode": "TIME_FROM_SYNC_PULSE_IN",
"time_options": {
"sync_pulse_in": 1585881641,
"internal_osc": 302,
"ptp_1588": 309
}
},
"sync_pulse_in": {
"locked": 1,
"diagnostics": {
"last_period_nsec": 10,
"count_unfiltered": 832,
"count": 832
},
"polarity": "ACTIVE_HIGH"
},
"multipurpose_io": {
"mode": "INPUT_NMEA_UART",
"sync_pulse_out": {
"pulse_width_ms": 10,
"angle_deg": 360,
"frequency_hz": 1,
"polarity": "ACTIVE_HIGH"
},
"nmea": {
"locked": 1,
"baud_rate": "BAUD_9600",
"diagnostics": {
"io_checks": {
"bit_count": 2938457,
"bit_count_unfilterd": 2938457,
"start_char_count": 832,
"char_count": 66526
},
"decoding": {
"last_read_message": "GPRMC,024041.00,A,5107.0017737,N,11402.3291611,W,0.080,323.3,020420,0.0,E,A*20",
"date_decoded_count": 832,
"not_valid_count": 0,
"utc_decoded_count": 832
}
},
"leap_seconds": 37,
"ignore_valid_char": 0,
"polarity": "ACTIVE_HIGH"
}
}
}