Line |
Branch |
Exec |
Source |
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 Imu.hpp |
10 |
|
|
/// @brief Abstract IMU Class |
11 |
|
|
/// @author T. Topp (topp@ins.uni-stuttgart.de) |
12 |
|
|
/// @date 2020-03-12 |
13 |
|
|
|
14 |
|
|
#pragma once |
15 |
|
|
|
16 |
|
|
#include "internal/Node/Node.hpp" |
17 |
|
|
|
18 |
|
|
#include "NodeData/IMU/ImuPos.hpp" |
19 |
|
|
|
20 |
|
|
namespace NAV |
21 |
|
|
{ |
22 |
|
|
/// Abstract IMU Class |
23 |
|
|
class Imu : public Node |
24 |
|
|
{ |
25 |
|
|
public: |
26 |
|
|
/// @brief Destructor |
27 |
|
2128 |
~Imu() override = default; |
28 |
|
|
/// @brief Copy constructor |
29 |
|
|
Imu(const Imu&) = delete; |
30 |
|
|
/// @brief Move constructor |
31 |
|
|
Imu(Imu&&) = delete; |
32 |
|
|
/// @brief Copy assignment operator |
33 |
|
|
Imu& operator=(const Imu&) = delete; |
34 |
|
|
/// @brief Move assignment operator |
35 |
|
|
Imu& operator=(Imu&&) = delete; |
36 |
|
|
|
37 |
|
|
/// @brief ImGui config window which is shown on double click |
38 |
|
|
/// @attention Don't forget to set _hasConfig to true in the constructor of the node |
39 |
|
|
void guiConfig() override; |
40 |
|
|
|
41 |
|
|
/// @brief Saves the node into a json object |
42 |
|
|
[[nodiscard]] json save() const override; |
43 |
|
|
|
44 |
|
|
/// @brief Restores the node from a json object |
45 |
|
|
/// @param[in] j Json object with the node state |
46 |
|
|
void restore(const json& j) override; |
47 |
|
|
|
48 |
|
|
/// Position and rotation information for conversion from platform to body frame |
49 |
|
|
[[nodiscard]] const ImuPos& imuPosition() const { return _imuPos; } |
50 |
|
|
|
51 |
|
|
protected: |
52 |
|
|
/// @brief Constructor |
53 |
|
|
/// @param[in] name Name of the node |
54 |
|
|
explicit Imu(std::string name); |
55 |
|
|
|
56 |
|
|
/// Position and rotation information for conversion from platform to body frame |
57 |
|
|
ImuPos _imuPos; |
58 |
|
|
}; |
59 |
|
|
|
60 |
|
|
} // namespace NAV |
61 |
|
|
|