![]() |
0.5.0
|
Computes Allan Deviation of IMU Observations. More...
Data Structures | |
| struct | Sensor |
| Data for each sensor. More... | |
Public Member Functions | |
| AllanDeviation () | |
| Default constructor. | |
| AllanDeviation (AllanDeviation &&)=delete | |
| Move constructor. | |
| AllanDeviation (const AllanDeviation &)=delete | |
| Copy constructor. | |
| void | guiConfig () override |
| ImGui config window which is shown on double click. | |
| AllanDeviation & | operator= (AllanDeviation &&)=delete |
| Move assignment operator. | |
| AllanDeviation & | operator= (const AllanDeviation &)=delete |
| Copy assignment operator. | |
| 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. | |
| ~AllanDeviation () override | |
| Destructor. | |
| Public Member Functions inherited from NAV::Node | |
| 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 Public Member Functions inherited from NAV::Node | |
| static std::string | toString (State state) |
| Converts the state into a printable text. | |
Private Types | |
| enum | SensorType : uint8_t { Accel , Gyro , SensorType_COUNT } |
| Sensor types. More... | |
Private Member Functions | |
| void | deinitialize () override |
| Deinitialize the node. | |
| bool | initialize () override |
| Initialize the node. | |
| void | receiveImuObs (InputPin::NodeDataQueue &queue, size_t pinIdx) |
| Receive Sensor Data. | |
Static Private Member Functions | |
| static const char * | to_string (SensorType sensorType) |
| Returns a string representation of the type. | |
| static const char * | unitString (SensorType sensorType) |
| Returns a string for the unit of the type. | |
Private Attributes | |
| std::vector< double > | _averagingFactors |
| averaging factors (n) used for Allan Variance computation | |
| double | _averagingFactorsPerDecade |
| number of averaging factors per decade | |
| std::vector< double > | _averagingTimes |
| averaging times (τ) | |
| float | _confidenceFillAlpha |
| The alpha value for the shaded plot of the confidence intervals. | |
| std::vector< double > | _confidenceMultiplicationFactor |
| multiplication factor for simple confidence | |
| bool | _displayConfidence |
| Flag wether to display confidence intervals. | |
| unsigned int | _imuObsCount |
| number of IMU observations / length of cumulative sums | |
| unsigned int | _nextAveragingFactor |
| next averaging factor to be appended to _averagingFactors | |
| unsigned int | _nextAveragingFactorExponent |
| exponent of next averaging factor | |
| std::vector< double > | _observationCount |
| number of observations for each τ | |
| double | _samplingInterval |
| sampling interval | |
| std::array< Sensor, SensorType_COUNT > | _sensors |
| Sensor data. | |
| InsTime | _startingInsTime |
| Time of first epoch received. | |
| bool | _updateLast |
| Flag wether to update the plot for each message or once at the end. | |
Static Private Attributes | |
| static constexpr size_t | INPUT_PORT_INDEX_IMU_OBS |
| Flow (ImuObs) | |
Additional Inherited Members | |
| Public Types inherited from NAV::Node | |
| 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... | |
| Data Fields inherited from NAV::Node | |
| 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) | |
| Protected Attributes inherited from NAV::Node | |
| 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. | |
Computes Allan Deviation of IMU Observations.
Definition at line 28 of file AllanDeviation.hpp.
|
private |
Sensor types.
| Enumerator | |
|---|---|
| Accel | Accelerometer. |
| Gyro | Gyroscope. |
| SensorType_COUNT | Amount of sensors to use. |
Definition at line 81 of file AllanDeviation.hpp.
| NAV::AllanDeviation::AllanDeviation | ( | ) |
Default constructor.
Definition at line 34 of file AllanDeviation.cpp.
|
override |
Destructor.
Definition at line 46 of file AllanDeviation.cpp.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
staticnodiscard |
String representation of the Class Category.
Definition at line 61 of file AllanDeviation.cpp.
|
overrideprivatevirtual |
Deinitialize the node.
Reimplemented from NAV::Node.
Definition at line 198 of file AllanDeviation.cpp.
|
overridevirtual |
ImGui config window which is shown on double click.
Reimplemented from NAV::Node.
Definition at line 66 of file AllanDeviation.cpp.
|
overrideprivatevirtual |
Initialize the node.
Reimplemented from NAV::Node.
Definition at line 168 of file AllanDeviation.cpp.
|
delete |
Move assignment operator.
|
delete |
Copy assignment operator.
|
private |
Receive Sensor Data.
| [in] | queue | Queue with all the received data messages |
| [in] | pinIdx | Index of the pin the data is received on |
Definition at line 203 of file AllanDeviation.cpp.
|
overridevirtual |
Restores the node from a json object.
| [in] | j | Json object with the node state |
Reimplemented from NAV::Node.
Definition at line 159 of file AllanDeviation.cpp.
|
nodiscardoverridevirtual |
Saves the node into a json object.
Reimplemented from NAV::Node.
Definition at line 148 of file AllanDeviation.cpp.
|
staticprivate |
Returns a string representation of the type.
| [in] | sensorType | Sensor Type |
Definition at line 330 of file AllanDeviation.cpp.
|
nodiscardoverridevirtual |
String representation of the Class Type.
Implements NAV::Node.
Definition at line 56 of file AllanDeviation.cpp.
|
staticnodiscard |
String representation of the Class Type.
Definition at line 51 of file AllanDeviation.cpp.
|
staticprivate |
Returns a string for the unit of the type.
| [in] | sensorType | Sensor Type |
Definition at line 344 of file AllanDeviation.cpp.
|
private |
averaging factors (n) used for Allan Variance computation
Definition at line 123 of file AllanDeviation.hpp.
|
private |
number of averaging factors per decade
Definition at line 135 of file AllanDeviation.hpp.
|
private |
averaging times (τ)
Definition at line 126 of file AllanDeviation.hpp.
|
private |
The alpha value for the shaded plot of the confidence intervals.
Definition at line 149 of file AllanDeviation.hpp.
|
private |
multiplication factor for simple confidence
Definition at line 144 of file AllanDeviation.hpp.
|
private |
Flag wether to display confidence intervals.
Definition at line 147 of file AllanDeviation.hpp.
|
private |
number of IMU observations / length of cumulative sums
Definition at line 132 of file AllanDeviation.hpp.
|
private |
next averaging factor to be appended to _averagingFactors
Definition at line 138 of file AllanDeviation.hpp.
|
private |
exponent of next averaging factor
Definition at line 141 of file AllanDeviation.hpp.
|
private |
number of observations for each τ
Definition at line 129 of file AllanDeviation.hpp.
|
private |
sampling interval
Definition at line 117 of file AllanDeviation.hpp.
|
private |
Sensor data.
Definition at line 114 of file AllanDeviation.hpp.
|
private |
Time of first epoch received.
Definition at line 120 of file AllanDeviation.hpp.
|
private |
Flag wether to update the plot for each message or once at the end.
Definition at line 151 of file AllanDeviation.hpp.
|
staticconstexprprivate |
Flow (ImuObs)
Definition at line 65 of file AllanDeviation.hpp.