Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK

◆ k4a_playback_get_previous_imu_sample()

k4a_stream_result_t k4a_playback_get_previous_imu_sample ( k4a_playback_t  playback_handle,
k4a_imu_sample_t imu_sample 
)
related

Read the previous IMU sample in the recording sequence.

Parameters
playback_handleHandle obtained by k4a_playback_open().
imu_sample[OUT] The location to write the IMU sample.
Returns
K4A_STREAM_RESULT_SUCCEEDED if a sample is returned, or K4A_STREAM_RESULT_EOF if the start of the recording is reached. All other failures will return K4A_STREAM_RESULT_FAILED.
Remarks
k4a_playback_get_previous_imu_sample() always returns the IMU sample before the most recently returned sample.
If a call was made to to k4a_playback_get_next_imu_sample() which returned K4A_STREAM_RESULT_EOF, then the playback position is at the end of the recording and k4a_playback_get_previous_imu_sample() will return the last IMU sample in the recording.
The first call to k4a_playback_get_previous_imu_sample() after k4a_playback_seek_timestamp() will return the IMU sample closest to the seek time with a timestamp less than the seek time.