16#include <unordered_set>
64 [[nodiscard]] std::string
type()
const override;
81 constexpr static size_t OUTPUT_PORT_INDEX_DYN_DATA = 0;
84 static inline std::vector<std::string> _dataIdentifier = {
Pos::type(),
115 [[nodiscard]] std::string
description(
const Combiner* node,
const std::vector<std::string>& descriptors)
const
119 return fmt::format(
"{} {} ({})",
factor == 1.0 ?
"+" : (
factor == -1.0 ?
"-" : fmt::format(
"{:.2f}",
factor)),
124 return fmt::format(
"{} {} ({})",
factor == 1.0 ?
"+" : (
factor == -1.0 ?
"-" : fmt::format(
"{:.2f}",
factor)),
132 std::vector<Term> terms{ Term{ .factor = +1.0, .pinIndex = 0 },
133 Term{ .factor = -1.0, .pinIndex = 1 } };
137 [[nodiscard]] std::string description(
const Combiner* node)
const
140 for (
const auto& term : terms)
142 auto descriptors = node->getDataDescriptors(term.pinIndex);
143 auto termDescription = term.description(node, descriptors);
147 if (termDescription.starts_with(
"+ ") || termDescription.starts_with(
"- "))
156 desc += termDescription;
164 std::vector<Combination> _combinations{ Combination() };
170 std::vector<std::string> dynDataDescriptors;
174 std::vector<PinData> _pinData;
179 size_t combIndex = 0;
180 std::unordered_set<size_t> termIndices;
182 std::vector<std::string> events;
186 std::map<InsTime, std::vector<SendRequest>> _sendRequests;
190 static void pinAddCallback(
Node* node);
194 static void pinDeleteCallback(
Node* node,
size_t pinIdx);
198 gui::widgets::DynamicInputPins _dynamicInputPins{ 0,
this, pinAddCallback, pinDeleteCallback };
201 bool initialize()
override;
204 void deinitialize()
override;
208 [[nodiscard]] std::vector<std::string> getDataDescriptors(
size_t pinIndex)
const;
212 [[nodiscard]]
bool isLastObsThisEpoch(
const InsTime& insTime)
const;
Common logging variables like time into run and local positions.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
GNSS measurement combinations.
GNSS Observation messages.
Data storage class for simulated IMU observations.
Data storage class for one VectorNavImu observation.
Parent Class for all IMU Observations.
Loosely-coupled Kalman Filter INS/GNSS errors.
Tightly-coupled Kalman Filter INS/GNSS errors.
Data storage class for one KVH Imu observation.
Polynomial curve fitting.
Position, Velocity and Attitude Storage Class.
RTKLIB Pos Observation Class.
Binary Outputs from VectorNav Sensors.
Calculates differences between signals.
Definition Combiner.hpp:45
Combiner & operator=(Combiner &&)=delete
Move assignment operator.
friend void from_json(const json &j, Combination::Term &data)
Read info from a json object.
friend void to_json(json &j, const Combination::Term &data)
Write info to a json object.
Combiner(const Combiner &)=delete
Copy constructor.
void guiConfig() override
ImGui config window which is shown on double click.
static std::string typeStatic()
String representation of the Class Type.
friend void from_json(const json &j, Combination &data)
Read info from a json object.
Combiner(Combiner &&)=delete
Move constructor.
static std::string category()
String representation of the Class Category.
std::string type() const override
String representation of the Class Type.
Combiner()
Default constructor.
void restore(const json &j) override
Restores the node from a json object.
friend void to_json(json &j, const Combination &data)
Write info to a json object.
~Combiner() override
Destructor.
Combiner & operator=(const Combiner &)=delete
Copy assignment operator.
json save() const override
Saves the node into a json object.
Common logging variables like time into run and local positions.
Definition CommonLog.hpp:26
static std::string type()
Returns the type of the data class.
Definition GnssCombination.hpp:32
static std::string type()
Returns the type of the data class.
Definition GnssObs.hpp:149
static std::string type()
Returns the type of the data class.
Definition ImuObsSimulated.hpp:31
static std::string type()
Returns the type of the data class.
Definition ImuObsWDelta.hpp:31
static std::string type()
Returns the type of the data class.
Definition ImuObs.hpp:34
static std::string type()
Returns the type of the data class.
Definition InsGnssLCKFSolution.hpp:29
static std::string type()
Returns the type of the data class.
Definition InsGnssTCKFSolution.hpp:26
static std::string type()
Returns the type of the data class.
Definition KvhObs.hpp:39
Abstract parent class for all nodes.
Definition Node.hpp:86
Node(std::string name)
Constructor.
std::vector< InputPin > inputPins
List of input pins.
Definition Node.hpp:380
Polynomial Curve Fitting.
Definition PolynomialRegressor.hpp:39
static std::string type()
Returns the type of the data class.
Definition PosVelAtt.hpp:29
static std::string type()
Returns the type of the data class.
Definition PosVel.hpp:27
static std::string type()
Returns the type of the data class.
Definition Pos.hpp:33
static std::string type()
Returns the type of the data class.
Definition RtklibPosObs.hpp:131
static std::string type()
Returns the type of the data class.
Definition SppSolution.hpp:38
static std::string type()
Returns the type of the data class.
Definition VectorNavBinaryOutput.hpp:41
Term of a combination equation.
Definition Combiner.hpp:104
double factor
Factor to multiply the term with.
Definition Combiner.hpp:105
ScrollingBuffer< std::vector< std::string > > events
Last events to add if we send.
Definition Combiner.hpp:110
std::string description(const Combiner *node, const std::vector< std::string > &descriptors) const
Get a string description of the combination.
Definition Combiner.hpp:115
size_t pinIndex
Pin Index.
Definition Combiner.hpp:106
std::variant< size_t, std::string > dataSelection
Data Index or Data identifier.
Definition Combiner.hpp:107
PolynomialRegressor< double > polyReg
Polynomial Regressor to interpolate data.
Definition Combiner.hpp:109