![]() |
0.4.1
|
Position, Velocity, Attitude Initializer from GPS and IMU data. More...
Public Member Functions | |
void | guiConfig () override |
ImGui config window which is shown on double click. | |
PosVelAttInitializer & | operator= (const PosVelAttInitializer &)=delete |
Copy assignment operator. | |
PosVelAttInitializer & | operator= (PosVelAttInitializer &&)=delete |
Move assignment operator. | |
PosVelAttInitializer () | |
Default constructor. | |
PosVelAttInitializer (const PosVelAttInitializer &)=delete | |
Copy constructor. | |
PosVelAttInitializer (PosVelAttInitializer &&)=delete | |
Move constructor. | |
void | restore (const json &j) override |
Restores the node from a json object. | |
json | save () const override |
Saves the node into a json object. | |
std::string | type () const override |
String representation of the Class Type. | |
~PosVelAttInitializer () override | |
Destructor. | |
![]() | |
virtual void | afterCreateLink (OutputPin &startPin, InputPin &endPin) |
Called when a new link was established. | |
virtual void | afterDeleteLink (OutputPin &startPin, InputPin &endPin) |
Called when a link was deleted. | |
bool | doDeinitialize (bool wait=false) |
Asks the node worker to deinitialize the node. | |
bool | doDisable (bool wait=false) |
Asks the node worker to disable the node. | |
bool | doEnable () |
Enable the node. | |
bool | doInitialize (bool wait=false) |
Asks the node worker to initialize the node. | |
bool | doReinitialize (bool wait=false) |
Asks the node worker to reinitialize the node. | |
virtual void | flush () |
Function called by the flow executer after finishing to flush out remaining data. | |
template<typename T> | |
std::optional< InputPin::IncomingLink::ValueWrapper< T > > | getInputValue (size_t portIndex) const |
Get Input Value connected on the pin. Only const data types. | |
Mode | getMode () const |
Get the current mode of the node. | |
const ImVec2 & | getSize () const |
Get the size of the node. | |
State | getState () const |
Get the current state of the node. | |
bool | hasInputPinWithSameTime (const InsTime &insTime) const |
Checks wether there is an input pin with the same time. | |
InputPin & | inputPinFromId (ax::NodeEditor::PinId pinId) |
Returns the pin with the given id. | |
size_t | inputPinIndexFromId (ax::NodeEditor::PinId pinId) const |
Returns the index of the pin. | |
void | invokeCallbacks (size_t portIndex, const std::shared_ptr< const NodeData > &data) |
Calls all registered callbacks on the specified output port. | |
bool | isDisabled () const |
Checks if the node is disabled. | |
bool | isInitialized () const |
Checks if the node is initialized. | |
bool | isOnlyRealtime () const |
Checks if the node is only working in real time (sensors, network interfaces, ...) | |
bool | isTransient () const |
Checks if the node is changing its state currently. | |
std::string | nameId () const |
Node name and id. | |
Node (const Node &)=delete | |
Copy constructor. | |
Node (Node &&)=delete | |
Move constructor. | |
Node (std::string name) | |
Constructor. | |
void | notifyOutputValueChanged (size_t pinIdx, const InsTime &insTime, const std::scoped_lock< std::mutex > &&guard) |
Notifies connected nodes about the change. | |
virtual bool | onCreateLink (OutputPin &startPin, InputPin &endPin) |
Called when a new link is to be established. | |
virtual void | onDeleteLink (OutputPin &startPin, InputPin &endPin) |
Called when a link is to be deleted. | |
Node & | operator= (const Node &)=delete |
Copy assignment operator. | |
Node & | operator= (Node &&)=delete |
Move assignment operator. | |
OutputPin & | outputPinFromId (ax::NodeEditor::PinId pinId) |
Returns the pin with the given id. | |
size_t | outputPinIndexFromId (ax::NodeEditor::PinId pinId) const |
Returns the index of the pin. | |
void | releaseInputValue (size_t portIndex) |
Unblocks the connected node. Has to be called when the input value should be released and getInputValue was not called. | |
std::scoped_lock< std::mutex > | requestOutputValueLock (size_t pinIdx) |
Blocks the thread till the output values was read by all connected nodes. | |
virtual bool | resetNode () |
Resets the node. It is guaranteed that the node is initialized when this is called. | |
virtual void | restoreAtferLink (const json &j) |
Restores link related properties of the node from a json object. | |
void | wakeWorker () |
Wakes the worker thread. | |
virtual | ~Node () |
Destructor. | |
Static Public Member Functions | |
static std::string | category () |
String representation of the Class Category. | |
static std::string | typeStatic () |
String representation of the Class Type. | |
![]() | |
static std::string | toString (State state) |
Converts the state into a printable text. | |
Private Types | |
enum class | AttitudeMode : uint8_t { BOTH , IMU , GNSS , COUNT } |
Initialization source for attitude. More... | |
enum class | VelocityOverride : uint8_t { OFF , ECEF , NED , COUNT } |
Override options for Position. More... | |
Private Member Functions | |
void | deinitialize () override |
Deinitialize the node. | |
void | finalizeInit () |
Checks whether all Flags are set and writes logs messages. | |
bool | initialize () override |
Initialize the node. | |
std::shared_ptr< const NodeData > | pollPVASolution () |
Polls the PVA solution if all is set in the GUI. | |
void | receiveGnssObs (InputPin::NodeDataQueue &queue, size_t pinIdx) |
Receive Gnss Observations. | |
void | receiveImuObs (InputPin::NodeDataQueue &queue, size_t pinIdx) |
Receive Imu Observations. | |
void | receivePosObs (const std::shared_ptr< const Pos > &obs) |
Receive Pos Observations. | |
void | receivePosVelAttObs (const std::shared_ptr< const PosVelAtt > &obs) |
Receive PosVelAtt Observations. | |
void | receivePosVelObs (const std::shared_ptr< const PosVel > &obs) |
Receive PosVel Observations. | |
void | receiveUbloxObs (const std::shared_ptr< const UbloxObs > &obs) |
Receive Ublox Observations. | |
void | updatePins () |
Add or removes input pins depending on the settings and modifies the output pin. | |
Private Attributes | |
AttitudeMode | _attitudeMode |
GUI option to pecify the initialization source for attitude. | |
std::array< double, 3 > | _averagedAttitude |
Averaged Attitude (roll, pitch, yaw) in [rad]. | |
double | _countAveragedAttitude |
Count of received attitude measurements. | |
Eigen::Vector3d | _e_initPosition |
Position in ECEF coordinates. | |
double | _initDuration |
Time in [s] to initialize the state. | |
InsTime | _initTime |
Initialization time. | |
gui::widgets::TimeEditFormat | _initTimeEditFormat |
Time Format to input the init time with. | |
int | _inputPinIdxGNSS |
Index of the input pin for GNSS observations. | |
int | _inputPinIdxIMU |
Index of the input pin for IMU observations. | |
std::array< double, 3 > | _lastPositionAccuracy |
Last position accuracy in [cm] for XYZ or NED. | |
std::array< double, 3 > | _lastVelocityAccuracy |
Last velocity accuracy in [cm/s] for XYZ or NED. | |
Eigen::Vector3d | _n_initVelocity |
Velocity in navigation coordinates. | |
Eigen::Quaterniond | _n_Quat_b_init |
Initialized Quaternion body to navigation frame (roll, pitch, yaw) | |
bool | _overridePosition |
Whether the GNSS values should be used or we want to override the values manually. | |
gui::widgets::PositionWithFrame | _overridePositionValue |
Values to override the Position in ECEF coordinates in [m]. | |
std::array< bool, 3 > | _overrideRollPitchYaw |
Whether the IMU values should be used or we want to override the values manually. | |
std::array< double, 3 > | _overrideRollPitchYawValues |
Values to override Roll, Pitch and Yaw with in [deg]. | |
VelocityOverride | _overrideVelocity |
Whether the GNSS values should be used or we want to override the values manually. | |
Eigen::Vector3d | _overrideVelocityValues |
Values to override the Velocity in [m/s]. | |
double | _positionAccuracyThreshold |
Position Accuracy to achieve in [cm]. | |
std::array< bool, 4 > | _posVelAttInitialized |
Whether the states are initialized (pos, vel, att, messages send) | |
InsTime | _startTime |
Start time of the averaging process. | |
double | _velocityAccuracyThreshold |
Velocity Accuracy to achieve in [cm/s]. | |
Static Private Attributes | |
static constexpr size_t | OUTPUT_PORT_INDEX_POS_VEL_ATT |
Flow (PosVelAtt) | |
Friends | |
constexpr const char * | to_string (PosVelAttInitializer::AttitudeMode attitudeMode) |
Converts the enum to a string. | |
constexpr const char * | to_string (PosVelAttInitializer::VelocityOverride velOverride) |
Converts the enum to a string. | |
Additional Inherited Members | |
![]() | |
enum class | Mode : uint8_t { REAL_TIME , POST_PROCESSING } |
Different Modes the Node can work in. More... | |
enum class | State : uint8_t { Disabled , Deinitialized , DoInitialize , Initializing , Initialized , DoDeinitialize , Deinitializing , DoShutdown , Shutdown } |
Possible states of the node. More... | |
![]() | |
bool | callbacksEnabled |
Enables the callbacks. | |
ax::NodeEditor::NodeId | id |
Unique Id of the Node. | |
std::vector< InputPin > | inputPins |
List of input pins. | |
Kind | kind |
Kind of the Node. | |
std::string | name |
Name of the Node. | |
std::vector< OutputPin > | outputPins |
List of output pins. | |
std::multimap< InsTime, std::pair< OutputPin *, size_t > > | pollEvents |
Map with callback events (sorted by time) | |
![]() | |
ImVec2 | _guiConfigDefaultWindowSize |
bool | _hasConfig |
Flag if the config window should be shown. | |
bool | _lockConfigDuringRun |
Lock the config when executing post-processing. | |
bool | _onlyRealTime |
Whether the node can run in post-processing or only real-time. | |
Position, Velocity, Attitude Initializer from GPS and IMU data.
Definition at line 33 of file PosVelAttInitializer.hpp.
|
strongprivate |
Initialization source for attitude.
Enumerator | |
---|---|
BOTH | Use IMU and GNSS Observations for attitude initialization. |
IMU | Use IMU Observations for attitude initialization. |
GNSS | Use GNSS Observations for attitude initialization. |
COUNT | Amount of items in the enum. |
Definition at line 126 of file PosVelAttInitializer.hpp.
|
strongprivate |
Override options for Position.
Enumerator | |
---|---|
OFF | Do not override the values. |
ECEF | Override with ECEF values. |
NED | Override with NED values. |
COUNT | Amount of items in the enum. |
Definition at line 155 of file PosVelAttInitializer.hpp.
NAV::PosVelAttInitializer::PosVelAttInitializer | ( | ) |
Default constructor.
Definition at line 34 of file PosVelAttInitializer.cpp.
|
override |
Destructor.
Definition at line 47 of file PosVelAttInitializer.cpp.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
staticnodiscard |
String representation of the Class Category.
Definition at line 62 of file PosVelAttInitializer.cpp.
|
overrideprivatevirtual |
Deinitialize the node.
Reimplemented from NAV::Node.
Definition at line 492 of file PosVelAttInitializer.cpp.
|
private |
Checks whether all Flags are set and writes logs messages.
Definition at line 542 of file PosVelAttInitializer.cpp.
|
overridevirtual |
ImGui config window which is shown on double click.
Reimplemented from NAV::Node.
Definition at line 67 of file PosVelAttInitializer.cpp.
|
overrideprivatevirtual |
Initialize the node.
Reimplemented from NAV::Node.
Definition at line 466 of file PosVelAttInitializer.cpp.
|
delete |
Copy assignment operator.
|
delete |
Move assignment operator.
|
nodiscardprivate |
Polls the PVA solution if all is set in the GUI.
Definition at line 818 of file PosVelAttInitializer.cpp.
|
private |
Receive Gnss Observations.
[in] | queue | Queue with all the received data messages |
[in] | pinIdx | Index of the pin the data is received on |
Definition at line 677 of file PosVelAttInitializer.cpp.
|
private |
Receive Imu Observations.
[in] | queue | Queue with all the received data messages |
[in] | pinIdx | Index of the pin the data is received on |
Definition at line 615 of file PosVelAttInitializer.cpp.
|
private |
Receive Pos Observations.
[in] | obs | Pos Data |
Definition at line 777 of file PosVelAttInitializer.cpp.
|
private |
Receive PosVelAtt Observations.
[in] | obs | PosVelAtt Data |
Definition at line 793 of file PosVelAttInitializer.cpp.
|
private |
Receive PosVel Observations.
[in] | obs | PosVel Data |
Definition at line 784 of file PosVelAttInitializer.cpp.
|
private |
Receive Ublox Observations.
[in] | obs | Ublox Data |
Definition at line 706 of file PosVelAttInitializer.cpp.
|
overridevirtual |
Restores the node from a json object.
[in] | j | Json object with the node state |
Reimplemented from NAV::Node.
Definition at line 411 of file PosVelAttInitializer.cpp.
|
nodiscardoverridevirtual |
Saves the node into a json object.
Reimplemented from NAV::Node.
Definition at line 389 of file PosVelAttInitializer.cpp.
|
nodiscardoverridevirtual |
String representation of the Class Type.
Implements NAV::Node.
Definition at line 57 of file PosVelAttInitializer.cpp.
|
staticnodiscard |
String representation of the Class Type.
Definition at line 52 of file PosVelAttInitializer.cpp.
|
private |
Add or removes input pins depending on the settings and modifies the output pin.
Definition at line 497 of file PosVelAttInitializer.cpp.
|
friend |
Converts the enum to a string.
[in] | attitudeMode | Enum value to convert into text |
Definition at line 207 of file PosVelAttInitializer.hpp.
|
friend |
Converts the enum to a string.
[in] | velOverride | Enum value to convert into text |
Definition at line 226 of file PosVelAttInitializer.hpp.
|
private |
GUI option to pecify the initialization source for attitude.
Definition at line 140 of file PosVelAttInitializer.hpp.
|
private |
Averaged Attitude (roll, pitch, yaw) in [rad].
Definition at line 182 of file PosVelAttInitializer.hpp.
|
private |
Count of received attitude measurements.
Definition at line 180 of file PosVelAttInitializer.hpp.
|
private |
Position in ECEF coordinates.
Definition at line 199 of file PosVelAttInitializer.hpp.
|
private |
Time in [s] to initialize the state.
Definition at line 120 of file PosVelAttInitializer.hpp.
|
private |
Initialization time.
Definition at line 195 of file PosVelAttInitializer.hpp.
|
private |
Time Format to input the init time with.
Definition at line 192 of file PosVelAttInitializer.hpp.
|
private |
Index of the input pin for GNSS observations.
Definition at line 75 of file PosVelAttInitializer.hpp.
|
private |
Index of the input pin for IMU observations.
Definition at line 73 of file PosVelAttInitializer.hpp.
|
private |
Last position accuracy in [cm] for XYZ or NED.
Definition at line 150 of file PosVelAttInitializer.hpp.
|
private |
Last velocity accuracy in [cm/s] for XYZ or NED.
Definition at line 175 of file PosVelAttInitializer.hpp.
|
private |
Velocity in navigation coordinates.
Definition at line 201 of file PosVelAttInitializer.hpp.
|
private |
Initialized Quaternion body to navigation frame (roll, pitch, yaw)
Definition at line 197 of file PosVelAttInitializer.hpp.
|
private |
Whether the GNSS values should be used or we want to override the values manually.
Definition at line 143 of file PosVelAttInitializer.hpp.
|
private |
Values to override the Position in ECEF coordinates in [m].
Definition at line 145 of file PosVelAttInitializer.hpp.
|
private |
Whether the IMU values should be used or we want to override the values manually.
Definition at line 184 of file PosVelAttInitializer.hpp.
|
private |
Values to override Roll, Pitch and Yaw with in [deg].
Definition at line 186 of file PosVelAttInitializer.hpp.
|
private |
Whether the GNSS values should be used or we want to override the values manually.
Definition at line 169 of file PosVelAttInitializer.hpp.
|
private |
Values to override the Velocity in [m/s].
Definition at line 171 of file PosVelAttInitializer.hpp.
|
private |
Position Accuracy to achieve in [cm].
Definition at line 148 of file PosVelAttInitializer.hpp.
|
private |
Whether the states are initialized (pos, vel, att, messages send)
Definition at line 189 of file PosVelAttInitializer.hpp.
|
private |
Start time of the averaging process.
Definition at line 123 of file PosVelAttInitializer.hpp.
|
private |
Velocity Accuracy to achieve in [cm/s].
Definition at line 173 of file PosVelAttInitializer.hpp.
|
staticconstexprprivate |
Flow (PosVelAtt)
Definition at line 70 of file PosVelAttInitializer.hpp.