.. _program_listing_file_src_navtk_inertial_MovementDetector.hpp: Program Listing for File MovementDetector.hpp ============================================= |exhale_lsh| :ref:`Return to documentation for file ` (``src/navtk/inertial/MovementDetector.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include #include #include namespace navtk { namespace inertial { struct MovementDetectorPluginStat { double weight = 0.0; double stale_time = 0.0; }; class MovementDetector { public: void add_plugin(const std::string& id, not_null> plugin, const double weight = 1.0, const double stale_time = 1.0); void remove_plugin(const std::string& id); // Formatting breaks in-docs link to other function version // clang-format off // clang-format on void process(not_null> data); void process(const std::vector& ids, not_null> data); MovementStatus get_status(); std::unordered_map plugin_info() const; private: // Container for storing plugin and assorted info struct FullPluginStat { MovementDetectorPluginStat stats; std::shared_ptr plugin; }; // Storage for plugins and related data. std::unordered_map mp; // Extracted keys from plugin map to support no-id process() function std::vector keys; }; } // namespace inertial } // namespace navtk