- Welcome
- Getting Started With the NVIDIA DriveWorks SDK
- Modules
- Samples
- Tools
- Tutorials
- SDK Porting Guide
- DriveWorks API
- More
One of the critical aspects of data acquisition on systems with multiple sensors for real-time processing is to obtain accurate timestamping of the data. NVIDIA® DriveWorks relies on the system time source of Xavier, in particular, the CLOCK_MONOTONIC time source. This time source adjusted to the UNIX epoch time is used internally to timestamp all sensors and events, and the application can get the current time via the function:
Timestamps within the same context are guaranteed to be in sync. One thing to note is that this time source is relative to UNIX epoch time on Unix based platforms. Any NTP/PTP time corrections will influence this clock.
DriveWorks computes timestamps for each sensor when data arrives to the Xavier, so sensor data recevied via Sensor Abstraction Layer always has a timestamp associated with it. In particular:
Timestamps may be modified depending on the sensor parameter output-timestamp
. This parameter supports four options as follows:
output-timestamp= | Description |
---|---|
host | Default host time as described above. |
raw | If sensor provides timestamp embedded in payload, host time is overwritten with the raw sensor timestamp. This option also enables simulated sensors to supply an external timestamp. |
synced | If valid Time Sensor is active and sensor provides timestamp embedded in payload, perform SW time synchronization to convert to host domain. If successful, this timestamp is preferable as it is closer to time of data capture. If unsuccessful or vendor timestamps unavailable, DW will fallback to host time. This is the default option if parameter is not set. |
smoothed | If sensor supports time smoothing, apply on host timestamps. This option reduces jitter by averaging host/sensor timestamp deltas based on a predetermined window. |
Output options are used in the following sample:
Sensor timestamping is used in multiple samples: