TwiceAsNice  2019-02-18
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Nice::DMS Class Reference

An angle, stored as degrees, but expressible in many ways. More...

#include <DMS.h>

Collaboration diagram for Nice::DMS:
Collaboration graph

Public Member Functions

 DMS (int d=0, int m=0, int s=0, int ms=0)
 Default Constructor. More...
 
 DMS (int d, int m, const double &s)
 Constructor. More...
 
 DMS (const double &x)
 Construct an angle from a double value. More...
 
 DMS (const Nice::Time &_t)
 Ctor from a time value. More...
 
bool isValid () const
 
 operator double () const
 Cast operator DMSVar (empty). More...
 
bool operator== (const DMS &d) const
 equal ?. More...
 
int degree () const
 
int arcmin () const
 
int arcsec () const
 
int marcsec () const
 
const double & degrees () const
 
int hour () const
 
int minute () const
 
int second () const
 
int msecond () const
 
double hours () const
 
void setDeg (int d)
 Sets integer degrees portion of angle, leaving the arcminute and arcsecond values intact. More...
 
void setArcMin (int m)
 Sets integer arcminutes portion of angle, leaving the degrees and arcsecond values intact. More...
 
void setArcSec (int s)
 Sets integer arcseconds portion of angle, leaving the degrees and arcminute values intact. More...
 
void setD (const double &x)
 Sets floating-point value of angle, in degrees. More...
 
void setD (int d, int m, int s, int ms)
 Sets floating-point value of angle, in degrees. More...
 
void setD (int d, int m, const double &s)
 Sets floating-point value of angle, in degrees. More...
 
void setHour (int h)
 Sets integer hours portion of angle, leaving the minutes and seconds values intact. More...
 
void setHMin (int m)
 Sets integer minutes portion of angle, leaving the hours and seconds values intact. More...
 
void setHSec (int s)
 Sets integer seconds portion of angle, leaving the hours and minutes values intact. More...
 
void setH (const double &x)
 Sets floating-point value of angle, in hours. More...
 
void setH (int h, int m, int s, int ms)
 Sets floating-point value of angle, in hours. More...
 
void setH (int h, int m, const double &s)
 Sets floating-point value of angle, in hours. More...
 
void set (const DMS &d)
 Copy value of another DMS angle. More...
 
void set (const double &d)
 Copy value of another DMS angle. More...
 
DMS operator+ (DMS d)
 Addition operator. More...
 
DMSoperator+= (const DMS &d)
 Addition operator. More...
 
DMS operator- (DMS d)
 Subtraction operator. More...
 
DMSoperator-= (const DMS &d)
 Subtraction operator. More...
 
void sinCos (double &s, double &c) const
 Compute sine and cosine of the angle simultaneously. More...
 
double sin () const
 Compute the Angle's m_sine. More...
 
double cos () const
 Compute the Angle's m_cosine. More...
 
double radians () const
 Express the angle in radians. More...
 
void setRadians (const double &a)
 Set angle according to the argument, in radians. More...
 
double reduce () const
 return the equivalent angle between 0 and 360 degrees, in units of degrees. More...
 
std::string toDMSString (const bool forceSign=true) const
 
std::string toHMSString () const
 
 DMS (int d=0, int m=0, int s=0, int ms=0)
 Default Constructor. More...
 
 DMS (int d, int m, const double &s)
 Constructor. More...
 
 DMS (const double &x)
 Construct an angle from a double value. More...
 
 DMS (const Nice::Time &_t)
 Ctor from a time value. More...
 
bool isValid () const
 
 operator double () const
 Cast operator DMSVar (empty). More...
 
bool operator== (const DMS &d) const
 equal ?. More...
 
int degree () const
 
int arcmin () const
 
int arcsec () const
 
int marcsec () const
 
const double & degrees () const
 
int hour () const
 
int minute () const
 
int second () const
 
int msecond () const
 
double hours () const
 
void setDeg (int d)
 Sets integer degrees portion of angle, leaving the arcminute and arcsecond values intact. More...
 
void setArcMin (int m)
 Sets integer arcminutes portion of angle, leaving the degrees and arcsecond values intact. More...
 
void setArcSec (int s)
 Sets integer arcseconds portion of angle, leaving the degrees and arcminute values intact. More...
 
void setD (const double &x)
 
void setD (int d, int m, int s, int ms)
 
void setD (int d, int m, const double &s)
 
