My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::Angle Class Reference
Inheritance diagram for gcp::util::Angle:
gcp::util::ConformableQuantity gcp::util::DecAngle gcp::util::HourAngle gcp::util::Declination

Classes

class  ArcMinutes
 
class  ArcSec
 
class  Degrees
 
class  MilliArcSec
 
class  Radians
 

Public Member Functions

 Angle (bool modulo=false)
 
 Angle (std::string degrees, bool modulo=false)
 
 Angle (const Radians &units, double radians, bool modulo=false)
 
 Angle (const Degrees &units, double degrees, bool modulo=false)
 
 Angle (const MilliArcSec &units, double mas, bool modulo=false)
 
 Angle (const ArcSec &units, double as, bool modulo=false)
 
 Angle (const ArcMinutes &units, double am, bool modulo=false)
 
 Angle (Angle &angle)
 
 Angle (const Angle &angle)
 
void operator= (Angle &angle)
 
void operator= (const Angle &angle)
 
virtual ~Angle ()
 
void setRadians (double radians)
 
void setDegrees (double degrees)
 
void setDegrees (double degrees, double arcmin, double arcsec)
 
void setArcMinutes (double am)
 
void setMas (double mas)
 
void setArcSec (double as)
 
void setDegrees (std::string degrees)
 
virtual void addRadians (double radians)
 
virtual void addDegrees (double degrees)
 
virtual void addDegrees (std::string degrees)
 
double radians ()
 
double degrees ()
 
double arcsec ()
 
double arcmin ()
 
double mas ()
 
std::string strDegrees ()
 
Angle operator+ (Angle &angle)
 
Angle operator- (Angle &angle)
 
void operator/= (unsigned uval)
 
Angle operator/ (unsigned uval)
 
bool operator> (Angle &angle)
 
bool operator> (const Angle &angle)
 
bool operator>= (Angle &angle)
 
bool operator< (Angle &angle)
 
bool operator< (const Angle &angle)
 
bool operator<= (Angle &angle)
 
void initialize ()
 
- Public Member Functions inherited from gcp::util::ConformableQuantity
 ConformableQuantity ()
 
virtual ~ConformableQuantity ()
 
bool isFinite ()
 

Static Public Member Functions

static double sexagesimalToDouble (std::string valStr)
 
static std::string doubleToSexagesimal (double val)
 

Static Public Attributes

static const double pi_ = M_PI
 
static const double twoPi_ = 2*M_PI
 
static const double degPerRad_ = 180/M_PI
 
static const double arcSecPerDegree_ = 3600
 
static const double masPerDegree_ = Angle::arcSecPerDegree_ * 1000
 
static const double arcSecPerRad_ = 206265
 
static const double arcMinPerRad_ = 60 * Angle::degPerRad_
 
static const double masPerRad_ = Angle::masPerDegree_ * Angle::degPerRad_
 

Protected Member Functions

 Angle (double radians, bool modulo)
 
- Protected Member Functions inherited from gcp::util::ConformableQuantity
void setFinite (bool finite)
 

Protected Attributes

double radians_
 
bool modulo_
 
- Protected Attributes inherited from gcp::util::ConformableQuantity
bool finite_
 

Friends

std::ostream & operator<< (std::ostream &os, Angle &angle)
 

Constructor & Destructor Documentation

Angle::Angle ( bool  modulo = false)

Public constructor with no value initialization

....................................................................... Constructor.

Angle::Angle ( std::string  degrees,
bool  modulo = false 
)

Unambiguous contructor for degree strings

Angle::Angle ( const Radians units,
double  radians,
bool  modulo = false 
)

Constructors with unit specifications

....................................................................... Constructor.

Angle::~Angle ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

void Angle::addDegrees ( double  degrees)
virtual

....................................................................... Add to the contents of this object

void Angle::addDegrees ( std::string  degrees)
virtual

....................................................................... Set the contents of this object

void Angle::addRadians ( double  radians)
virtual

Add to the angle

....................................................................... Add to the contents of this object

Reimplemented in gcp::util::Declination.

std::string Angle::doubleToSexagesimal ( double  val)
static

Convert a double to a sexagesimal string

....................................................................... Convert a double to a sexagesimal string

Angle Angle::operator+ ( Angle angle)

Add two Angles

....................................................................... Addition operator for Angle.

Angle Angle::operator- ( Angle angle)

Subtract two Angles

....................................................................... Subtraction operator for Angle.

Angle Angle::operator/ ( unsigned  uval)

Divide an angle by an integer

void Angle::operator/= ( unsigned  uval)

Divide an angle by an integer

bool Angle::operator> ( Angle angle)

Compare two Angles

....................................................................... Comparison operators

double gcp::util::Angle::radians ( )
inline

Get the angle

void Angle::setArcMinutes ( double  am)

....................................................................... Set the contents of this object in arcminutes

void Angle::setArcSec ( double  as)

....................................................................... Set the contents of this object in arcseconds

void Angle::setDegrees ( double  degrees)

....................................................................... Set the contents of this object

void Angle::setDegrees ( std::string  degrees)

....................................................................... Set the contents of this object

void Angle::setMas ( double  mas)

....................................................................... Set the contents of this object

void Angle::setRadians ( double  radians)

Set the angle

....................................................................... Set the contents of this object

double Angle::sexagesimalToDouble ( std::string  valStr)
static

Convert a sexagesimal string to a double representation

....................................................................... Convert a sexagesimal string to a double representation

std::string Angle::strDegrees ( )

....................................................................... Get the contents of this object

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Angle angle 
)
friend

Allows cout << Angle


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