Instrument Neutral Distributed Interface INDI  1.9.2
Public Types | Public Member Functions | List of all members
Angle Class Reference

The Angle class This class implements an angle type. This holds an angle that is always in the range -180 to +180 Relational and arithmetic operators work over the -180 - +180 discontinuity. More...

#include <scopesim_helper.h>

Public Types

enum  ANGLE_UNITS { DEGREES, HOURS, RADIANS }
 

Public Member Functions

 Angle ()
 
 Angle (double value, ANGLE_UNITS type)
 
 Angle (double degrees)
 
double Degrees ()
 Degrees. More...
 
double Degrees360 ()
 Degrees360. More...
 
double Hours ()
 Hours. More...
 
double HoursHa ()
 HoursHa. More...
 
double radians ()
 radians More...
 
void setDegrees (double deg)
 setDegrees set the angle in degrees More...
 
void setHours (double hrs)
 setHours set the angle More...
 
Angle add (Angle a)
 
Angle subtract (Angle a)
 
double difference (Angle a)
 
Angle operator- ()
 
Angleoperator+= (const Angle &a)
 
Angleoperator+= (const double d)
 
Angleoperator-= (const Angle &a)
 
Angleoperator-= (const double d)
 
Angle operator+ (const Angle &a)
 
Angle operator+ (const double &d)
 
Angle operator- (const Angle &rhs)
 
Angle operator- (const double &rhs)
 
Angle operator* (const double duration)
 operator * multiplies the angle by a double, used to manage tracking and slewing More...
 
bool operator== (const Angle &a)
 
bool operator!= (const Angle &a)
 
bool operator> (const Angle &a)
 
bool operator< (const Angle &a)
 
bool operator>= (const Angle &a)
 
bool operator<= (const Angle &a)
 

Detailed Description

The Angle class This class implements an angle type. This holds an angle that is always in the range -180 to +180 Relational and arithmetic operators work over the -180 - +180 discontinuity.

Definition at line 50 of file scopesim_helper.h.

Member Enumeration Documentation

◆ ANGLE_UNITS

Enumerator
DEGREES 
HOURS 
RADIANS 

Definition at line 70 of file scopesim_helper.h.

Constructor & Destructor Documentation

◆ Angle() [1/3]

Angle::Angle ( )
inline

Definition at line 72 of file scopesim_helper.h.

◆ Angle() [2/3]

Angle::Angle ( double  value,
ANGLE_UNITS  type 
)

Definition at line 32 of file scopesim_helper.cpp.

◆ Angle() [3/3]

Angle::Angle ( double  degrees)
inline

Definition at line 76 of file scopesim_helper.h.

Member Function Documentation

◆ add()

Angle Angle::add ( Angle  a)
inline

Definition at line 134 of file scopesim_helper.h.

◆ Degrees()

double Angle::Degrees ( )
inline

Degrees.

Returns
angle in degrees, range -180 to 0 to +180

Definition at line 84 of file scopesim_helper.h.

◆ Degrees360()

double Angle::Degrees360 ( )
inline

Degrees360.

Returns
angle in degrees, range 0 to 360

Definition at line 90 of file scopesim_helper.h.

◆ difference()

double Angle::difference ( Angle  a)
inline

Definition at line 145 of file scopesim_helper.h.

◆ Hours()

double Angle::Hours ( )
inline

Hours.

Returns
angle in hours, range 0 to 24

Definition at line 99 of file scopesim_helper.h.

◆ HoursHa()

double Angle::HoursHa ( )
inline

HoursHa.

Returns
angle in hours, range -12 to +12

Definition at line 110 of file scopesim_helper.h.

◆ operator!=()

bool Angle::operator!= ( const Angle a)

Definition at line 55 of file scopesim_helper.cpp.

◆ operator*()

Angle Angle::operator* ( const double  duration)
inline

operator * multiplies the angle by a double, used to manage tracking and slewing

Parameters
durationas a double
Returns
Angle

Definition at line 206 of file scopesim_helper.h.

◆ operator+() [1/2]

Angle Angle::operator+ ( const Angle a)
inline

Definition at line 179 of file scopesim_helper.h.

◆ operator+() [2/2]

Angle Angle::operator+ ( const double &  d)
inline

Definition at line 184 of file scopesim_helper.h.

◆ operator+=() [1/2]

Angle& Angle::operator+= ( const Angle a)
inline

Definition at line 155 of file scopesim_helper.h.

◆ operator+=() [2/2]

Angle& Angle::operator+= ( const double  d)
inline

Definition at line 161 of file scopesim_helper.h.

◆ operator-() [1/3]

Angle Angle::operator- ( )
inline

Definition at line 150 of file scopesim_helper.h.

◆ operator-() [2/3]

Angle Angle::operator- ( const Angle rhs)
inline

Definition at line 189 of file scopesim_helper.h.

◆ operator-() [3/3]

Angle Angle::operator- ( const double &  rhs)
inline

Definition at line 194 of file scopesim_helper.h.

◆ operator-=() [1/2]

Angle& Angle::operator-= ( const Angle a)
inline

Definition at line 167 of file scopesim_helper.h.

◆ operator-=() [2/2]

Angle& Angle::operator-= ( const double  d)
inline

Definition at line 173 of file scopesim_helper.h.

◆ operator<()

bool Angle::operator< ( const Angle a)
inline

Definition at line 220 of file scopesim_helper.h.

◆ operator<=()

bool Angle::operator<= ( const Angle a)
inline

Definition at line 228 of file scopesim_helper.h.

◆ operator==()

bool Angle::operator== ( const Angle a)

Definition at line 50 of file scopesim_helper.cpp.

◆ operator>()

bool Angle::operator> ( const Angle a)
inline

Definition at line 215 of file scopesim_helper.h.

◆ operator>=()

bool Angle::operator>= ( const Angle a)
inline

Definition at line 224 of file scopesim_helper.h.

◆ radians()

double Angle::radians ( )

radians

Returns
angle in radians, range -Pi to 0 to +PI

Definition at line 48 of file scopesim_helper.cpp.

◆ setDegrees()

void Angle::setDegrees ( double  deg)
inline

setDegrees set the angle in degrees

Parameters
degangle in degrees

Definition at line 123 of file scopesim_helper.h.

◆ setHours()

void Angle::setHours ( double  hrs)
inline

setHours set the angle

Parameters
hrsangle in hours

Definition at line 129 of file scopesim_helper.h.

◆ subtract()

Angle Angle::subtract ( Angle  a)
inline

Definition at line 140 of file scopesim_helper.h.


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