DUNE: Uniform Navigational Environment  2016.05.0
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 source, fp64_t target)
 

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.

Referenced by DUNE::Coordinates::latitudeToNMEA(), and DUNE::Coordinates::longitudeToNMEA().

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  source,
fp64_t  target 
)
inlinestatic

Computes the smallest signed angle between two angles (radians).

Parameters
sourcereference angle.
targettarget angle.
Returns
smallest signed angle.

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::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