void setHour (int h)
 Sets integer hours portion of angle, leaving the minutes and seconds values intact. More...
 
void setHMin (int m)
 Sets integer minutes portion of angle, leaving the hours and seconds values intact. More...
 
void setHSec (int s)
 Sets integer seconds portion of angle, leaving the hours and minutes values intact. More...
 
void setH (const double &x)
 
void setH (int h, int m, int s, int ms)
 
void setH (int h, int m, const double &s)
 
void set (const DMS &d)
 Copy value of another DMS angle. More...
 
void set (const double &d)
 Copy value of another DMS angle. More...
 
DMS operator+ (DMS d)
 Addition operator. More...
 
DMSoperator+= (const DMS &d)
 Addition operator. More...
 
DMS operator- (DMS d)
 Subtraction operator. More...
 
DMSoperator-= (const DMS &d)
 Subtraction operator. More...
 
void sinCos (double &s, double &c) const
 
double sin () const
 
double cos () const
 
double radians () const
 
void setRadians (const double &a)
 
double reduce () const
 
std::string toDMSString (const bool forceSign=true) const
 
std::string toHMSString () const
 

Static Public Member Functions

static DMS fromString (const std::string &s)
 Static function to create a DMS object from a std::string. More...
 
static DMS fromString (const std::string &s)
 Static function to create a DMS object from a std::string. More...
 

Static Public Attributes

static const double PI = M_PI
 Euler's constant 3.14159... More...
 
static const double DegToRad = 0.0174532925199432957692369076849
 the conversion factor pi divided by 180. More...
 

Private Attributes

double m_dms
 

Detailed Description

An angle, stored as degrees, but expressible in many ways.

Author
Jason Harris
Version
11.02.04

DMS encapsulates an angle. The angle is stored as a double, equal to the value of the angle in degrees. Methods are available for setting/getting the angle as a floating-point measured in Degrees or Hours, or as integer triplets (degrees, arcminutes, arcseconds or hours, minutes, seconds). There is also a method to set the angle according to a radian value, and to return the angle expressed in radians. Finally, a sinCos() method computes the sin and cosine of the angle. Once computed, the sin and cos values are stored, so that subsequent sinCos() calls will be faster.

Constructor & Destructor Documentation

◆ DMS() [1/8]

Nice::DMS::DMS ( int  d = 0,
int  m = 0,
int  s = 0,
int  ms = 0 
)
inline

Default Constructor.

Set the floating-point value of the angle according to the four integer arguments.

Parameters
ddegree portion of angle (int). Defaults to zero.
marcminute portion of angle (int). Defaults to zero.
sarcsecond portion of angle (int). Defaults to zero.
msarcsecond portion of angle (int). Defaults to zero.

◆ DMS() [2/8]

Nice::DMS::DMS ( int  d,
int  m,
const double &  s 
)
inline

Constructor.

Set the floating-point value of the angle according to numeric arguments.

Parameters
ddegree portion of angle (int).
marcminute portion of angle (int).
sarcsecond portion of angle (double).

◆ DMS() [3/8]

Nice::DMS::DMS ( const double &  x)
inline

Construct an angle from a double value.

Creates an angle whose value in Degrees is equal to the argument.

Parameters
xangle expressed as a floating-point number (in degrees)

◆ DMS() [4/8]

Nice::DMS::DMS ( const Nice::Time _t)
inline

Ctor from a time value.

Creates an angle equating 24 hours in time with 360 degrees in the angle.

Parameters
_tThe time value.

◆ DMS() [5/8]

Nice::DMS::DMS ( int  d = 0,
int  m = 0,
int  s = 0,
int  ms = 0 
)
inline

Default Constructor.

Set the floating-point value of the angle according to the four integer arguments.

Parameters
ddegree portion of angle (int). Defaults to zero.
marcminute portion of angle (int). Defaults to zero.
sarcsecond portion of angle (int). Defaults to zero.
msarcsecond portion of angle (int). Defaults to zero.

◆ DMS() [6/8]

Nice::DMS::DMS ( int  d,
int  m,
const double &  s 
)
inline

Constructor.

Set the floating-point value of the angle according to numeric arguments.

Parameters
ddegree portion of angle (int).
marcminute portion of angle (int).
sarcsecond portion of angle (double).

◆ DMS() [7/8]

Nice::DMS::DMS ( const double &  x)
inline

Construct an angle from a double value.

Creates an angle whose value in Degrees is equal to the argument.

