.. _program_listing_file_src_navtk_inertial_MovementDetectorImu.hpp: Program Listing for File MovementDetectorImu.hpp ================================================ |exhale_lsh| :ref:`Return to documentation for file ` (``src/navtk/inertial/MovementDetectorImu.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include #include #include #include namespace navtk { namespace inertial { class MovementDetectorImu : public MovementDetectorPlugin { public: MovementDetectorImu(const Size window = 10, const double calib_time = 30.0); MovementStatus process(not_null> data) override; aspn_xtensor::TypeTimestamp get_time() override; private: /* * Empty all IMU data related buffers. */ void clear_buffers(); /* Number of measurements to consider collectively when detecting movement */ Size window; /* Minimum number of seconds of stationary data assumed delivered at start */ double calib_time; /* Storage for delta_theta extracted */ std::vector dth_extract; /* Storage for time_validities extracted */ std::vector time_extract; /* Stationary period has passed and we can start detecting movement */ bool ready_to_test = false; /* Norm of average dth from calibration period */ double initial_dth_norm = 0.0; /* One-sigma uncertainty of dth norms from caibration period */ double initial_dth_sig = 0.0; /* Time of last fully processed IMU measurement */ aspn_xtensor::TypeTimestamp last_time = aspn_xtensor::TypeTimestamp((int64_t)0); }; } // namespace inertial } // namespace navtk