The StartSampling in combination with the ClockSync feature is extremely powerful to get data aligned with data streams from other sensors. These features are only available for the MTi product line.
Note: There is the possibility of SendLatest function (which just retrieves the latest available data). This however introduces an uncertainty to when the data was actually recorded. Especially at 100 Hz output, the data could be 10 ms old or less than 1 ms. StartSampling and ClockSync solve for this problem.
Description of the sync functions
StartSampling determines the starting moment, ClockSync makes sure that the clock of the MTi does not drift.
Instructions for the sync functions
- Step 1: apply the ClockSync. This has nothing to do with the data stream, but does affect the sampling clock. Apply a pulse of e.g. 1 PPS, tell the MTi that the frequency is exactly 1 Hz and the MTi will determine the period of the pulses with respect to the period of its own clock and adjust accordingly.
- Step 2: determine the StartSampling moment. This will depend on latencies in the communication, triggers etc of both sensor systems. Try it first, then see what the offset is with respect to the master data stream and apply that bias to the StartSampling message (up to 2.5 ms, which is a full SDI cycle).
The 400 Hz SDI output has all information of the last 2.5 ms, and the latency after the last data capture is 0.69 ms. From there, it will be sent to the filter, timed in such a way that the 400 Hz SDI output is added to the 100 Hz output again. Addition of the SDI outputs are neglible, so this means that the latency of the 100 Hz output is also 0.69 ms, as all data up to 0.69 ms before the data-ready point is in the orientation and inertial data!
The first sample however, as shown in the diagram below, is only available after 10.69 ms, as the MTi has not been designed to work with variable SDI window sizes.