Parameters
xangle expressed as a floating-point number (in degrees)

◆ DMS() [8/8]

Nice::DMS::DMS ( const Nice::Time _t)
inline

Ctor from a time value.

Creates an angle equating 24 hours in time with 360 degrees in the angle.

Parameters
_tThe time value.

Member Function Documentation

◆ arcmin() [1/2]

int Nice::DMS::arcmin ( ) const
Returns
integer arcminutes portion of the angle.
Note
an arcminute is 1/60 degree.

◆ arcmin() [2/2]

int Nice::DMS::arcmin ( ) const

◆ arcsec() [1/2]

int Nice::DMS::arcsec ( ) const

◆ arcsec() [2/2]

int Nice::DMS::arcsec ( ) const
Returns
integer arcseconds portion of the angle
Note
an arcsecond is 1/60 arcmin, or 1/3600 degree.

◆ cos() [1/2]

double Nice::DMS::cos ( ) const

◆ cos() [2/2]

double Nice::DMS::cos ( ) const

Compute the Angle's m_cosine.

Returns
the m_cosine of the angle.
See also
sin()

◆ degree() [1/2]

int Nice::DMS::degree ( ) const
inline
Returns
integer degrees portion of the angle

◆ degree() [2/2]

int Nice::DMS::degree ( ) const
inline
Returns
integer degrees portion of the angle

◆ degrees() [1/2]

const double& Nice::DMS::degrees ( ) const
inline
Returns
angle in degrees expressed as a double.

◆ degrees() [2/2]

const double& Nice::DMS::degrees ( ) const
inline
Returns
angle in degrees expressed as a double.

◆ fromString() [1/2]

static DMS Nice::DMS::fromString ( const std::string &  s)
static

Static function to create a DMS object from a std::string.

There are several ways to specify the angle:

  • Integer numbers ( 5 or -33 )
  • Floating-point numbers ( 5.0 or -33.0 )
  • colon-delimited integers ( 5:0:0 or -33:0:0 )
  • colon-delimited with float seconds ( 5:0:0.0 or -33:0:0.0 )
  • colon-delimited with float minutes ( 5:0.0 or -33:0.0 )
  • space-delimited ( 5 0 0; -33 0 0 ) or ( 5 0.0 or -33 0.0 )
  • space-delimited, with unit labels ( 5h 0m 0s or -33d 0m 0s )
    Parameters
    sthe string to be parsed as an angle value
    Returns
    an angle whose value is parsed from the string argument

◆ fromString() [2/2]

Nice::DMS Nice::DMS::fromString ( const std::string &  s)
static

Static function to create a DMS object from a std::string.

There are several ways to specify the angle:

  • Integer numbers ( 5 or -33 )
  • Floating-point numbers ( 5.0 or -33.0 )
  • colon-delimited integers ( 5:0:0 or -33:0:0 )
  • colon-delimited with float seconds ( 5:0:0.0 or -33:0:0.0 )
  • colon-delimited with float minutes ( 5:0.0 or -33:0.0 )
  • space-delimited ( 5 0 0; -33 0 0 ) or ( 5 0.0 or -33 0.0 )
  • space-delimited, with unit labels ( 5h 0m 0s or -33d 0m 0s )
    Parameters
    sthe string to be parsed as an angle value
    Returns
    an angle whose value is parsed from the string argument

◆ hour() [1/2]

int Nice::DMS::hour ( ) const
inline
Returns
integer hours portion of the angle
Note
an angle can be measured in degrees/arcminutes/arcseconds or hours/minutes/seconds. An hour is equal to 15 degrees.

◆ hour() [2/2]

int Nice::DMS::hour ( ) const
inline
Returns
integer hours portion of the angle
Note
an angle can be measured in degrees/arcminutes/arcseconds or hours/minutes/seconds. An hour is equal to 15 degrees.

◆ hours() [1/2]

double Nice::DMS::hours ( ) const
inline
Returns
angle in hours expressed as a double.
Note
an angle can be measured in degrees/arcminutes/arcseconds or hours/minutes/seconds. An hour is equal to 15 degrees.

◆ hours() [2/2]

double Nice::DMS::hours ( ) const
inline
Returns
angle in hours expressed as a double.
Note
an angle can be measured in degrees/arcminutes/arcseconds or hours/minutes/seconds. An hour is equal to 15 degrees.

◆ isValid() [1/2]

bool Nice::DMS::isValid ( ) const
inline
Returns
valid ?.

