0.5.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
14
17
28
33
35{
36 return "RtklibPosConverter";
37}
38
40{
41 return typeStatic();
42}
43
45{
46 return "Converter";
47}
48
50{
51 LOG_TRACE("{}: called", nameId());
52
53 return true;
54}
55
57{
58 auto rtklibPosObs = std::static_pointer_cast<const RtklibPosObs>(queue.extract_front());
59
60 auto posVelObs = std::make_shared<PosVel>();
61
62 posVelObs->insTime = rtklibPosObs->insTime;
63 posVelObs->setPosition_e(rtklibPosObs->e_position());
64 posVelObs->setVelocity_e(rtklibPosObs->e_velocity());
65
67}
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
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:29
OutputPin * CreateOutputPin(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.
Definition Node.cpp:278
std::string nameId() const
Node name and id.
Definition Node.cpp:323
std::string name
Name of the Node.
Definition Node.hpp:507
InputPin * CreateInputPin(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.
Definition Node.cpp:252
void invokeCallbacks(size_t portIndex, const std::shared_ptr< const NodeData > &data)
Calls all registered callbacks on the specified output port.
Definition Node.cpp:179
bool _hasConfig
Flag if the config window should be shown.
Definition Node.hpp:525
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
@ Flow
NodeData Trigger.
Definition Pin.hpp:52