56 pthread_mutex_lock(&pose_mutex);
63 for (index_history = 0; index_history <
location_history.ring_size; index_history++) {
65 if (diff < closestTimeDiff) {
66 closestIndex = index_history;
67 closestTimeDiff = diff;
72 struct pose_t closest_pose;
77 pthread_mutex_unlock(&pose_mutex);
void pose_init()
Initialises the pose history.
void pose_periodic()
Records the pose history 512 times per second.
struct pose_t ring_data[POSE_HISTORY_SIZE]
#define POSE_HISTORY_SIZE
struct rotation_history_ring_buffer_t location_history
struct pose_t get_rotation_at_timestamp(uint32_t timestamp)
Given a pprz timestamp in used (obtained with get_sys_time_usec) we return the pose in FloatEulers cl...
struct FloatEulers eulers