···13131414#include "xrt/xrt_defines.h"
15151616+#include "math/m_filter_one_euro.h"
1717+1618#ifdef __cplusplus
1719extern "C" {
1820#endif
···4244 M_RELATION_HISTORY_RESULT_REVERSE_PREDICTED, //!< The desired timestamp was older than the oldest entry
4345};
44464747+struct m_relation_history_filters
4848+{
4949+ struct m_filter_euro_vec3 position;
5050+ struct m_filter_euro_quat orientation;
5151+};
5252+4553/*!
4654 * Creates an opaque relation_history object.
4755 *
4856 * @public @memberof m_relation_history
4957 */
5058void
5151-m_relation_history_create(struct m_relation_history **rh);
5959+m_relation_history_create(struct m_relation_history **rh, struct m_relation_history_filters *motion_vector_filters);
52605361/*!
5462 * Pushes a new pose to the history.
···159167160168public:
161169 // clang-format off
162162- RelationHistory() noexcept { m_relation_history_create(&mPtr); }
170170+ RelationHistory(struct m_relation_history_filters *motion_vector_filters) noexcept { m_relation_history_create(&mPtr, motion_vector_filters); }
163171 ~RelationHistory() { m_relation_history_destroy(&mPtr); }
164172 // clang-format on
165173
+8-8
src/xrt/auxiliary/tracking/t_tracker_slam.cpp
···286286287287 //! Type of prediction to use
288288 t_slam_prediction_type pred_type;
289289- u_var_combo pred_combo; //!< UI combo box to select @ref pred_type
290290- RelationHistory slam_rels{}; //!< A history of relations produced purely from external SLAM tracker data
291291- int dbg_pred_every = 1; //!< Skip X SLAM poses so that you get tracked mostly by the prediction algo
292292- int dbg_pred_counter = 0; //!< SLAM pose counter for prediction debugging
293293- struct os_mutex lock_ff; //!< Lock for gyro_ff and accel_ff.
294294- struct m_ff_vec3_f32 *gyro_ff; //!< Last gyroscope samples
295295- struct m_ff_vec3_f32 *accel_ff; //!< Last accelerometer samples
296296- vector<u_sink_debug> ui_sink; //!< Sink to display frames in UI of each camera
289289+ u_var_combo pred_combo; //!< UI combo box to select @ref pred_type
290290+ RelationHistory slam_rels{nullptr}; //!< A history of relations produced purely from external SLAM tracker data
291291+ int dbg_pred_every = 1; //!< Skip X SLAM poses so that you get tracked mostly by the prediction algo
292292+ int dbg_pred_counter = 0; //!< SLAM pose counter for prediction debugging
293293+ struct os_mutex lock_ff; //!< Lock for gyro_ff and accel_ff.
294294+ struct m_ff_vec3_f32 *gyro_ff; //!< Last gyroscope samples
295295+ struct m_ff_vec3_f32 *accel_ff; //!< Last accelerometer samples
296296+ vector<u_sink_debug> ui_sink; //!< Sink to display frames in UI of each camera
297297298298 //! Used to correct accelerometer measurements when integrating into the prediction.
299299 //! @todo Should be automatically computed instead of required to be filled manually through the UI.