Class for dealing with angular info. More...

#include <Angle.h>

Public Types

enum  Type { Degrees , Radians , Turns }

Public Member Functions

 Angle (const Angle &a)
 Angle (const double &rad=0)
void setWrapPoint (double wp)
double getWrapPoint ()
void setHMS (int hours, int minutes, double seconds)
void getHMS (int &hours, int &minutes, double &seconds) const
int setHMS (const char *)
char * getHMS (char *str, int places=3) const
 Get the value in HH:MM:SS[.sss].
std::string getHMS (int places=3) const
 Get the value in HH:MM:SS[.sss].
void setDMS (int degrees, int minutes, double seconds)
void getDMS (int &degrees, int &minutes, double &seconds) const
int setDMS (const char *)
char * getDMS (char *str, int places=3) const
 Get the value in DD:MM:SS[.sss].
std::string getDMS (int places=3) const
 Get the value in DD:MM:SS[.sss].
void setRadMS (long int ms)
long getRadMS () const
void setDegrees (double deg)
double getDegrees () const
void setTurns (double turns)
double getTurns () const
void setRadians (double rad)
double getRadians () const
void setDegMS (double deg_mmss)
double getDegMS () const
void setHourMS (double hour_mmss)
double getHourMS () const
void setTurnMS (double turn_mmss)
double getTurnMS () const
Angleoperator= (const Angle &a)
Angleoperator= (const double &val)
Angleoperator+= (const Angle &a)
Angleoperator-= (const Angle &a)
Angleoperator+= (const double &d)
Angleoperator-= (const double &d)
Angleoperator*= (const double &d)
Angleoperator/= (const double &d)

Static Public Attributes

static bool verbose = false
static Type default_type = Angle::Radians

Protected Member Functions

virtual void wrap ()
void init ()

Protected Attributes

double radians
double wrap_point

Friends

class AnglePair
const Angle operator+ (const Angle &a1, const Angle &a2)
const Angle operator- (const Angle &a1, const Angle &a2)
const Angle operator+ (const Angle &a1, double d)
const Angle operator- (const Angle &a1, double d)
const Angle operator/ (const Angle &a1, double d)
const Angle operator* (const Angle &a1, double d)
const Angle operator- (const Angle &a)
double operator* (const Angle &a1, const Angle &a2)
int operator> (const Angle &a1, const Angle &a2)
int operator< (const Angle &a1, const Angle &a2)
int operator>= (const Angle &a1, const Angle &a2)
int operator<= (const Angle &a1, const Angle &a2)
int operator== (const Angle &a1, const Angle &a2)
int operator!= (const Angle &a1, const Angle &a2)
double cast_double (const Angle &a)

Detailed Description

Class for dealing with angular info.

Member Function Documentation

◆ getDMS()

char * Angle::getDMS ( char * str,
int places = 3 ) const

Get the value in DD:MM:SS[.sss].

Parameters
strmust point to an arrays of at least ANGLE_STR characters

◆ getHMS()

char * Angle::getHMS ( char * str,
int places = 3 ) const

Get the value in HH:MM:SS[.sss].

Parameters
strmust point to an arrays of at least ANGLE_STR characters

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

Generated using doxygen 1.14.0