How to Synchronize GPS with Ouster Sensor
This article will explain how to connect a GPS/GNSS to your Ouster sensor and synchronize the Ouster sensor timestamp.
Setting up your GPS/GNSS
It is important to ensure you have configured your GPS according to the manufacturer’s specifications.
The Ouster sensor accepts the following:
NMEA sentence type: GPRMC only (future support for other sentence types)
Baud Rates: 9600 or 115200
Polarity: Normal or Reversed (ACTIVE_HIGH or ACTIVE_LOW)
Voltage: 3.3 - 15 V logic with a minimum drive current of 5 mA.
If your GPS can’t meet these minimums you will need to buffer the voltage with an additional circuit. Details in section 3.2 of the Ouster HW User Guide.
Once you have configured your GPS, it is good practice to verify the signals using an oscilloscope. This will ensure you have the correct baud rate, polarity, voltage, and message type are being output.
Connecting the Hardware
The next step to successfully connecting your GPS is ensuring that you have connected the outputs from your GPS to the correct inputs of the sensor.
For lab application where you will use the interface box, use terminated jumper wire like these to ensure a solid connection.
Connect the PPS output from your GPS to the
sync_pulse_inpin of the Ouster Interface box.Pictured here in yellow
Connect the NMEA UART output from you GPS to the
multipurpose_iopin of the Ouster interface boxPictured below in magenta
Connect the ground output from your GPS to the
GNDpin of the Ouster Interface box.Pictured here in gray
Please note the Voltage and Current requirements from the User Guide in Table 1 and Table 3 below.
Configuring the Ouster Sensor
Now that everything is configured and verified on the GPS side and you have connected everything to the Ouster sensor, it is time to configure the Ouster sensor to synchronize its timestamp with the GPS.
Set the
timestamp_modetoTIME_FROM_SYNC_PULSE_INTCP command:
set_config_param timestamp_mode TIME_FROM_SYNC_PULSE_IN
Set the
multipurpose_io_modetoINPUT_NMEA_UARTTCP command:
set_config_param multipurpose_io_mode INPUT_NMEA_UART
Set the polarity of the
sync_pulse_inpin to match the GPS PPS polarityTCP command:
set_config_param sync_pulse_in_polarity <ACTIVE_HIGH or ACTIVE_LOW>
Set the polarity of the
multipurpose_iopin to match the GPS NMEA UART polarityTCP command:
set_config_param nmea_in_polarity <ACTIVE_HIGH or ACTIVE_LOW>
Set the
nmea_baud_rateto match the GPS NMEA baud rateTCP command:
set_config_param nmea_baud_rate <BAUD_11520 or BAUD_9600>
Set the
nmea_leap_secondto match the current leap seconds as defined by TIA at this website, at time of writing this the leap seconds are37TCP command:
set_config_param nmea_leap_seconds 37
Reinitialize and write the configuration
TCP command:
reinitializeTCP command:
write_config_txt
Checking for Sync
Once you have completed all the above you should be able to check for synchronization
Check the output from the TCP command:
get_time_infoVerify that the sensor is locked onto the PPS signal
”sync_pulse_in": { "locked": 1if not check the polarity and change it if necessary
Verify that the sensor is locked on the NMEA signal
“nmea": { “locked”: 1if not check the polarity and baud rate and change them if necessary
Verify that
last_read_messagelooks like 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"
Verify that timestamp time has updated to a reasonable GPS time
"timestamp": { "time": 1585881641.96139565999999, "mode": "TIME_FROM_SYNC_PUSLE_IN", "time_options": { "sync_pulse_in": 1585881641
Example output from
get_time_info:{ "timestamp": { "time": 1585881641.96139565999999, "mode": "TIME_FROM_SYNC_PUSLE_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" } } }