0.4.1
Loading...
Searching...
No Matches
ImuIntegrator.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9/// @file ImuIntegrator.hpp
10/// @brief Integrates ImuObs Data
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @author M. Maier (marcel.maier@ins.uni-stuttgart.de)
13/// @date 2020-05-18
14
15#pragma once
16
19
20namespace NAV
21{
22/// @brief Numerically integrates Imu data
23class ImuIntegrator : public Node
24{
25 public:
26 /// @brief Default constructor
28 /// @brief Destructor
29 ~ImuIntegrator() override;
30 /// @brief Copy constructor
31 ImuIntegrator(const ImuIntegrator&) = delete;
32 /// @brief Move constructor
34 /// @brief Copy assignment operator
36 /// @brief Move assignment operator
38
39 /// @brief String representation of the Class Type
40 [[nodiscard]] static std::string typeStatic();
41
42 /// @brief String representation of the Class Type
43 [[nodiscard]] std::string type() const override;
44
45 /// @brief String representation of the Class Category
46 [[nodiscard]] static std::string category();
47
48 /// @brief ImGui config window which is shown on double click
49 /// @attention Don't forget to set _hasConfig to true in the constructor of the node
50 void guiConfig() override;
51
52 /// @brief Saves the node into a json object
53 [[nodiscard]] json save() const override;
54
55 /// @brief Restores the node from a json object
56 /// @param[in] j Json object with the node state
57 void restore(const json& j) override;
58
59 private:
60 constexpr static size_t OUTPUT_PORT_INDEX_INERTIAL_NAV_SOL = 0; ///< @brief Flow (InertialNavSol)
61 constexpr static size_t INPUT_PORT_INDEX_IMU_OBS = 0; ///< @brief Flow (ImuObs)
62 constexpr static size_t INPUT_PORT_INDEX_POS_VEL_ATT_INIT = 1; ///< @brief Flow (PosVelAtt)
63
64 /// @brief Initialize the node
65 bool initialize() override;
66
67 /// @brief Deinitialize the node
68 void deinitialize() override;
69
70 /// @brief Receive Function for the PosVelAtt initial values
71 /// @param[in] queue Queue with all the received data messages
72 /// @param[in] pinIdx Index of the pin the data is received on
73 void recvPosVelAttInit(InputPin::NodeDataQueue& queue, size_t pinIdx);
74
75 /// @brief Receive Function
76 /// @param[in] queue Queue with all the received data messages
77 /// @param[in] pinIdx Index of the pin the data is received on
78 void recvObservation(InputPin::NodeDataQueue& queue, size_t pinIdx);
79
80 /// @brief Inertial Integrator
82
83 /// @brief Prefer the raw acceleration measurements over the deltaVel & deltaTheta values
85};
86
87} // namespace NAV
nlohmann::json json
json namespace
Inertial Measurement Integrator.
Node Class.
static constexpr size_t INPUT_PORT_INDEX_POS_VEL_ATT_INIT
Flow (PosVelAtt)
void deinitialize() override
Deinitialize the node.
ImuIntegrator(const ImuIntegrator &)=delete
Copy constructor.
void recvObservation(InputPin::NodeDataQueue &queue, size_t pinIdx)
Receive Function.
bool _preferAccelerationOverDeltaMeasurements
Prefer the raw acceleration measurements over the deltaVel & deltaTheta values.
static std::string category()
String representation of the Class Category.
static std::string typeStatic()
String representation of the Class Type.
void restore(const json &j) override
Restores the node from a json object.
std::string type() const override
String representation of the Class Type.
ImuIntegrator()
Default constructor.
void guiConfig() override
ImGui config window which is shown on double click.
bool initialize() override
Initialize the node.
ImuIntegrator & operator=(ImuIntegrator &&)=delete
Move assignment operator.
~ImuIntegrator() override
Destructor.
ImuIntegrator(ImuIntegrator &&)=delete
Move constructor.
static constexpr size_t OUTPUT_PORT_INDEX_INERTIAL_NAV_SOL
Flow (InertialNavSol)
void recvPosVelAttInit(InputPin::NodeDataQueue &queue, size_t pinIdx)
Receive Function for the PosVelAtt initial values.
json save() const override
Saves the node into a json object.
InertialIntegrator _inertialIntegrator
Inertial Integrator.
ImuIntegrator & operator=(const ImuIntegrator &)=delete
Copy assignment operator.
static constexpr size_t INPUT_PORT_INDEX_IMU_OBS
Flow (ImuObs)
Inertial Measurement Integrator.
TsDeque< std::shared_ptr< const NAV::NodeData > > NodeDataQueue
Node data queue type.
Definition Pin.hpp:707
Node(std::string name)
Constructor.
Definition Node.cpp:30