◆ isValid() [2/2]

bool Nice::DMS::isValid ( ) const
inline
Returns
valid ?.

◆ marcsec() [1/2]

int Nice::DMS::marcsec ( ) const

◆ marcsec() [2/2]

int Nice::DMS::marcsec ( ) const
Returns
integer milliarcseconds portion of the angle
Note
a milliarcsecond is 1/1000 arcsecond.

◆ minute() [1/2]

int Nice::DMS::minute ( ) const
Returns
integer minutes portion of the angle
Note
a minute is 1/60 hour (not the same as an arcminute)

◆ minute() [2/2]

int Nice::DMS::minute ( ) const

◆ msecond() [1/2]

int Nice::DMS::msecond ( ) const
Returns
integer milliseconds portion of the angle
Note
a millisecond is 1/1000 second (not the same as a milliarcsecond)

◆ msecond() [2/2]

int Nice::DMS::msecond ( ) const

◆ operator double() [1/2]

Nice::DMS::operator double ( ) const
inline

Cast operator DMSVar (empty).

◆ operator double() [2/2]

Nice::DMS::operator double ( ) const
inline

Cast operator DMSVar (empty).

◆ operator+() [1/2]

DMS Nice::DMS::operator+ ( DMS  d)
inline

Addition operator.

Add the two angles.

Parameters
dadd to current angle
Returns
this plus d.

◆ operator+() [2/2]

DMS Nice::DMS::operator+ ( DMS  d)
inline

Addition operator.

Add the two angles.

Parameters
dadd to current angle
Returns
this plus d.

◆ operator+=() [1/2]

DMS& Nice::DMS::operator+= ( const DMS d)
inline

Addition operator.

Add another angle to this.

Parameters
dadd to current angle
Returns
this updated with the sum of both angles.
Since
2017-02-07

◆ operator+=() [2/2]

DMS& Nice::DMS::operator+= ( const DMS d)
inline

Addition operator.

Add another angle to this.

Parameters
dadd to current angle
Returns
this updated with the sum of both angles.
Since
2017-02-07

◆ operator-() [1/2]

DMS Nice::DMS::operator- ( DMS  d)
inline

Subtraction operator.

Subtract two angles.

Parameters
dsubtract from current angle
Returns
this minues d.

◆ operator-() [2/2]

DMS Nice::DMS::operator- ( DMS  d)
inline

Subtraction operator.

Subtract two angles.

Parameters
dsubtract from current angle
Returns
this minues d.

◆ operator-=() [1/2]

DMS& Nice::DMS::operator-= ( const DMS d)
inline

Subtraction operator.

Subtract another angle from this.

Parameters
dThe angle to be subracted.
Returns
This updated with the differences this minus d.
Since
2017-02-07

◆ operator-=() [2/2]

DMS& Nice::DMS::operator-= ( const DMS d)
inline

Subtraction operator.

Subtract another angle from this.

Parameters
dThe angle to be subracted.
Returns
This updated with the differences this minus d.
Since
2017-02-07

◆ operator==() [1/2]

bool Nice::DMS::operator== ( const DMS d) const
inline

equal ?.

◆ operator==() [2/2]

bool Nice::DMS::operator== ( const DMS d) const
inline

equal ?.

◆ radians() [1/2]

double Nice::DMS::radians ( ) const

Express the angle in radians.

