0.2.0
Loading...
Searching...
No Matches
VectorNavBinaryConverter.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
13
14#pragma once
15
17
22
23#include <array>
24#include <memory>
25
26namespace NAV
27{
30{
31 public:
44
46 [[nodiscard]] static std::string typeStatic();
47
49 [[nodiscard]] std::string type() const override;
50
52 [[nodiscard]] static std::string category();
53
56 void guiConfig() override;
57
59 [[nodiscard]] json save() const override;
60
63 void restore(const json& j) override;
64
66 enum class OutputType
67 {
68 ImuObs,
70 PosVelAtt,
71 GnssObs,
72 COUNT,
73 };
74
75 private:
76 constexpr static size_t OUTPUT_PORT_INDEX_CONVERTED = 0;
77 constexpr static size_t INPUT_PORT_INDEX_VECTORNAV_BINARY_OUTPUT = 0;
78
81
83 enum PosVelSource
84 {
85 PosVelSource_Best,
86 PosVelSource_Ins,
87 PosVelSource_Gnss1,
88 PosVelSource_Gnss2,
89 };
90
92 PosVelSource _posVelSource = PosVelSource_Best;
93
95 bool _forceStatic = false;
96
98 bool _useCompensatedData = false;
99
101 std::shared_ptr<const PosVelAtt> _posVelAtt__init = nullptr;
102
104 bool initialize() override;
105
109 void receiveObs(InputPin::NodeDataQueue& queue, size_t pinIdx);
110
114 std::shared_ptr<const ImuObsWDelta> convert2ImuObsWDelta(const std::shared_ptr<const VectorNavBinaryOutput>& vnObs);
115
119 std::shared_ptr<const ImuObs> convert2ImuObs(const std::shared_ptr<const VectorNavBinaryOutput>& vnObs);
120
124 std::shared_ptr<const PosVelAtt> convert2PosVelAtt(const std::shared_ptr<const VectorNavBinaryOutput>& vnObs);
125
129 static std::shared_ptr<const GnssObs> convert2GnssObs(const std::shared_ptr<const VectorNavBinaryOutput>& vnObs);
130};
131
136
137} // namespace NAV
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
GNSS Observation messages.
Data storage class for one VectorNavImu observation.
Node Class.
Position, Velocity and Attitude Storage Class.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
Binary Outputs from VectorNav Sensors.
TsDeque< std::shared_ptr< const NAV::NodeData > > NodeDataQueue
Node data queue type.
Definition Pin.hpp:703
Abstract parent class for all nodes.
Definition Node.hpp:86
Converts VectorNavBinaryOutput.
Definition VectorNavBinaryConverter.hpp:30
VectorNavBinaryConverter()
Default constructor.
VectorNavBinaryConverter & operator=(const VectorNavBinaryConverter &)=delete
Copy assignment operator.
VectorNavBinaryConverter(const VectorNavBinaryConverter &)=delete
Copy constructor.
VectorNavBinaryConverter & operator=(VectorNavBinaryConverter &&)=delete
Move assignment operator.
OutputType
Enum specifying the type of the output message.
Definition VectorNavBinaryConverter.hpp:67
@ ImuObsWDelta
Extract ImuObsWDelta data.
@ COUNT
Number of items in the enum.
static std::string category()
String representation of the Class Category.
void restore(const json &j) override
Restores the node from a json object.
json save() const override
Saves the node into a json object.
~VectorNavBinaryConverter() override
Destructor.
std::string type() const override
String representation of the Class Type.
VectorNavBinaryConverter(VectorNavBinaryConverter &&)=delete
Move constructor.
void guiConfig() override
ImGui config window which is shown on double click.
static std::string typeStatic()
String representation of the Class Type.