LocalGuidance
A library that generates velocity references to follow a path.
robot_utils::GNSS Class Reference

#include <GNSS.hpp>

Public Member Functions

 GNSS ()
 
virtual ~GNSS ()
 
void setReference (const double &referenceLatitude, const double &referenceLongitude, const double &referenceAltitude, const double &referenceHeading)
 
Eigen::Vector3d gpsToCartesian (const double &latitudeInDegrees, const double &longitudeInDegrees, const double &altitude)
 
Eigen::Vector3d cartesianToGps (const Eigen::Matrix< double, 3, 1 > position)
 
Eigen::Vector3d besselEllipsoidToMercator (const double &latitudeInRad, const double &longitudeInRad, const double &altitude)
 
void setMercatorReferenceFrame (const Eigen::Vector3d newReferencePoint)
 

Protected Member Functions

void calculateConversionParameters ()
 

Protected Attributes

double referenceLongitude_
 Reference longitude of the GPS measurements [deg]. More...
 
double referenceLatitude_
 Reference latitude of the GPS measurements [deg]. More...
 
double referenceAltitude_
 Reference altitude of the GPS measurements [m]. More...
 
double referenceHeading_
 Reference heading for the GPS measurements [rad]. More...
 
double earthRadiusN_
 
double earthRadiusE_
 
const double EQUATORIAL_RADIUS = 6378137.0
 
const double FLATTENING = 1.0/298.257223563
 
const double EXCENTRITY2 = 2*FLATTENING - FLATTENING*FLATTENING
 
const double a = 6377397.155
 
const double E2 = 0.006674372230614
 
const double phi0 = 46.95241*M_PI/180.0
 
const double lambda0 = 7.43958*M_PI/180.0
 
const double R = a*sqrt(1-E2)/(1-E2*sin(phi0)*sin(phi0))
 
const double alpha = sqrt(1+E2/(1-E2)*pow(cos(phi0),4))
 
const double b0 = asin(sin(phi0)/alpha)
 
const double K = log(tan(M_PI_4+b0/2.0))-alpha*log(tan(M_PI_4+phi0/2.0))+alpha*sqrt(E2)/2.0*log((1+sqrt(E2)*sin(phi0))/(1-sqrt(E2)*sin(phi0)))
 
Eigen::Vector3d xyzOffset = Eigen::Vector3d::Zero()
 

Constructor & Destructor Documentation

robot_utils::GNSS::GNSS ( )
virtual robot_utils::GNSS::~GNSS ( )
virtual

Member Function Documentation

Eigen::Vector3d robot_utils::GNSS::besselEllipsoidToMercator ( const double &  latitudeInRad,
const double &  longitudeInRad,
const double &  altitude 
)
void robot_utils::GNSS::calculateConversionParameters ( )
protected
Eigen::Vector3d robot_utils::GNSS::cartesianToGps ( const Eigen::Matrix< double, 3, 1 >  position)
Eigen::Vector3d robot_utils::GNSS::gpsToCartesian ( const double &  latitudeInDegrees,
const double &  longitudeInDegrees,
const double &  altitude 
)
void robot_utils::GNSS::setMercatorReferenceFrame ( const Eigen::Vector3d  newReferencePoint)
void robot_utils::GNSS::setReference ( const double &  referenceLatitude,
const double &  referenceLongitude,
const double &  referenceAltitude,
const double &  referenceHeading 
)

Member Data Documentation

const double robot_utils::GNSS::a = 6377397.155
protected
const double robot_utils::GNSS::alpha = sqrt(1+E2/(1-E2)*pow(cos(phi0),4))
protected
const double robot_utils::GNSS::b0 = asin(sin(phi0)/alpha)
protected
const double robot_utils::GNSS::E2 = 0.006674372230614
protected
double robot_utils::GNSS::earthRadiusE_
protected
double robot_utils::GNSS::earthRadiusN_
protected
const double robot_utils::GNSS::EQUATORIAL_RADIUS = 6378137.0
protected
const double robot_utils::GNSS::EXCENTRITY2 = 2*FLATTENING - FLATTENING*FLATTENING
protected
const double robot_utils::GNSS::FLATTENING = 1.0/298.257223563
protected
const double robot_utils::GNSS::K = log(tan(M_PI_4+b0/2.0))-alpha*log(tan(M_PI_4+phi0/2.0))+alpha*sqrt(E2)/2.0*log((1+sqrt(E2)*sin(phi0))/(1-sqrt(E2)*sin(phi0)))
protected
const double robot_utils::GNSS::lambda0 = 7.43958*M_PI/180.0
protected
const double robot_utils::GNSS::phi0 = 46.95241*M_PI/180.0
protected
const double robot_utils::GNSS::R = a*sqrt(1-E2)/(1-E2*sin(phi0)*sin(phi0))
protected
double robot_utils::GNSS::referenceAltitude_
protected

Reference altitude of the GPS measurements [m].

double robot_utils::GNSS::referenceHeading_
protected

Reference heading for the GPS measurements [rad].

double robot_utils::GNSS::referenceLatitude_
protected

Reference latitude of the GPS measurements [deg].

double robot_utils::GNSS::referenceLongitude_
protected

Reference longitude of the GPS measurements [deg].

Eigen::Vector3d robot_utils::GNSS::xyzOffset = Eigen::Vector3d::Zero()
protected

The documentation for this class was generated from the following file: