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

◆ GNSS()

robot_utils::GNSS::GNSS ( )

◆ ~GNSS()

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

Member Function Documentation

◆ besselEllipsoidToMercator()

Eigen::Vector3d robot_utils::GNSS::besselEllipsoidToMercator ( const double &  latitudeInRad,
const double &  longitudeInRad,
const double &  altitude 
)

◆ calculateConversionParameters()

void robot_utils::GNSS::calculateConversionParameters ( )
protected

◆ cartesianToGps()

Eigen::Vector3d robot_utils::GNSS::cartesianToGps ( const Eigen::Matrix< double, 3, 1 >  position)

◆ gpsToCartesian()

Eigen::Vector3d robot_utils::GNSS::gpsToCartesian ( const double &  latitudeInDegrees,
const double &  longitudeInDegrees,
const double &  altitude 
)

◆ setMercatorReferenceFrame()

void robot_utils::GNSS::setMercatorReferenceFrame ( const Eigen::Vector3d  newReferencePoint)

◆ setReference()

void robot_utils::GNSS::setReference ( const double &  referenceLatitude,
const double &  referenceLongitude,
const double &  referenceAltitude,
const double &  referenceHeading 
)

Member Data Documentation

◆ a

const double robot_utils::GNSS::a = 6377397.155
protected

◆ alpha

const double robot_utils::GNSS::alpha = sqrt(1+E2/(1-E2)*pow(cos(phi0),4))
protected

◆ b0

const double robot_utils::GNSS::b0 = asin(sin(phi0)/alpha)
protected

◆ E2

const double robot_utils::GNSS::E2 = 0.006674372230614
protected

◆ earthRadiusE_

double robot_utils::GNSS::earthRadiusE_
protected

◆ earthRadiusN_

double robot_utils::GNSS::earthRadiusN_
protected

◆ EQUATORIAL_RADIUS

const double robot_utils::GNSS::EQUATORIAL_RADIUS = 6378137.0
protected

◆ EXCENTRITY2

const double robot_utils::GNSS::EXCENTRITY2 = 2*FLATTENING - FLATTENING*FLATTENING
protected

◆ FLATTENING

const double robot_utils::GNSS::FLATTENING = 1.0/298.257223563
protected

◆ K

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

◆ lambda0

const double robot_utils::GNSS::lambda0 = 7.43958*M_PI/180.0
protected

◆ phi0

const double robot_utils::GNSS::phi0 = 46.95241*M_PI/180.0
protected

◆ R

const double robot_utils::GNSS::R = a*sqrt(1-E2)/(1-E2*sin(phi0)*sin(phi0))
protected

◆ referenceAltitude_

double robot_utils::GNSS::referenceAltitude_
protected

Reference altitude of the GPS measurements [m].

◆ referenceHeading_

double robot_utils::GNSS::referenceHeading_
protected

Reference heading for the GPS measurements [rad].

◆ referenceLatitude_

double robot_utils::GNSS::referenceLatitude_
protected

Reference latitude of the GPS measurements [deg].

◆ referenceLongitude_

double robot_utils::GNSS::referenceLongitude_
protected

Reference longitude of the GPS measurements [deg].

◆ xyzOffset

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

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