The computed Radians value is stored internally. On subsequent calls, the stored value is returned directly (unless the angle's value has changed).

Returns
the angle in radians (double)

◆ radians() [2/2]

double Nice::DMS::radians ( ) const

◆ reduce() [1/2]

double Nice::DMS::reduce ( ) const

return the equivalent angle between 0 and 360 degrees, in units of degrees.

Warning
does not change the value of the parent angle itself.

◆ reduce() [2/2]

double Nice::DMS::reduce ( ) const

◆ second() [1/2]

int Nice::DMS::second ( ) const
Returns
integer seconds portion of the angle
Note
a second is 1/3600 hour (not the same as an arcsecond)

◆ second() [2/2]

int Nice::DMS::second ( ) const

◆ set() [1/4]

void Nice::DMS::set ( const DMS d)
inline

Copy value of another DMS angle.

Parameters
dset angle according to this DMS object

◆ set() [2/4]

void Nice::DMS::set ( const DMS d)
inline

Copy value of another DMS angle.

Parameters
dset angle according to this DMS object

◆ set() [3/4]

void Nice::DMS::set ( const double &  d)
inline

Copy value of another DMS angle.

Identical to setD(double d).

Parameters
dset angle according to this double value
See also
setD()

◆ set() [4/4]

void Nice::DMS::set ( const double &  d)
inline

Copy value of another DMS angle.

Identical to setD(double d).

Parameters
dset angle according to this double value
See also
setD()

◆ setArcMin() [1/2]

void Nice::DMS::setArcMin ( int  m)
inline

Sets integer arcminutes portion of angle, leaving the degrees and arcsecond values intact.

Parameters
mnew integer arcminutes value

◆ setArcMin() [2/2]

void Nice::DMS::setArcMin ( int  m)
inline

Sets integer arcminutes portion of angle, leaving the degrees and arcsecond values intact.

Parameters
mnew integer arcminutes value

◆ setArcSec() [1/2]

void Nice::DMS::setArcSec ( int  s)
inline

Sets integer arcseconds portion of angle, leaving the degrees and arcminute values intact.

Parameters
snew integer arcseconds value

◆ setArcSec() [2/2]

void Nice::DMS::setArcSec ( int  s)
inline

Sets integer arcseconds portion of angle, leaving the degrees and arcminute values intact.

Parameters
snew integer arcseconds value

◆ setD() [1/6]

void Nice::DMS::setD ( const double &  x)

Sets floating-point value of angle, in degrees.

Parameters
xnew angle (double)

◆ setD() [2/6]

void Nice::DMS::setD ( const double &  x)

◆ setD() [3/6]

void Nice::DMS::setD ( int  d,
int  m,
int  s,
int  ms 
)

Sets floating-point value of angle, in degrees.

This is an overloaded member function; it behaves essentially like the above function. The floating-point value of the angle (D) is determined from the following formulae:

$ fabs(D) = fabs(d) + \frac{(m + (s/60))}{60} $ $ sgn(D) = sgn(d) $

Parameters
dinteger degrees portion of angle
minteger arcminutes portion of angle, positive
sinteger arcseconds portion of angle, positive
msinteger arcseconds portion of angle, positive

◆ setD() [4/6]

void Nice::DMS::setD ( int  d,
int  m,
int  s,
int  ms 
)

◆ setD() [5/6]

void Nice::DMS::setD ( int  d,
int  m,
const double &  s 
)

Sets floating-point value of angle, in degrees.

This is an overloaded member function; it behaves essentially like the above function. The floating-point value of the angle (D) is determined from the following formulae:

$ fabs(D) = fabs(d) + \frac{(m + (s/60))}{60} $ $ sgn(D) = sgn(d) $

Parameters
dinteger degrees portion of angle
minteger arcminutes portion of angle
sdouble arcseconds portion of angle If at least one of the three arguments is negative, the entire angle is kept negative. The main functionality of that interface definition is to express angles that are in the range from 0 to -1 deg, therefor have d=0, and need to deliver their sign by other means.

◆ setD() [6/6]

void Nice::DMS::setD ( int  d,
int  m,
const double &  s 
)

◆ setDeg() [1/2]

void Nice::DMS::setDeg ( int  d)
inline

Sets integer degrees portion of angle, leaving the arcminute and arcsecond values intact.

Parameters
dnew integer degrees value

◆ setDeg() [2/2]

void Nice::DMS::setDeg ( int  d)
inline

Sets integer degrees portion of angle, leaving the arcminute and arcsecond values intact.

Parameters
dnew integer degrees value

◆ setH() [1/6]

void Nice::DMS::setH ( const double &  x)

◆ setH() [2/6]

void Nice::DMS::setH ( const double &  x)

Sets floating-point value of angle, in hours.

Converts argument from hours to degrees, then sets floating-point value of angle, in degrees.

Parameters
xnew angle measured in hours
See also
setD()

◆ setH() [3/6]

void Nice::DMS::setH ( int  h,
int  m,
int  s,
int  ms 
)

◆ setH() [4/6]

void Nice::DMS::setH ( int  h,
int  m,
int  s,
int  ms 
)

Sets floating-point value of angle, in hours.

Converts argument values from hours to degrees, then sets floating-point value of angle, in degrees.

Parameters
hinteger hours portion of angle
minteger minutes portion of angle, positive
sinteger seconds portion of angle, positive
msinteger milliseconds portion of angle, positive
See also
setD()

◆ setH() [5/6]

void Nice::DMS::setH ( int  h,
int  m,
const double &  s 
)

◆ setH() [6/6]

void Nice::DMS::setH ( int  h,
int  m,
const double &  s 
)

Sets floating-point value of angle, in hours.

Converts argument values from hours to degrees, then sets floating-point value of angle, in degrees.

Parameters
hinteger hours portion of angle
minteger minutes portion of angle
sdouble seconds portion of angle
See also
setD()

◆ setHMin() [1/2]

void Nice::DMS::setHMin ( int  m)
inline

Sets integer minutes portion of angle, leaving the hours and seconds values intact.

Parameters
mnew integer minutes value
See also
setArcMin()

◆ setHMin() [2/2]

void Nice::DMS::setHMin ( int  m)
inline

Sets integer minutes portion of angle, leaving the hours and seconds values intact.

Parameters
mnew integer minutes value
See also
setArcMin()

◆ setHour() [1/2]

void Nice::DMS::setHour ( int  h)
inline

Sets integer hours portion of angle, leaving the minutes and seconds values intact.

Parameters
hnew integer hours value
See also
setH() setDeg()

◆ setHour() [2/2]

void Nice::DMS::setHour ( int  h)
inline

Sets integer hours portion of angle, leaving the minutes and seconds values intact.

Parameters
hnew integer hours value
See also
setH() setDeg()

◆ setHSec() [1/2]

void Nice::DMS::setHSec ( int  s)
inline

Sets integer seconds portion of angle, leaving the hours and minutes values intact.

Parameters
snew integer seconds value
See also
setArcSec()

◆ setHSec() [2/2]

void Nice::DMS::setHSec ( int  s)
inline

Sets integer seconds portion of angle, leaving the hours and minutes values intact.

Parameters
snew integer seconds value
See also
setArcSec()

◆ setRadians() [1/2]

void Nice::DMS::setRadians ( const double &  a)

◆ setRadians() [2/2]

void Nice::DMS::setRadians ( const double &  Rad)

Set angle according to the argument, in radians.

This function converts the argument to degrees, then sets the angle with setD().

Parameters
aangle in radians

◆ sin() [1/2]

double Nice::DMS::sin ( ) const

◆ sin() [2/2]

double Nice::DMS::sin ( ) const

Compute the Angle's m_sine.

Returns
the m_sine of the angle.
See also
cos()

◆ sinCos() [1/2]

void Nice::DMS::sinCos ( double &  s,
double &  c 
) const

◆ sinCos() [2/2]

void Nice::DMS::sinCos ( double &  sina,
double &  cosa 
) const

Compute sine and cosine of the angle simultaneously.

On machines using glibc >= 2.1, calling sinCos() is somewhat faster than calling sin() and cos() separately. The values are returned through the arguments (passed by reference).

Parameters
sSine of the angle
cCosine of the angle
See also
sin() cos()

◆ toDMSString() [1/2]

std::string Nice::DMS::toDMSString ( const bool  forceSign = true) const
Parameters
forceSignIf true always starts the string with an explicit plus or minus. This is the standard for the declination representation in Astronomy.
Returns
A string representation +-DD:MM:SS.sss of the angle. In degrees, arcminutes, arcseconds and milliarcseconds.
Since
2016-11-18 use the standard colons for separation and 3 digits for msec

◆ toDMSString() [2/2]

std::string Nice::DMS::toDMSString ( const bool  forceSign = true) const

◆ toHMSString() [1/2]

std::string Nice::DMS::toHMSString ( ) const

◆ toHMSString() [2/2]

std::string Nice::DMS::toHMSString ( ) const
Returns
A string HHhMMmSS.SSSs representation of the angle in hours, minutes, and seconds and milliseconds.
Since
2016-11-23 use hms for separating.

Member Data Documentation

◆ DegToRad

static const double Nice::DMS::DegToRad = 0.0174532925199432957692369076849
static

the conversion factor pi divided by 180.

Conversion factor radians to degrees.

DegToRad is a const static member equal to the number of radians in one degree (DMS::PI/180.0 = 0.01745329).

Equals Pi/180. The inverse is 57.295779513082320876798154 .

◆ m_dms

double Nice::DMS::m_dms
private

◆ PI

static const double Nice::DMS::PI = M_PI
static

Euler's constant 3.14159...

Euler's constant pi=3.14159.

PI is a const static member; it's public so that it can be used anywhere, as long as DMS.h is included.

As defined in <cmath>


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