DUNE: Uniform Navigational Environment  2.4.2
DUNE::Math::Angles Class Reference

Detailed Description

Angle manipulation and conversion methods.

Static Public Member Functions

static fp64_t normalizeRadian (fp64_t a)
 
static fp64_t radians (fp64_t d)
 
static fp64_t degrees (fp64_t r)
 
static fp64_t convertDMSToDecimal (int degrees, int minutes, int seconds)
 
static fp64_t convertDMSToDecimal (int degrees, double minutes)
 
static void convertDecimalToDMS (double value, int &degrees, int &minutes, double &seconds)
 
static void convertDecimalToDM (double value, int &degrees, double &minutes)
 
static void rotate (double angle, bool clockwise, double &x, double &y)
 
static fp64_t minSignedAngle (fp64_t a, fp64_t b)
 

Member Function Documentation

static void DUNE::Math::Angles::convertDecimalToDM ( double  value,
int &  degrees,
double &  minutes 
)
inlinestatic

Convert decimal degrees to Degrees, Minutes.

Parameters
valuedegrees in decimal format.
degreescomputed degrees.
minutescomputed minutes.

References degrees().

static void DUNE::Math::Angles::convertDecimalToDMS ( double  value,
int &  degrees,
int &  minutes,
double &  seconds 
)
inlinestatic

Convert decimal degrees to Degrees, Minutes, Seconds.

Parameters
valuedegrees in decimal format.
degreescomputed degrees.
minutescomputed minutes.
secondscomputed seconds.

References degrees().

static fp64_t DUNE::Math::Angles::convertDMSToDecimal ( int  degrees,
int  minutes,
int  seconds 
)
inlinestatic

Convert Degrees, Minutes, Seconds to Decimal Format.

Parameters
degreesdegrees.
minutesminutes.
secondsseconds.
Returns
degrees in decimal format.

Referenced by DUNE::Utils::NMEAParser::parseCoordinate().

static fp64_t DUNE::Math::Angles::convertDMSToDecimal ( int  degrees,
double  minutes 
)
inlinestatic

Convert Degrees, Minutes to Decimal Format.

Parameters
degreesdegrees.
minutesminutes.
Returns
degrees in decimal format.
static fp64_t DUNE::Math::Angles::minSignedAngle ( fp64_t  a,
fp64_t  b 
)
inlinestatic

Computes the smallest signed angle between two angles in radians.

Parameters
aangle in radian.
bangle in radian.
Returns
smallest angle in radian.

Referenced by DUNE::Navigation::BasicNavigation::consume().

static fp64_t DUNE::Math::Angles::normalizeRadian ( fp64_t  a)
inlinestatic

Normalize radian so that the value falls between -pi and +pi.

Parameters
aangle in radian.
Returns
normalized angle.

Referenced by DUNE::Control::PathController::consume(), DUNE::Navigation::BasicNavigation::consume(), DUNE::Navigation::BasicNavigation::isActive(), and DUNE::Navigation::BasicNavigation::onDispatchNavigation().

static void DUNE::Math::Angles::rotate ( double  angle,
bool  clockwise,
double &  x,
double &  y 
)
inlinestatic

XY Coordinate conversion considering a rotation angle.

(Eduardo Marques)

Parameters
angleangle
clockwiseclockwise rotation or not
xoriginal x value on entry, rotated x value on exit.
yoriginal y value on entry, rotated y value on exit.

Referenced by DUNE::Maneuvers::RowsStages::RowsStages().

Collaboration diagram for DUNE::Math::Angles:
Collaboration graph