18#include "Navigation/Transformations/Units.hpp"
63 std::optional<Eigen::Vector3d> sdXYZ,
64 std::optional<Eigen::Vector3d> sdNED,
65 std::optional<double> sdxy,
66 std::optional<double> sdyz,
67 std::optional<double> sdzx,
68 std::optional<double> sdne,
69 std::optional<double> sded,
70 std::optional<double> sddn,
73 std::optional<Eigen::Vector3d> sdvNED,
74 std::optional<double> sdvne,
75 std::optional<double> sdved,
76 std::optional<double> sdvdn,
77 std::optional<Eigen::Vector3d> sdvXYZ,
78 std::optional<double> sdvxy,
79 std::optional<double> sdvyz,
80 std::optional<double> sdvzx)
87 if (
e_position && sdXYZ && sdxy && sdzx && sdyz)
89 Eigen::Matrix3d covPos;
90 covPos << std::pow(sdXYZ->x(), 2), *sdxy, -(*sdzx),
91 -(*sdxy), std::pow(sdXYZ->y(), 2), *sdyz,
92 *sdzx, -(*sdyz), std::pow(sdXYZ->z(), 2);
93 if (
e_velocity && sdvXYZ && sdvxy && sdvzx && sdvyz)
96 cov.topLeftCorner<3, 3>() = covPos;
97 cov.bottomRightCorner<3, 3>() << std::pow(sdvXYZ->x(), 2), *sdvxy, -(*sdvzx),
98 -(*sdvxy), std::pow(sdvXYZ->y(), 2), *sdvyz,
99 *sdvzx, -(*sdvyz), std::pow(sdvXYZ->z(), 2);
110 Eigen::Matrix3d covPos;
111 covPos << std::pow(sdNED->x(), 2), *sdne, -(*sddn),
112 -(*sdne), std::pow(sdNED->y(), 2), *sded,
113 *sddn, -(*sded), std::pow(sdNED->z(), 2);
115 if (
n_velocity && sdvNED && sdvne && sdvdn && sdved)
118 cov.topLeftCorner<3, 3>() = covPos;
119 cov.bottomRightCorner<3, 3>() << std::pow(sdvNED->x(), 2), *sdvne, -(*sdvdn),
120 -(*sdvne), std::pow(sdvNED->y(), 2), *sdved,
121 *sdvdn, -(*sdved), std::pow(sdvNED->z(), 2);
139 [[nodiscard]]
static std::string
type()
141 return "RtklibPosObs";
146 [[nodiscard]] std::string
getType()
const override {
return type(); }
162 desc.emplace_back(
"Q [-]");
163 desc.emplace_back(
"ns [-]");
164 desc.emplace_back(
"age [s]");
165 desc.emplace_back(
"ratio [-]");
182 [[nodiscard]] std::optional<double>
getValueAt(
size_t idx)
const override
207 double age = std::nan(
"");
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
Matrix< double, 6, 6 > Matrix6d
Double 6x6 Eigen::Matrix.
Definition Eigen.hpp:37
Position and Velocity Storage Class.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
InsTime insTime
Time at which the message was received.
Definition NodeData.hpp:123
Position and Velocity Storage Class.
Definition PosVel.hpp:23
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition PosVel.hpp:73
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition PosVel.hpp:38
const Eigen::Vector3d & n_velocity() const
Returns the velocity in [m/s], in navigation coordinates.
Definition PosVel.hpp:211
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition PosVel.hpp:46
static std::string type()
Returns the type of the data class.
Definition PosVel.hpp:27
const Eigen::Vector3d & e_velocity() const
Returns the velocity in [m/s], in earth coordinates.
Definition PosVel.hpp:208
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition PosVel.hpp:84
void setPosVelAndCov_n(const Eigen::MatrixBase< DerivedP > &lla_position, const Eigen::MatrixBase< DerivedV > &n_velocity, const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the position, velocity and the covariance matrix.
Definition PosVel.hpp:293
void setVelocity_n(const Eigen::MatrixBase< Derived > &n_velocity)
Set the Velocity in the NED frame.
Definition PosVel.hpp:249
void setVelocity_e(const Eigen::MatrixBase< Derived > &e_velocity)
Set the Velocity in the earth frame.
Definition PosVel.hpp:240
void setPosVelAndCov_e(const Eigen::MatrixBase< DerivedP > &e_position, const Eigen::MatrixBase< DerivedV > &e_velocity, const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the position, velocity and the covariance matrix.
Definition PosVel.hpp:280
void setPositionAndCov_n(const Eigen::MatrixBase< DerivedP > &lla_position, const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the position and the covariance matrix.
Definition Pos.hpp:313
const Eigen::Vector3d & e_position() const
Returns the coordinates in [m].
Definition Pos.hpp:249
void setPositionAndCov_e(const Eigen::MatrixBase< DerivedP > &e_position, const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the position and the covariance matrix.
Definition Pos.hpp:303
void setPosition_e(const Eigen::MatrixBase< Derived > &e_position)
Set the Position in coordinates.
Definition Pos.hpp:284
const Eigen::Vector3d & lla_position() const
Returns the latitude 𝜙, longitude λ and altitude (height above ground) in [rad, rad,...
Definition Pos.hpp:237
void setPosition_lla(const Eigen::MatrixBase< Derived > &lla_position)
Set the Position lla object.
Definition Pos.hpp:293
RTKLIB Observation Class.
Definition RtklibPosObs.hpp:24
uint8_t Q
1:fix, 2:float, 3:sbas, 4:dgps, 5:single, 6:ppp
Definition RtklibPosObs.hpp:203
double ratio
Ratio.
Definition RtklibPosObs.hpp:209
double age
Age [s].
Definition RtklibPosObs.hpp:207
std::string getType() const override
Returns the type of the data class.
Definition RtklibPosObs.hpp:146
static std::string type()
Returns the type of the data class.
Definition RtklibPosObs.hpp:139
uint8_t ns
Number of satellites.
Definition RtklibPosObs.hpp:205
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition RtklibPosObs.hpp:171
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition RtklibPosObs.hpp:158
size_t staticDescriptorCount() const override
Get the amount of descriptors.
Definition RtklibPosObs.hpp:177
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition RtklibPosObs.hpp:150
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
Definition RtklibPosObs.hpp:174
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition RtklibPosObs.hpp:182