0.4.1
Loading...
Searching...
No Matches
NAV::WiFiPositioning Class Reference

Numerically integrates Imu data. More...

Data Structures

struct  Device
 Device struct. More...
 
struct  State
 State estimated by the positioning algorithm. More...
 

Public Member Functions

void guiConfig () override
 ImGui config window which is shown on double click.
 
WiFiPositioningoperator= (const WiFiPositioning &)=delete
 Copy assignment operator.
 
WiFiPositioningoperator= (WiFiPositioning &&)=delete
 Move 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.
 
 WiFiPositioning ()
 Default constructor.
 
 WiFiPositioning (const WiFiPositioning &)=delete
 Copy constructor.
 
 WiFiPositioning (WiFiPositioning &&)=delete
 Move constructor.
 
 ~WiFiPositioning () 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.
 
InputPininputPinFromId (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.
 
Nodeoperator= (const Node &)=delete
 Copy assignment operator.
 
Nodeoperator= (Node &&)=delete
 Move assignment operator.
 
OutputPinoutputPinFromId (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 class  Frame : uint8_t {
  ECEF ,
  LLA
}
 Available Frames. More...
 
enum class  InitCovarianceBiasUnit : uint8_t {
  meter2 ,
  meter
}
 Possible Units for the initial covariance for the bias (standard deviation σ or Variance σ²) More...
 
enum class  InitCovariancePositionUnit : uint8_t {
  meter2 ,
  meter
}
 Possible Units for the initial covariance for the position (standard deviation σ or Variance σ²) More...
 
enum class  InitCovarianceVelocityUnit : uint8_t {
  m2_s2 ,
  m_s
}
 Possible Units for the initial covariance for the velocity (standard deviation σ or Variance σ²) More...
 
enum class  MeasurementNoiseUnit : uint8_t {
  meter2 ,
  meter
}
 Possible Units for the measurement noise (standard deviation σ or Variance σ²) More...
 
enum class  ProcessNoiseUnit : uint8_t {
  meter2 ,
  meter
}
 Possible Units for the process noise (standard deviation σ or Variance σ²) More...
 
enum class  SolutionMode : uint8_t {
  LSQ ,
  KF
}
 Available Solution Modes. More...
 

Private Member Functions

void deinitialize () override
 Deinitialize the node.
 
bool initialize () override
 Initialize the node.
 
void kfSolution ()
 Calculate the position.
 
LeastSquaresResult< Eigen::VectorXd, Eigen::MatrixXd > lsqSolution ()
 Calculate the position using the least squares method.
 
void recvWiFiObs (InputPin::NodeDataQueue &queue, size_t pinIdx)
 Receive Function for the WiFi Observations.
 
void updateNumberOfInputPins ()
 Adds/Deletes Input Pins depending on the variable _nNavInfoPins.
 

Private Attributes

std::vector< double > _deviceBias
 Input of biases.
 
std::vector< std::string > _deviceMacAddresses
 Input of mac addresses.
 
std::vector< Eigen::Vector3d > _devicePositions
 Input of positions.
 
std::vector< Device_devices
 Devices which are used for the positioning.
 
std::vector< double > _deviceScale
 Input of scales.
 
bool _estimateBias
 Selection of whether the bias will be additionally estimated.
 
Frame _frame
 Frame to calculate the position in.
 
double _initCovarianceBias
 GUI selection of the initial covariance diagonal values for bias (standard deviation σ or Variance σ²)
 
InitCovarianceBiasUnit _initCovarianceBiasUnit
 Gui selection for the Unit of the initial covariance for the bias.
 
Eigen::Vector3d _initCovariancePosition
 GUI selection of the initial covariance diagonal values for position (standard deviation σ or Variance σ²)
 
InitCovariancePositionUnit _initCovariancePositionUnit
 Gui selection for the Unit of the initial covariance for the position.
 
Eigen::Vector3d _initCovarianceVelocity
 GUI selection of the initial covariance diagonal values for velocity (standard deviation σ or Variance σ²)
 
InitCovarianceVelocityUnit _initCovarianceVelocityUnit
 Gui selection for the Unit of the initial covariance for the velocity.
 
State _initialState
 Initial state.
 
KalmanFilter _kalmanFilter
 Kalman Filter representation - States: 3xVel, 3xPos, (1xBias) - Measurements: 1xDist.
 
InsTime _lastPredictTime
 Time when the last prediction was triggered.
 
double _measurementNoise
 GUI selection of the process noise (standard deviation σ or Variance σ²)
 
MeasurementNoiseUnit _measurementNoiseUnit
 Gui selection for the Unit of the initial covariance for the position.
 
uint8_t _numMeasurements
 Number of measurements.
 
size_t _numOfDevices
 Number of devices.
 
uint8_t _numStates
 Number of states.
 
size_t _nWifiInputPins
 Amount of wifi input pins.
 
double _processNoise
 GUI selection of the process noise (standard deviation σ or Variance σ²)
 
ProcessNoiseUnit _processNoiseUnit
 Gui selection for the Unit of the initial covariance for the position.
 
SolutionMode _solutionMode
 Solution Mode.
 
State _state
 State estimated by the algorithm.
 
bool _useInitialValues
 Selection of whether the initial values should always be used or those of the last position.
 
bool _weightedSolution
 Selection of whether the solution will be weighted.
 

Static Private Attributes

static constexpr size_t INPUT_PORT_INDEX_WIFI_OBS
 WiFiObs.
 
static constexpr size_t OUTPUT_PORT_INDEX_WIFISOL
 WiFiPositioningSolution.
 

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< InputPininputPins
 List of input pins.
 
Kind kind
 Kind of the Node.
 
std::string name
 Name of the Node.
 
std::vector< OutputPinoutputPins
 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.
 

Detailed Description

Numerically integrates Imu data.

Definition at line 32 of file WiFiPositioning.hpp.

Member Enumeration Documentation

◆ Frame

enum class NAV::WiFiPositioning::Frame : uint8_t
strongprivate

Available Frames.

Enumerator
ECEF 

Earth-Centered Earth-Fixed frame.

LLA 

Latitude-Longitude-Altitude frame.

Definition at line 98 of file WiFiPositioning.hpp.

◆ InitCovarianceBiasUnit

enum class NAV::WiFiPositioning::InitCovarianceBiasUnit : uint8_t
strongprivate

Possible Units for the initial covariance for the bias (standard deviation σ or Variance σ²)

Enumerator
meter2 

Variance [m^2].

meter 

Standard deviation [m].

Definition at line 241 of file WiFiPositioning.hpp.

◆ InitCovariancePositionUnit

enum class NAV::WiFiPositioning::InitCovariancePositionUnit : uint8_t
strongprivate

Possible Units for the initial covariance for the position (standard deviation σ or Variance σ²)

Enumerator
meter2 

Variance NED [m^2, m^2, m^2].

meter 

Standard deviation NED [m, m, m].

Definition at line 213 of file WiFiPositioning.hpp.

◆ InitCovarianceVelocityUnit

enum class NAV::WiFiPositioning::InitCovarianceVelocityUnit : uint8_t
strongprivate

Possible Units for the initial covariance for the velocity (standard deviation σ or Variance σ²)

Enumerator
m2_s2 

Variance [m^2/s^2].

m_s 

Standard deviation [m/s].

Definition at line 227 of file WiFiPositioning.hpp.

◆ MeasurementNoiseUnit

enum class NAV::WiFiPositioning::MeasurementNoiseUnit : uint8_t
strongprivate

Possible Units for the measurement noise (standard deviation σ or Variance σ²)

Enumerator
meter2 

Variance NED [m^2, m^2, m^2].

meter 

Standard deviation NED [m, m, m].

Definition at line 185 of file WiFiPositioning.hpp.

◆ ProcessNoiseUnit

enum class NAV::WiFiPositioning::ProcessNoiseUnit : uint8_t
strongprivate

Possible Units for the process noise (standard deviation σ or Variance σ²)

Enumerator
meter2 

Variance NED [m^2, m^2, m^2].

meter 

Standard deviation NED [m, m, m].

Definition at line 199 of file WiFiPositioning.hpp.

◆ SolutionMode

enum class NAV::WiFiPositioning::SolutionMode : uint8_t
strongprivate

Available Solution Modes.

Enumerator
LSQ 

Least Squares.

KF 

Kalman Filter.

Definition at line 107 of file WiFiPositioning.hpp.

Constructor & Destructor Documentation

◆ WiFiPositioning() [1/3]

NAV::WiFiPositioning::WiFiPositioning ( )

Default constructor.

Definition at line 38 of file WiFiPositioning.cpp.

◆ ~WiFiPositioning()

NAV::WiFiPositioning::~WiFiPositioning ( )
override

Destructor.

Definition at line 51 of file WiFiPositioning.cpp.

◆ WiFiPositioning() [2/3]

NAV::WiFiPositioning::WiFiPositioning ( const WiFiPositioning & )
delete

Copy constructor.

◆ WiFiPositioning() [3/3]

NAV::WiFiPositioning::WiFiPositioning ( WiFiPositioning && )
delete

Move constructor.

Member Function Documentation

◆ category()

std::string NAV::WiFiPositioning::category ( )
staticnodiscard

String representation of the Class Category.

Definition at line 66 of file WiFiPositioning.cpp.

◆ deinitialize()

void NAV::WiFiPositioning::deinitialize ( )
overrideprivatevirtual

Deinitialize the node.

Reimplemented from NAV::Node.

Definition at line 774 of file WiFiPositioning.cpp.

◆ guiConfig()

void NAV::WiFiPositioning::guiConfig ( )
overridevirtual

ImGui config window which is shown on double click.

Attention
Don't forget to set _hasConfig to true in the constructor of the node

Reimplemented from NAV::Node.

Definition at line 71 of file WiFiPositioning.cpp.

◆ initialize()

bool NAV::WiFiPositioning::initialize ( )
overrideprivatevirtual

Initialize the node.

Reimplemented from NAV::Node.

Definition at line 698 of file WiFiPositioning.cpp.

◆ kfSolution()

void NAV::WiFiPositioning::kfSolution ( )
private

Calculate the position.

Definition at line 1011 of file WiFiPositioning.cpp.

◆ lsqSolution()

NAV::LeastSquaresResult< Eigen::VectorXd, Eigen::MatrixXd > NAV::WiFiPositioning::lsqSolution ( )
private

Calculate the position using the least squares method.

Returns
Least Squares solution

Definition at line 895 of file WiFiPositioning.cpp.

◆ operator=() [1/2]

WiFiPositioning & NAV::WiFiPositioning::operator= ( const WiFiPositioning & )
delete

Copy assignment operator.

◆ operator=() [2/2]

WiFiPositioning & NAV::WiFiPositioning::operator= ( WiFiPositioning && )
delete

Move assignment operator.

◆ recvWiFiObs()

void NAV::WiFiPositioning::recvWiFiObs ( InputPin::NodeDataQueue & queue,
size_t pinIdx )
private

Receive Function for the WiFi Observations.

Parameters
[in]queueQueue with all the received data messages
[in]pinIdxIndex of the pin the data is received on

Definition at line 791 of file WiFiPositioning.cpp.

◆ restore()

void NAV::WiFiPositioning::restore ( const json & j)
overridevirtual

Restores the node from a json object.

Parameters
[in]jJson object with the node state

Reimplemented from NAV::Node.

Definition at line 575 of file WiFiPositioning.cpp.

◆ save()

json NAV::WiFiPositioning::save ( ) const
nodiscardoverridevirtual

Saves the node into a json object.

Reimplemented from NAV::Node.

Definition at line 536 of file WiFiPositioning.cpp.

◆ type()

std::string NAV::WiFiPositioning::type ( ) const
nodiscardoverridevirtual

String representation of the Class Type.

Implements NAV::Node.

Definition at line 61 of file WiFiPositioning.cpp.

◆ typeStatic()

std::string NAV::WiFiPositioning::typeStatic ( )
staticnodiscard

String representation of the Class Type.

Definition at line 56 of file WiFiPositioning.cpp.

◆ updateNumberOfInputPins()

void NAV::WiFiPositioning::updateNumberOfInputPins ( )
private

Adds/Deletes Input Pins depending on the variable _nNavInfoPins.

Definition at line 779 of file WiFiPositioning.cpp.

Field Documentation

◆ _deviceBias

std::vector<double> NAV::WiFiPositioning::_deviceBias
private

Input of biases.

Definition at line 148 of file WiFiPositioning.hpp.

◆ _deviceMacAddresses

std::vector<std::string> NAV::WiFiPositioning::_deviceMacAddresses
private

Input of mac addresses.

Definition at line 142 of file WiFiPositioning.hpp.

◆ _devicePositions

std::vector<Eigen::Vector3d> NAV::WiFiPositioning::_devicePositions
private

Input of positions.

Definition at line 145 of file WiFiPositioning.hpp.

◆ _devices

std::vector<Device> NAV::WiFiPositioning::_devices
private

Devices which are used for the positioning.

Definition at line 165 of file WiFiPositioning.hpp.

◆ _deviceScale

std::vector<double> NAV::WiFiPositioning::_deviceScale
private

Input of scales.

Definition at line 151 of file WiFiPositioning.hpp.

◆ _estimateBias

bool NAV::WiFiPositioning::_estimateBias
private

Selection of whether the bias will be additionally estimated.

Definition at line 116 of file WiFiPositioning.hpp.

◆ _frame

Frame NAV::WiFiPositioning::_frame
private

Frame to calculate the position in.

Definition at line 104 of file WiFiPositioning.hpp.

◆ _initCovarianceBias

double NAV::WiFiPositioning::_initCovarianceBias
private

GUI selection of the initial covariance diagonal values for bias (standard deviation σ or Variance σ²)

Definition at line 250 of file WiFiPositioning.hpp.

◆ _initCovarianceBiasUnit

InitCovarianceBiasUnit NAV::WiFiPositioning::_initCovarianceBiasUnit
private

Gui selection for the Unit of the initial covariance for the bias.

Definition at line 247 of file WiFiPositioning.hpp.

◆ _initCovariancePosition

Eigen::Vector3d NAV::WiFiPositioning::_initCovariancePosition
private

GUI selection of the initial covariance diagonal values for position (standard deviation σ or Variance σ²)

Definition at line 222 of file WiFiPositioning.hpp.

◆ _initCovariancePositionUnit

InitCovariancePositionUnit NAV::WiFiPositioning::_initCovariancePositionUnit
private

Gui selection for the Unit of the initial covariance for the position.

Definition at line 219 of file WiFiPositioning.hpp.

◆ _initCovarianceVelocity

Eigen::Vector3d NAV::WiFiPositioning::_initCovarianceVelocity
private

GUI selection of the initial covariance diagonal values for velocity (standard deviation σ or Variance σ²)

Definition at line 236 of file WiFiPositioning.hpp.

◆ _initCovarianceVelocityUnit

InitCovarianceVelocityUnit NAV::WiFiPositioning::_initCovarianceVelocityUnit
private

Gui selection for the Unit of the initial covariance for the velocity.

Definition at line 233 of file WiFiPositioning.hpp.

◆ _initialState

State NAV::WiFiPositioning::_initialState
private

Initial state.

Definition at line 139 of file WiFiPositioning.hpp.

◆ _kalmanFilter

KalmanFilter NAV::WiFiPositioning::_kalmanFilter
private

Kalman Filter representation - States: 3xVel, 3xPos, (1xBias) - Measurements: 1xDist.

Definition at line 79 of file WiFiPositioning.hpp.

◆ _lastPredictTime

InsTime NAV::WiFiPositioning::_lastPredictTime
private

Time when the last prediction was triggered.

Definition at line 168 of file WiFiPositioning.hpp.

◆ _measurementNoise

double NAV::WiFiPositioning::_measurementNoise
private

GUI selection of the process noise (standard deviation σ or Variance σ²)

Definition at line 194 of file WiFiPositioning.hpp.

◆ _measurementNoiseUnit

MeasurementNoiseUnit NAV::WiFiPositioning::_measurementNoiseUnit
private

Gui selection for the Unit of the initial covariance for the position.

Definition at line 191 of file WiFiPositioning.hpp.

◆ _numMeasurements

uint8_t NAV::WiFiPositioning::_numMeasurements
private

Number of measurements.

Definition at line 76 of file WiFiPositioning.hpp.

◆ _numOfDevices

size_t NAV::WiFiPositioning::_numOfDevices
private

Number of devices.

Definition at line 154 of file WiFiPositioning.hpp.

◆ _numStates

uint8_t NAV::WiFiPositioning::_numStates
private

Number of states.

Definition at line 73 of file WiFiPositioning.hpp.

◆ _nWifiInputPins

size_t NAV::WiFiPositioning::_nWifiInputPins
private

Amount of wifi input pins.

Definition at line 90 of file WiFiPositioning.hpp.

◆ _processNoise

double NAV::WiFiPositioning::_processNoise
private

GUI selection of the process noise (standard deviation σ or Variance σ²)

Definition at line 208 of file WiFiPositioning.hpp.

◆ _processNoiseUnit

ProcessNoiseUnit NAV::WiFiPositioning::_processNoiseUnit
private

Gui selection for the Unit of the initial covariance for the position.

Definition at line 205 of file WiFiPositioning.hpp.

◆ _solutionMode

SolutionMode NAV::WiFiPositioning::_solutionMode
private

Solution Mode.

Definition at line 113 of file WiFiPositioning.hpp.

◆ _state

State NAV::WiFiPositioning::_state
private

State estimated by the algorithm.

Definition at line 136 of file WiFiPositioning.hpp.

◆ _useInitialValues

bool NAV::WiFiPositioning::_useInitialValues
private

Selection of whether the initial values should always be used or those of the last position.

Definition at line 122 of file WiFiPositioning.hpp.

◆ _weightedSolution

bool NAV::WiFiPositioning::_weightedSolution
private

Selection of whether the solution will be weighted.

Definition at line 119 of file WiFiPositioning.hpp.

◆ INPUT_PORT_INDEX_WIFI_OBS

size_t NAV::WiFiPositioning::INPUT_PORT_INDEX_WIFI_OBS
staticconstexprprivate

WiFiObs.

Definition at line 69 of file WiFiPositioning.hpp.

◆ OUTPUT_PORT_INDEX_WIFISOL

size_t NAV::WiFiPositioning::OUTPUT_PORT_INDEX_WIFISOL
staticconstexprprivate

WiFiPositioningSolution.

Definition at line 70 of file WiFiPositioning.hpp.


The documentation for this class was generated from the following files: