Time Synchronization
Timing Overview Diagram
Sensor Time Source
-
All lidar and IMU data shares a common timer with 10 ns precision.
-
The timer runs from one of three clock sources:
-
An internal clock derived from a high accuracy, low drift oscillator.
-
An opto-isolated digital input from the external connector for timing off an external hardware trigger such as a GPS. The polarity of this input signal is programmable. For instance, both a GPS PPS pulse and a 30 Hz frame sync from an industrial camera can supply a timing signal to the sensor.
-
The IEEE 1588 Precision Time Protocol. PTP provides the convenience of configuring timing over a network that supports IEEE 1588 with no additional hardware signals.
Setting Ouster Sensor Time Source
The source for measurement timestamps can be configured using the timestamp_mode. The available modes are described below:
When synchronizing from an external sync pulse, specify the pulse polarity as described in the Sensor-configuration section. The input frequency is assumed to be 1 Hz. The following POST commands configure an active-low pulse with the seconds timestamp tracking pulse count since startup:
- time-stamp-mode
- sync_pulse_in_polarity
To accept an external NMEA UART message, set multipurpose_io_mode to INPUT_NMEA_UART as described in the external-clock section. When the sensor receives a valid UART message, the seconds timestamp snaps to the received value. The following commands configure an active-high NMEA input at 115200 bps with 27 leap seconds, ignoring the valid-character flag:
- time-sync-multipurpose-io-mode
- nmea-in-polarity
- nmea-baud-rate
- nmea-leap-seconds
- nmea_ignore_valid_char
External Trigger Clock Source
The sensor can also output a SYNC_PULSE_OUT signal from various sources. See the http-api section for example commands. Output pulses are always evenly spaced.
Enable this via the multipurpose_io_mode configuration parameter.
When multipurpose_io_mode is OUTPUT_FROM_INTERNAL_OSC, OUTPUT_FROM_SYNC_PULSE_IN, or OUTPUT_FROM_PTP_1588, set the output rate using sync_pulse_out_frequency (Hz). Defaults to 1 Hz. Must be greater than 0 Hz; maximum is limited by the criterion below.
When multipurpose_io_mode is OUTPUT_FROM_ENCODER_ANGLE, set sync_pulse_out_angle (degrees) to pulse at each multiple of that angle, indexed from the 0° crossing. Must be an integer between 0 and 360, inclusive; the minimum is also limited by the criterion below.
In all modes, sync_pulse_out_pulse_width (ms) sets the output pulse width.
Note: If
sync_pulse_out_pulse_widthxsync_pulse_out_frequencyis close to 1 second, the output pulses will not function (will not return to 0). For example, at 10 Hz rotation and a 10 ms pulse width, the limitation on the number of pulses per rotation is 9.
Examples
Examples below assume lidar_mode = 1024x10 and sync_pulse_out_pulse_width = 10 ms. For full POST command syntax, see the http-api section.
NMEA Message Format
The sensor expects a standard NMEA and ending with a return character. Fields are comma-separated; the last field (checksum) is delimited by*`.
Standard messages are up to 80 characters. The sensor accepts non-standard messages up to 85 characters (see Example 2).
The sensor derives time from seconds since 1970-01-01 00:00:00 UTC. nmea_leap_seconds defaults to 0 (Unix Epoch time, no leap second correction). As of February 2019, UTC lags TAI by 37 s (10 s initial offset + 27 accumulated leap seconds). Setting nmea_leap_seconds to 37 aligns timestamps with TAI.
nmea_in_polarity defaults to ACTIVE_HIGH (start bit after a falling edge). For RS-232 (inverted polarity, start bit after a rising edge), set nmea_in_polarity to ACTIVE_LOW.
Example 1 Message:
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
Example 2 Message:
$GPRMC,042901.00,A,3745.871698,N,12224.825960,W,0.874,327.72,130219,13.39,E,A,*60

