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)
90 cov << std::pow(sdXYZ->x(), 2), *sdxy, -(*sdzx),
91 -(*sdxy), std::pow(sdXYZ->y(), 2), *sdyz,
92 *sdzx, -(*sdyz), std::pow(sdXYZ->z(), 2);
99 cov << std::pow(sdNED->x(), 2), *sdne, -(*sddn),
100 -(*sdne), std::pow(sdNED->y(), 2), *sded,
101 *sddn, -(*sded), std::pow(sdNED->z(), 2);
108 if (
e_velocity && sdvXYZ && sdvxy && sdvzx && sdvyz)
111 cov << std::pow(sdvXYZ->x(), 2), *sdvxy, -(*sdvzx),
112 -(*sdvxy), std::pow(sdvXYZ->y(), 2), *sdvyz,
113 *sdvzx, -(*sdvyz), std::pow(sdvXYZ->z(), 2);
116 else if (
n_velocity && sdvNED && sdvne && sdvdn && sdved)
119 cov << std::pow(sdvNED->x(), 2), *sdvne, -(*sdvdn),
120 -(*sdvne), std::pow(sdvNED->y(), 2), *sdved,
121 *sdvdn, -(*sdved), std::pow(sdvNED->z(), 2);
131 [[nodiscard]]
static std::string
type()
133 return "RtklibPosObs";
150 desc.emplace_back(
"Q [-]");
151 desc.emplace_back(
"ns [-]");
152 desc.emplace_back(
"age [s]");
153 desc.emplace_back(
"ratio [-]");
170 [[nodiscard]] std::optional<double>
getValueAt(
size_t idx)
const override
234 double age = std::nan(
"");
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
Position, Velocity and Attitude Storage Class.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
InsTime insTime
Time at which the message was received.
Definition NodeData.hpp:89
Position, Velocity and Attitude Storage Class.
Definition PosVel.hpp:23
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition PosVel.hpp:34
void setVelocityAndStdDev_e(const Eigen::Vector3d &e_velocity, const Eigen::Matrix3d &e_velocityCovarianceMatrix)
Set the Velocity in ECEF coordinates and its standard deviation.
Definition PosVel.hpp:233
const Eigen::Vector3d & n_velocity() const
Returns the velocity in [m/s], in navigation coordinates.
Definition PosVel.hpp:196
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition PosVel.hpp:42
void setVelocity_e(const Eigen::Vector3d &e_velocity)
Set the Velocity in the earth frame.
Definition PosVel.hpp:216
static std::string type()
Returns the type of the data class.
Definition PosVel.hpp:27
void setVelocity_n(const Eigen::Vector3d &n_velocity)
Set the Velocity in the NED frame.
Definition PosVel.hpp:224
const Eigen::Vector3d & e_velocity() const
Returns the velocity in [m/s], in earth coordinates.
Definition PosVel.hpp:193
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition PosVel.hpp:80
void setVelocityAndStdDev_n(const Eigen::Vector3d &n_velocity, const Eigen::Matrix3d &n_velocityCovarianceMatrix)
Set the Velocity in NED coordinates and its standard deviation.
Definition PosVel.hpp:243
void setPositionAndStdDev_e(const Eigen::Vector3d &e_position, const Eigen::Matrix3d &e_positionCovarianceMatrix)
Set the Position in ECEF coordinates and its standard deviation.
Definition Pos.hpp:237
void setPosCovarianceMatrix_n(const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the Covariance matrix in ECEF coordinates.
Definition Pos.hpp:277
void setPositionAndStdDev_lla(const Eigen::Vector3d &lla_position, const Eigen::Matrix3d &n_positionCovarianceMatrix)
Set the Position in LLA coordinates and its standard deviation.
Definition Pos.hpp:247
const Eigen::Vector3d & e_position() const
Returns the coordinates in [m].
Definition Pos.hpp:200
const Eigen::Vector3d & lla_position() const
Returns the latitude 𝜙, longitude λ and altitude (height above ground) in [rad, rad,...
Definition Pos.hpp:188
void setPosition_e(const Eigen::Vector3d &e_position)
Set the Position in coordinates.
Definition Pos.hpp:220
void setPosition_lla(const Eigen::Vector3d &lla_position)
Set the Position lla object.
Definition Pos.hpp:228
void setPosCovarianceMatrix_e(const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the Covariance matrix in ECEF coordinates.
Definition Pos.hpp:258
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:230
double ratio
Ratio.
Definition RtklibPosObs.hpp:236
double age
Age [s].
Definition RtklibPosObs.hpp:234
static std::string type()
Returns the type of the data class.
Definition RtklibPosObs.hpp:131
uint8_t ns
Number of satellites.
Definition RtklibPosObs.hpp:232
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition RtklibPosObs.hpp:159
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition RtklibPosObs.hpp:146
size_t staticDescriptorCount() const override
Get the amount of descriptors.
Definition RtklibPosObs.hpp:165
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition RtklibPosObs.hpp:138
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
Definition RtklibPosObs.hpp:162
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition RtklibPosObs.hpp:170