0.4.1
Loading...
Searching...
No Matches
RtklibPosConverter.cpp
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
10
11#include "util/Logger.hpp"
12
14namespace nm = NAV::NodeManager;
16
19
30
35
37{
38 return "RtklibPosConverter";
39}
40
42{
43 return typeStatic();
44}
45
47{
48 return "Converter";
49}
50
52{
53 LOG_TRACE("{}: called", nameId());
54
55 return true;
56}
57
59{
60 auto rtklibPosObs = std::static_pointer_cast<const RtklibPosObs>(queue.extract_front());
61
62 auto posVelObs = std::make_shared<PosVel>();
63
64 posVelObs->insTime = rtklibPosObs->insTime;
65 posVelObs->setPosition_e(rtklibPosObs->e_position());
66 posVelObs->setVelocity_e(rtklibPosObs->e_velocity());
67
69}
Save/Load the Nodes.
Utility class for logging to console and file.
#define LOG_TRACE
Detailled info to trace the execution of the program. Should not be called on functions which receive...
Definition Logger.hpp:65
Manages all Nodes.
Position and Velocity Storage Class.
Convert RTKLib pos files into PosVel.
RTKLIB Pos Observation Class.
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
std::string nameId() const
Node name and id.
Definition Node.cpp:253
std::string name
Name of the Node.
Definition Node.hpp:395
void invokeCallbacks(size_t portIndex, const std::shared_ptr< const NodeData > &data)
Calls all registered callbacks on the specified output port.
Definition Node.cpp:180
bool _hasConfig
Flag if the config window should be shown.
Definition Node.hpp:413
static std::string type()
Returns the type of the data class.
Definition PosVel.hpp:27
bool initialize() override
Initialize the node.
void receiveObs(InputPin::NodeDataQueue &queue, size_t pinIdx)
Converts the RtklibPosObs into PosVel.
std::string type() const override
String representation of the Class Type.
static std::string typeStatic()
String representation of the Class Type.
~RtklibPosConverter() override
Destructor.
static std::string category()
String representation of the Class Category.
RtklibPosConverter()
Default constructor.
static constexpr size_t OUTPUT_PORT_INDEX_POSVEL
Flow.
static std::string type()
Returns the type of the data class.
auto extract_front()
Returns a copy of the first element in the container and removes it from the container.
Definition TsDeque.hpp:494
OutputPin * CreateOutputPin(Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, OutputPin::PinData data=static_cast< void * >(nullptr), int idx=-1)
Create an Output Pin object.
InputPin * CreateInputPin(Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier={}, InputPin::Callback callback=static_cast< InputPin::FlowFirableCallbackFunc >(nullptr), InputPin::FlowFirableCheckFunc firable=nullptr, int priority=0, int idx=-1)
Create an Input Pin object.
@ Flow
NodeData Trigger.
Definition Pin.hpp:52