2#include <NDEVR/Vertex.h>
5#pragma warning( disable : 4127)
7#include <Eigen/Geometry>
17 GlobalPosition(
int id,
double timestamp)
18 : timestamp(timestamp)
23 virtual ~GlobalPosition() {}
24 virtual Eigen::Vector3d getRelativeFromOrigin(
const GlobalPosition& origin)
const = 0;
25 virtual Eigen::MatrixXd getCovariance()
const = 0;
29 class GpsMeasurement :
public GlobalPosition
33 GpsMeasurement(
const int id,
const double& latitude,
const double& longitude,
const double& altitude,
const double& timestamp,
const Eigen::Matrix3d& covariance,
const Eigen::Vector3d noise = Eigen::Vector3d(0., 0., 0.)) :
34 GlobalPosition(id, timestamp), lat_lon_location(latitude, longitude, altitude), noise(noise), covariance(covariance) {}
35 Vertex<3, fltp08> lat_lon_location;
36 Eigen::Vector3d noise;
37 Eigen::Matrix3d covariance;
39 Eigen::Vector3d getRelativeFromOrigin(
const GlobalPosition& origin)
const override;
40 Eigen::MatrixXd getCovariance()
const override;
44 class MocapMeasurement :
public GlobalPosition
48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
51 MocapMeasurement(
const int id,
52 const double& x,
const double& y,
const double& z,
53 const double& qx,
const double& qy,
const double& qz,
54 const double& qw,
const double& timestamp,
55 const Eigen::Matrix3d& covariance,
56 const Eigen::Vector3d noise = Eigen::Vector3d(0., 0., 0.))
57 : GlobalPosition(id, timestamp)
59 , covariance(covariance)
61 position = Eigen::Vector3d(x, y, z);
62 rotation = Eigen::Quaterniond(qw, qx, qy, qz);
64 Eigen::Vector3d position;
65 Eigen::Quaterniond rotation;
66 Eigen::Vector3d noise;
67 Eigen::Matrix3d covariance;
68 Eigen::Vector3d getRelativeFromOrigin(
const GlobalPosition& origin)
const override;
69 Eigen::MatrixXd getCovariance()
const override;
74 GPSCalib(
const Eigen::Vector3f& tbg)