Correct way to hardware synchronize and phase lock with a global shutter camera

I am looking to hardware synchronize the lidar with a global shutter camera such that the lidar is phase-locked to point at 0° at the precise time that the camera’s global shutter exposure begins.

Right now it appears that the suggested way to do this is to configure the lidar to use the timestamp mode TIME_FROM_SYNC_PULSE_IN and provide into the GPIO port a sync pulse at 1 Hz.

From the documentation on TIME_FROM_SYNC_PULSE_IN:

A free running counter synced to the SYNC_PULSE_IN input counts seconds (# of pulses) and nanoseconds since sensor turn on. If multipurpose_io_mode is set to INPUT_NMEA_UART then the seconds register jumps to time extracted from a NMEA $GPRMC message read on the multipurpose_io port. Reported at ns resolution (both a second and nanosecond register in every UDP packet), but min increment is on the order of 10 ns.

However in my system there is no GPS attached and therefore no NMEA GRPMC message available, so it currently uses PTP synchronization to provide time to the lidar. Because of this, the behavior described above in the TIME_FROM_SYNC_PULSE_IN mode desciption is not suitable for the use case.

So the question is: is it possible to do phase locking using an external sync signal, while still using PTP time synchronization to keep the clock synchronized to some non-GPS PTP master?

Combining a sync pulse in for phase alignment while using PTP time syncing is not possible. One option is to spoof the NMEA message from your client computer which itself is time synched.

A second option is to reverse the direction of the sync to have the lidar trigger the camera as many cameras have a digital input frame trigger. In this situation, you can set the multipurpose IO to OUTPUT_FROM_ENCODER_ANGLE - Multi-Sensor Synchronization — Ouster Sensor Docs documentation

And then set the firing angle to 360° which will cause the lidar to generate 10 pulses per second to the camera.