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.

 

  1. Connect the PPS output from your GPS to the sync_pulse_in pin of the Ouster Interface box.

    1. Pictured here in yellow

       

  2. Connect the NMEA UART output from you GPS to the multipurpose_io pin of the Ouster interface box

    1. Pictured below in magenta

       

  3. Connect the ground output from your GPS to the GND pin of the Ouster Interface box.

    1. 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.

  1. Set the timestamp_mode to TIME_FROM_SYNC_PULSE_IN

    1. TCP command: set_config_param timestamp_mode TIME_FROM_SYNC_PULSE_IN

  2. Set the multipurpose_io_mode to INPUT_NMEA_UART

    1. TCP command: set_config_param multipurpose_io_mode INPUT_NMEA_UART

  3. Set the polarity of the sync_pulse_in pin to match the GPS PPS polarity

    1. TCP command: set_config_param sync_pulse_in_polarity <ACTIVE_HIGH or ACTIVE_LOW>

  4. Set the polarity of the multipurpose_io pin to match the GPS NMEA UART polarity

    1. TCP command: set_config_param nmea_in_polarity <ACTIVE_HIGH or ACTIVE_LOW>

  5. Set the nmea_baud_rate to match the GPS NMEA baud rate

    1. TCP command: set_config_param nmea_baud_rate <BAUD_11520 or BAUD_9600>

  6. Set the nmea_leap_second to match the current leap seconds as defined by TIA at this website, at time of writing this the leap seconds are 37

    1. TCP command: set_config_param nmea_leap_seconds 37

  7. Reinitialize and write the configuration

    1. TCP command: reinitialize

    2. TCP command: write_config_txt

Checking for Sync

Once you have completed all the above you should be able to check for synchronization

  1. Check the output from the TCP command: get_time_info

    1. Verify that the sensor is locked onto the PPS signal

      1. ”sync_pulse_in": { "locked": 1

        • if not check the polarity and change it if necessary

    2. Verify that the sensor is locked on the NMEA signal

      1. “nmea": { “locked”: 1

        • if not check the polarity and baud rate and change them if necessary

    3. Verify that last_read_message looks like a valid GPRMC sentence

      1. "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. Verify that timestamp time has updated to a reasonable GPS time

      1. "timestamp": { "time": 1585881641.96139565999999, "mode": "TIME_FROM_SYNC_PUSLE_IN", "time_options": { "sync_pulse_in": 1585881641

    5. Example output from get_time_info:

      1. { "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" } } }

 

Related articles