16#include <fmt/format.h>
76 std::shared_ptr<SppSolution>
calcSppSolution(
const std::shared_ptr<const GnssObs>& gnssObs,
77 const std::vector<const GnssNavInfo*>& gnssNavInfos,
78 const std::string& nameId);
117 std::vector<States::StateKeyType>
determineStateKeys(
const std::set<SatelliteSystem>& usedSatSystems,
size_t nDoppMeas,
const std::string& nameId)
const;
133 const std::vector<Meas::MeasKeyTypes>& measKeys,
135 const std::string& nameId)
const;
144 const std::string& nameId);
153 const std::string& nameId);
165 const Eigen::Vector3d& e_oldPos,
166 size_t nParams,
size_t nUniqueDopplerMeas,
double dt,
const std::string& nameId);
174 const std::string& nameId);
182 const std::string& nameId);
238#ifndef DOXYGEN_IGNORE
242struct fmt::formatter<NAV::SPP::Algorithm::EstimatorType> : fmt::formatter<const char*>
248 template<
typename FormatContext>
251 return fmt::formatter<const char*>::format(
NAV::to_string(type), ctx);
257struct fmt::formatter<NAV::SPP::Algorithm::ReceiverType> : fmt::formatter<const char*>
263 template<
typename FormatContext>
266 return fmt::formatter<const char*>::format(NAV::to_string(type), ctx);
std::ostream & operator<<(std::ostream &os, const NAV::SPP::Algorithm::EstimatorType &obj)
Stream insertion operator overload.
void to_json(json &j, const Algorithm &obj)
Converts the provided object into json.
void from_json(const json &j, Algorithm &obj)
Converts the provided json object into a node object.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Keys for the SPP algorithm for use inside the KeyedMatrices.
GNSS Observation messages.
constexpr std::array< StateKeyType, 3 > Pos
All position keys.
Definition MotionModel.hpp:56
constexpr std::array< StateKeyType, 6 > PosVel
Vector with all position and velocity keys.
Definition MotionModel.hpp:66
constexpr std::array< StateKeyType, 3 > Vel
All velocity keys.
Definition MotionModel.hpp:59
Calculates Observation estimates.
Observation data used for calculations.
@ Doppler
Doppler (Pseudorange rate)
Definition GnssObs.hpp:40
@ Pseudorange
Pseudorange.
Definition GnssObs.hpp:38
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
Calculates Observation estimates.
Definition ObservationEstimator.hpp:55
Observation Filter.
Definition ObservationFilter.hpp:53
Single Point Positioning Algorithm.
Definition Algorithm.hpp:38
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 𝐇
std::vector< States::StateKeyType > determineStateKeys(const std::set< SatelliteSystem > &usedSatSystems, size_t nDoppMeas, const std::string &nameId) const
Returns a list of state keys.
friend void to_json(json &j, const Algorithm &obj)
Converts the provided object into json.
Receiver _receiver
Receiver.
Definition Algorithm.hpp:185
bool canEstimateInterFrequencyBias() const
Checks if the SPP algorithm can estimate inter-frequency biases.
void reset()
Reset the algorithm.
NAV::Receiver< ReceiverType > Receiver
Receiver.
Definition Algorithm.hpp:92
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)
void updateInterFrequencyBiases(const Observations &observations, const std::string &nameId)
Updates the inter frequency biases.
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.
Eigen::Matrix3d _e_lastPositionCovarianceMatrix
Last position covariance matrix.
Definition Algorithm.hpp:196
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.
ObservationFilter _obsFilter
Observation Filter.
Definition Algorithm.hpp:81
friend void from_json(const json &j, Algorithm &obj)
Converts the provided json object into a node object.
static KeyedVectorXd< Meas::MeasKeyTypes > calcMeasInnovation(const std::vector< Meas::MeasKeyTypes > &measKeys, const Observations &observations, const std::string &nameId)
Calculates the measurement innovation vector 𝜹𝐳
InsTime _lastUpdate
Time of last update.
Definition Algorithm.hpp:194
bool _estimateInterFreqBiases
Estimate Inter-frequency biases.
Definition Algorithm.hpp:89
const InsTime & getLastUpdateTime() const
Get the last update time.
Definition Algorithm.hpp:69
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.
const std::array< SPP::States::StateKeyType, 3 > & PosKey
All position keys.
Definition Algorithm.hpp:95
EstimatorType getEstimatorType() const
Get the Estimator Type.
Definition Algorithm.hpp:66
bool canCalculateVelocity(size_t nDoppMeas) const
Checks if the SPP algorithm can calculate the position (always true for Kalman filter)
const std::array< SPP::States::StateKeyType, 6 > & PosVelKey
All position and velocity keys.
Definition Algorithm.hpp:99
SPP::KalmanFilter _kalmanFilter
SPP specific Kalman filter.
Definition Algorithm.hpp:191
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.
ObservationEstimator _obsEstimator
Observation Estimator.
Definition Algorithm.hpp:86
EstimatorType
Possible SPP estimation algorithms.
Definition Algorithm.hpp:42
@ WeightedLeastSquares
Weighted Linear Least Squares.
Definition Algorithm.hpp:44
@ COUNT
Amount of items in the enum.
Definition Algorithm.hpp:46
@ KalmanFilter
Kalman Filter.
Definition Algorithm.hpp:45
@ LeastSquares
Linear Least Squares.
Definition Algorithm.hpp:43
const std::array< SPP::States::StateKeyType, 3 > & VelKey
All velocity keys.
Definition Algorithm.hpp:97
ReceiverType
Receiver Types.
Definition Algorithm.hpp:51
@ ReceiverType_COUNT
Amount of receiver types.
Definition Algorithm.hpp:53
@ Rover
Rover.
Definition Algorithm.hpp:52
EstimatorType _estimatorType
Estimator type used for the calculations.
Definition Algorithm.hpp:188
Eigen::Matrix3d _e_lastVelocityCovarianceMatrix
Last velocity covariance matrix.
Definition Algorithm.hpp:197
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 𝐑
bool ShowGuiWidgets(const char *id, float itemWidth, float unitWidth)
Shows the GUI input to select the options.
The Spp Kalman Filter related options.
Definition KalmanFilter.hpp:38
Observation storage type.
Definition Observation.hpp:41
Receiver information.
Definition Receiver.hpp:34
KeyedVectorX< double, RowKeyType > KeyedVectorXd
Dynamic size KeyedVector with double types.
Definition KeyedMatrix.hpp:2348
KeyedMatrixX< double, RowKeyType, ColKeyType > KeyedMatrixXd
Dynamic size KeyedMatrix with double types.
Definition KeyedMatrix.hpp:2313