Angle Class Reference

#include <orsa_units.h>

List of all members.

Public Member Functions

 Angle ()
 Angle (double x)
void SetRad (double)
void GetRad (double &) const
double GetRad () const
void SetDPS (double d, double p, double s)
void GetDPS (double &d, double &p, double &s) const
void SetHMS (double h, double m, double s)
void GetHMS (double &h, double &m, double &s) const


Constructor & Destructor Documentation

Angle  )  [inline]
 

Definition at line 544 of file orsa_units.h.

00544 { radians = 0; }

Angle double  x  )  [inline]
 

Definition at line 545 of file orsa_units.h.

00545 { radians = x; }


Member Function Documentation

void GetDPS double &  d,
double &  p,
double &  s
const
 

Definition at line 1814 of file orsa_units.cc.

References orsa::pi.

01814                                                           {
01815     double frac, fdeg = (180/pi)*radians;
01816     if (fdeg < 0.0) {
01817       d    = -floor(-fdeg);
01818       frac = d - fdeg;
01819     } else {
01820       d    = floor(fdeg);
01821       frac = fdeg - d;
01822     }
01823     //
01824     p = floor(frac*60.0);  
01825     s = frac*3600.0 - p*60.0;
01826   } 

void GetHMS double &  h,
double &  m,
double &  s
const
 

Definition at line 1835 of file orsa_units.cc.

References orsa::pi.

01835                                                           {
01836     double frac, fh = (180/pi)*radians/15.0;
01837     if (fh < 0.0) {
01838       h    = -floor(-fh);
01839       frac = h - fh;
01840     } else {
01841       h    = floor(fh);
01842       frac = fh - h;
01843     }
01844     //
01845     m = floor(frac*60.0);  
01846     s = frac*3600.0 - m*60.0; 
01847   }    

double GetRad  )  const
 

Definition at line 1803 of file orsa_units.cc.

01803                              {
01804     return radians;
01805   }

void GetRad double &   )  const
 

Definition at line 1799 of file orsa_units.cc.

Referenced by Newton::Acceleration(), orsa::Compute_Gauss(), orsa::Compute_TestMethod(), JPLFile::GetEph(), orsa::OrbitDifferentialCorrectionsLeastSquares(), and TLEFile::Read().

01799                                      {
01800     a = radians;
01801   }

void SetDPS double  d,
double  p,
double  s
 

Definition at line 1807 of file orsa_units.cc.

References orsa::pi.

Referenced by orsa::alpha_delta_meridian(), orsa::alpha_delta_meridian_moon(), orsa::obleq(), RWOFile::Read(), and MPCObsFile::Read().

01807                                                     {
01808     if (d >= 0) 
01809       radians = (pi/180)*(d+p/60.0+s/3600.0);
01810     else 
01811       radians = (pi/180)*(d-p/60.0-s/3600.0);
01812   }

void SetHMS double  h,
double  m,
double  s
 

Definition at line 1828 of file orsa_units.cc.

References orsa::pi.

Referenced by orsa::gmst(), RWOFile::Read(), and MPCObsFile::Read().

01828                                                     {
01829     if (h >= 0) 
01830       radians = 15*(pi/180)*(h+m/60.0+s/3600.0);
01831     else
01832       radians = 15*(pi/180)*(h-m/60.0-s/3600.0);
01833   }

void SetRad double   ) 
 

Definition at line 1795 of file orsa_units.cc.

Referenced by orsa::alpha_delta_meridian(), and Sky::Compute_J2000().

01795                              {
01796     radians = a;
01797   }


The documentation for this class was generated from the following files:
Generated on Tue Jan 11 15:29:56 2005 for liborsa by  doxygen 1.4.0