![]() |
0.4.1
|
Single Point Positioning Algorithm. More...
Public Types | |
enum class | EstimatorType : uint8_t { LeastSquares , WeightedLeastSquares , KalmanFilter , COUNT } |
Possible SPP estimation algorithms. More... | |
enum | ReceiverType : uint8_t { Rover , ReceiverType_COUNT } |
Receiver Types. More... | |
Public Member Functions | |
std::shared_ptr< SppSolution > | calcSppSolution (const std::shared_ptr< const GnssObs > &gnssObs, const std::vector< const GnssNavInfo * > &gnssNavInfos, const std::string &nameId) |
Calculate the SPP solution. | |
EstimatorType | getEstimatorType () const |
Get the Estimator Type. | |
const InsTime & | getLastUpdateTime () const |
Get the last update time. | |
void | reset () |
Reset the algorithm. | |
bool | ShowGuiWidgets (const char *id, float itemWidth, float unitWidth) |
Shows the GUI input to select the options. | |
Data Fields | |
bool | _estimateInterFreqBiases |
Estimate Inter-frequency biases. | |
ObservationEstimator | _obsEstimator |
Observation Estimator. | |
ObservationFilter | _obsFilter |
Observation Filter. | |
Private Types | |
using | Receiver |
Receiver. | |
Private Member Functions | |
void | assignKalmanFilterResult (const KeyedVectorXd< States::StateKeyType > &state, const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > &variance, const std::string &nameId) |
Assigns the result to the receiver variable. | |
void | assignLeastSquaresResult (const KeyedVectorXd< States::StateKeyType > &state, const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > &variance, const Eigen::Vector3d &e_oldPos, size_t nParams, size_t nUniqueDopplerMeas, double dt, const std::string &nameId) |
Assigns the result to the receiver variable. | |
KeyedMatrixXd< Meas::MeasKeyTypes, States::StateKeyType > | calcMatrixH (const std::vector< States::StateKeyType > &stateKeys, const std::vector< Meas::MeasKeyTypes > &measKeys, const Observations &observations, const std::string &nameId) const |
Calculates the measurement sensitivity matrix 𝐇 | |
bool | canCalculateVelocity (size_t nDoppMeas) const |
Checks if the SPP algorithm can calculate the position (always true for Kalman filter) | |
bool | canEstimateInterFrequencyBias () const |
Checks if the SPP algorithm can estimate inter-frequency biases. | |
void | computeDOPs (const std::shared_ptr< SppSolution > &sppSol, const KeyedMatrixXd< Meas::MeasKeyTypes, States::StateKeyType > &H, const std::string &nameId) |
Computes all DOP values (by reference) | |
std::vector< Meas::MeasKeyTypes > | determineMeasKeys (const Observations &observations, size_t nPsrMeas, size_t nDoppMeas, const std::string &nameId) const |
Returns a list of measurement keys. | |
std::vector< States::StateKeyType > | determineStateKeys (const std::set< SatelliteSystem > &usedSatSystems, size_t nDoppMeas, const std::string &nameId) const |
Returns a list of state keys. | |
void | updateInterFrequencyBiases (const Observations &observations, const std::string &nameId) |
Updates the inter frequency biases. | |
Static Private Member Functions | |
static KeyedMatrixXd< Meas::MeasKeyTypes, Meas::MeasKeyTypes > | calcMatrixR (const std::vector< Meas::MeasKeyTypes > &measKeys, const Observations &observations, const std::string &nameId) |
Calculates the measurement noise covariance matrix 𝐑 | |
static KeyedVectorXd< Meas::MeasKeyTypes > | calcMeasInnovation (const std::vector< Meas::MeasKeyTypes > &measKeys, const Observations &observations, const std::string &nameId) |
Calculates the measurement innovation vector 𝜹𝐳 | |
Private Attributes | |
Eigen::Matrix3d | _e_lastPositionCovarianceMatrix |
Last position covariance matrix. | |
Eigen::Matrix3d | _e_lastVelocityCovarianceMatrix |
Last velocity covariance matrix. | |
EstimatorType | _estimatorType |
Estimator type used for the calculations. | |
SPP::KalmanFilter | _kalmanFilter |
SPP specific Kalman filter. | |
InsTime | _lastUpdate |
Time of last update. | |
Receiver | _receiver |
Receiver. | |
const std::array< SPP::States::StateKeyType, 3 > & | PosKey |
All position keys. | |
const std::array< SPP::States::StateKeyType, 6 > & | PosVelKey |
All position and velocity keys. | |
const std::array< SPP::States::StateKeyType, 3 > & | VelKey |
All velocity keys. | |
Friends | |
void | from_json (const json &j, Algorithm &obj) |
Converts the provided json object into a node object. | |
void | to_json (json &j, const Algorithm &obj) |
Converts the provided object into json. | |
Single Point Positioning Algorithm.
Definition at line 37 of file Algorithm.hpp.
|
private |
Definition at line 92 of file Algorithm.hpp.
|
strong |
Possible SPP estimation algorithms.
Enumerator | |
---|---|
LeastSquares | Linear Least Squares. |
WeightedLeastSquares | Weighted Linear Least Squares. |
KalmanFilter | Kalman Filter. |
COUNT | Amount of items in the enum. |
Definition at line 41 of file Algorithm.hpp.
enum NAV::SPP::Algorithm::ReceiverType : uint8_t |
Receiver Types.
Enumerator | |
---|---|
Rover | Rover. |
ReceiverType_COUNT | Amount of receiver types. |
Definition at line 50 of file Algorithm.hpp.
|
private |
Assigns the result to the receiver variable.
state | Total state | |
variance | Variance of the state | |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 695 of file Algorithm.cpp.
|
private |
Assigns the result to the receiver variable.
[in] | state | Delta state |
[in] | variance | Variance of the state |
[in] | e_oldPos | Old position in ECEF coordinates in [m] |
[in] | nParams | Number of parameters to estimate the position |
[in] | nUniqueDopplerMeas | Number of available doppler measurements (unique per satellite) |
[in] | dt | Time step size in [s] |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 593 of file Algorithm.cpp.
|
nodiscardprivate |
Calculates the measurement sensitivity matrix 𝐇
[in] | stateKeys | State Keys |
[in] | measKeys | Measurement Keys |
[in] | observations | List of GNSS observation data used for the calculation |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 485 of file Algorithm.cpp.
|
staticnodiscardprivate |
Calculates the measurement noise covariance matrix 𝐑
[in] | measKeys | Measurement Keys |
[in] | observations | List of GNSS observation data used for the calculation |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 529 of file Algorithm.cpp.
|
staticnodiscardprivate |
Calculates the measurement innovation vector 𝜹𝐳
[in] | measKeys | Measurement Keys |
[in] | observations | List of GNSS observation data used for the calculation |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 562 of file Algorithm.cpp.
std::shared_ptr< SppSolution > NAV::SPP::Algorithm::calcSppSolution | ( | const std::shared_ptr< const GnssObs > & | gnssObs, |
const std::vector< const GnssNavInfo * > & | gnssNavInfos, | ||
const std::string & | nameId ) |
Calculate the SPP solution.
[in] | gnssObs | GNSS observation |
[in] | gnssNavInfos | Collection of GNSS Nav information |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 73 of file Algorithm.cpp.
|
nodiscardprivate |
Checks if the SPP algorithm can calculate the position (always true for Kalman filter)
[in] | nDoppMeas | Amount of Doppler measurements |
Definition at line 378 of file Algorithm.cpp.
|
nodiscardprivate |
Checks if the SPP algorithm can estimate inter-frequency biases.
Definition at line 385 of file Algorithm.cpp.
|
private |
Computes all DOP values (by reference)
[in,out] | sppSol | SppSol to fill with DOP values |
[in] | H | Measurement sensitivity matrix 𝐇 |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 769 of file Algorithm.cpp.
|
private |
Returns a list of measurement keys.
[in] | observations | List of GNSS observation data used for the calculation |
[in] | nPsrMeas | Amount of pseudo-range measurements |
[in] | nDoppMeas | Amount of doppler measurements |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 455 of file Algorithm.cpp.
|
private |
Returns a list of state keys.
[in] | usedSatSystems | Used Satellite systems this epoch |
[in] | nDoppMeas | Amount of Doppler measurements |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 421 of file Algorithm.cpp.
|
inlinenodiscard |
Get the Estimator Type.
Definition at line 66 of file Algorithm.hpp.
|
inline |
Get the last update time.
Definition at line 69 of file Algorithm.hpp.
void NAV::SPP::Algorithm::reset | ( | ) |
Reset the algorithm.
Definition at line 65 of file Algorithm.cpp.
bool NAV::SPP::Algorithm::ShowGuiWidgets | ( | const char * | id, |
float | itemWidth, | ||
float | unitWidth ) |
Shows the GUI input to select the options.
[in] | id | Unique id for ImGui. |
[in] | itemWidth | Width of the widgets |
[in] | unitWidth | Width on unit inputs |
Definition at line 40 of file Algorithm.cpp.
|
private |
Updates the inter frequency biases.
[in] | observations | List of GNSS observation data used for the calculation |
[in] | nameId | Name and id of the node calling this (only used for logging purposes) |
Definition at line 396 of file Algorithm.cpp.
Converts the provided json object into a node object.
[in] | j | Json object with the needed values |
[out] | obj | Object to fill from the json |
Definition at line 806 of file Algorithm.cpp.
Converts the provided object into json.
[out] | j | Json object which gets filled with the info |
[in] | obj | Object to convert into json |
Definition at line 793 of file Algorithm.cpp.
|
private |
Last position covariance matrix.
Definition at line 196 of file Algorithm.hpp.
|
private |
Last velocity covariance matrix.
Definition at line 197 of file Algorithm.hpp.
bool NAV::SPP::Algorithm::_estimateInterFreqBiases |
Estimate Inter-frequency biases.
Definition at line 89 of file Algorithm.hpp.
|
private |
Estimator type used for the calculations.
Definition at line 188 of file Algorithm.hpp.
|
private |
SPP specific Kalman filter.
Definition at line 191 of file Algorithm.hpp.
|
private |
Time of last update.
Definition at line 194 of file Algorithm.hpp.
ObservationEstimator NAV::SPP::Algorithm::_obsEstimator |
Observation Estimator.
Definition at line 86 of file Algorithm.hpp.
ObservationFilter NAV::SPP::Algorithm::_obsFilter |
Observation Filter.
Definition at line 81 of file Algorithm.hpp.
|
private |
Definition at line 185 of file Algorithm.hpp.
|
private |
All position keys.
Definition at line 95 of file Algorithm.hpp.
|
private |
All position and velocity keys.
Definition at line 99 of file Algorithm.hpp.
|
private |
All velocity keys.
Definition at line 97 of file Algorithm.hpp.