A camera frame and a LiDAR observation can describe the same maneuver while carrying very different device timestamps. A batch delivery adds another complication: data acquired at separate times may become available together. How should an ADTF session preserve those distinctions?
The recording-to-replay guide introduced the ACC cut-in workflow. Here, we follow six fictional samples through their clock mapping, arrival at the Recorder and playback. The question is precise: which time tells us when a measurement happened, and which tells us when it became available?
1 · Different clocks need a defined relationship
Assume the camera, LiDAR and vehicle interface have independent counters. At reference time zero, their readings are 50,000, 20,000 and 90,000 ms. The camera runs 100 parts per million faster than the reference, the LiDAR 200 ppm slower; the vehicle counter has the same rate in this simplified model.
At reference time 1,000 ms, the three readings differ:
camera_device_ms = 50000 + 1.0001 × reference_mslidar_device_ms = 20000 + 0.9998 × reference_msvehicle_device_ms = 90000 + reference_msSubtracting the initial offsets alone would leave a growing error. After 10,000 reference milliseconds, the offset-corrected camera counter reads 10,001 ms and the LiDAR 9,998 ms: a 3 ms difference caused by their rate mismatch. Changing a transport buffer cannot correct this clock relationship.
2 · Map the source timestamp into ADTF Stream Time
ADTF uses ADTF Stream Time as its common processing time base. Source components can map external device timestamps into that domain. The Sync2Ref interfaces provide conversions that account for clock offset and drift.
In our known-clock model, the camera conversion is (device_ms − 50000) / 1.0001; for LiDAR it is (device_ms − 20000) / 0.9998. Both readings in the diagram map to 1,000 ms. These equations explain the example, rather than prescribing a Sync2Ref algorithm.
The source implementation must define what its timestamp represents: exposure, scan timing, device reception or another event. Use the appropriate clock-domain mapping and units. Real synchronization must estimate and track the relationship within the accuracy required for the investigation.
3 · A batch arrival still contains separate measurement times
Now assume the camera delivers frames individually. The LiDAR API delivers three timestamped items together at 1,040 ms. They were acquired at mapped times 1,000, 1,010 and 1,020 ms.
The example’s source adapter creates one ADTF sample per item and assigns each its mapped measurement time. Its three samples reach the Recorder at 1,041, 1,042 and 1,043 ms. That behavior belongs to the adapter design; ADTF does not automatically infer individual acquisition times from an unlabelled batch.
The complete example includes two camera frames and one vehicle sample:
| Sample | Device time ms | Mapped sample time ADTF ms | Recorder arrival ADTF ms |
|---|---|---|---|
| C0 Camera | 51,000.100 | 1,000 | 1,004 |
| L0 LiDAR | 20,999.800 | 1,000 | 1,041 |
| V0 Vehicle | 91,005.000 | 1,005 | 1,007 |
| L1 LiDAR | 21,009.798 | 1,010 | 1,042 |
| C1 Camera | 51,020.102 | 1,020 | 1,024 |
| L2 LiDAR | 21,019.796 | 1,020 | 1,043 |
Rows are arranged by mapped measurement time. C0 and L0 share a timestamp, as do C1 and L2; their listing order does not specify processing order.
If the adapter stamped every LiDAR item with the callback time, the distinction between the three acquisitions would be lost in that sample timestamp. Preserving the per-item device time is what allows the items to be related to the camera and vehicle data.
4 · The Recorder captures another point in the journey
The Recorder’s timebase_mode controls the file-item time base. With timebase_mode = 0, it records items with ADTF Stream Time at arrival. Our table therefore gives L0 a sample timestamp of 1,000 ms and a file-item, or chunk, timestamp of 1,041 ms.
Those values answer different questions: when the item was acquired in our defined source model, and when it reached this recording point. The Recorder’s timestamp is also separate from completion of the disk write.
The alternative timebase_mode = 1 uses sample timestamps for file items, replaces the original triggers and is limited to one input pin. It is a capture-time choice, not the Player’s reader setting. This multi-stream example retains mode 0.
5 · Choose the replay timeline for the engineering question
The Player documentation distinguishes two purposes. Default playback uses chunk timestamps to continue at the recording point. With our recording, C1 arrives before the older LiDAR items, reproducing availability at that tap.
Source-oriented resimulation can instead use sample timestamps. In the example, L0 belongs at 1,000 ms, before V0 at 1,005 ms, even though it reached the Recorder later.
Explore the same six samples
Continue at the recording point: items follow their recorded arrival times.
- C0 Camera
- V0 Vehicle
- C1 Camera
- L0 LiDAR
- L1 LiDAR
- L2 LiDAR
This control illustrates timestamp grouping; it does not configure or run ADTF. Equal timestamps do not establish an order within a group.
For sample-time playback, select the sorted_by_timestamps reader and review sort_by_sample_timestamp, the sorting window and generated triggers. The window must cover the data’s reordering span. This reader reorders items; it does not establish a missing clock relationship or repair invalid recordings in general.
The Playback Service coordinates delivery against ADTF Stream Time. Replay time is the session’s progression, not a third acquisition timestamp. Playback speed controls progression relative to wall time; changing it does not correct a sensor-clock offset.
Make the three decisions explicit
| Stage | Decision | In this example |
|---|---|---|
| Source adapter | Timestamp meaning and clock mapping | Preserve each acquisition time; map its device clock to ADTF Stream Time. |
| Recorder | File-item time base | timebase_mode = 0 retains arrival timing at the tap. |
| Player / reader | Playback time basis | Chunk time for the recording point; valid mapped sample time for source-oriented timing. |
For the ACC cut-in, this separates clock mismatch, delivery delay and the recorded function response. Engineers can then interpret the event against an explicit timing model. Supplying a function again also requires the relevant recorded inputs, software and execution setup; a timestamp choice alone cannot recreate the vehicle.
Technical references
- ADTF Clock Handling — common stream time and external-clock synchronization.
- Sync2Ref channel interface — conversion, offset and drift handling.
- Recorder — file-item time base and mode restrictions.
- Player: resimulation of data sources — sample versus chunk timestamps.
- Built-in readers — timestamp sorting and reader properties.
- Playback Service — playback clock and speed.
Sources checked: 18 November 2026. Property availability should be matched to the ADTF release in use.