CARMA C++
carma::services::AstroTime Class Reference

This class implements various astronomical time computation routines. More...

#include <carma/services/AstroTime.h>

Public Member Functions

 AstroTime ()
 No-arg Constructor. More...
 
 AstroTime (Location location)
 Constructor specifying the location for calculating the time functions. More...
 
double eqnEqx (double mjd=carma::util::Time::MJD())
 
Location getSite () const
 
double hourAngle (double mjd, double RA)
 Compute the hour angle for a given RA and time, at the location set in setSite() More...
 
HourAngle hourAngle (double mjd, Angle RA)
 Compute the hour angle for a given RA and time, at the location set in setSite() More...
 
double iersTableAge ()
 
double localSiderealTime (double mjd=carma::util::Time::MJD())
 
std::string lstString (double mjd=carma::util::Time::MJD(), int precision=1)
 
double meanSiderealTime (double mjd=carma::util::Time::MJD())
 
void setSite (Angle longitude, Angle latitude, Length altitude)
 Set the location for calculating the time functions using Conformable Quantities. More...
 
void setSite (double longitude, double latitude, double altitude)
 Set the location for calculating the time functions using native types. More...
 
void setSite (Location location)
 Set the location for calculating the time functions. More...
 
double ut1Utc (double mjd=carma::util::Time::MJD())
 
double xPolar (double mjd=carma::util::Time::MJD())
 
double yPolar (double mjd=carma::util::Time::MJD())
 
virtual ~AstroTime ()
 Destructor. More...
 

Static Public Member Functions

static double elapsedJulCent (double mjd=carma::util::Time::MJD())
 Computes the time in Julian Centuries (36525 days of universal time) elapsed since 2000 January 1 12 UT. More...
 
static double julianDay (double mjd=carma::util::Time::MJD())
 Returns the Julian Day given the Modified Julian Day. More...
 
static double leap (const double mjd)
 retrieve the number of leap seconds to be added to UTC to get TIA More...
 
static double modulo24 (double hours)
 

Static Public Attributes

static const double HOURS_PER_DAY
 The number of solar hours per solar day. More...
 
static const double HOURS_PER_RADIAN
 Number of solar hours per radian, i.e. More...
 
static const double HOURS_PER_SIDEREAL_DAY
 The number of solar hours per sidereal day. More...
 
static const double JULIAN_CENTURY
 Value of one Julian Century, in days. More...
 
static const double JULIAN_DAY_ZERO
 Difference between Julian Day and Modified Julian Day. More...
 
static const double MINUTES_PER_DAY
 The number of minutes per solar day. More...
 
static const double MINUTES_PER_HOUR
 Number of minutes in one hour. More...
 
static const double SECONDS_PER_DAY
 The number of seconds per solar day. More...
 
static const double SECONDS_PER_HOUR
 Number of seconds in one hour. More...
 
static const double SIDEREAL_DAY
 The length of a sidereal day in solar days. More...
 
static const double SOLAR_DAY
 The length of a solar day in sidereal days. More...
 

Detailed Description

This class implements various astronomical time computation routines.

Definition at line 32 of file AstroTime.h.

Constructor & Destructor Documentation

carma::services::AstroTime::AstroTime ( )

No-arg Constructor.

carma::services::AstroTime::AstroTime ( Location  location)

Constructor specifying the location for calculating the time functions.

Parameters
locationThe longitude, latitude, and altitude of the site represented by a Location object.
virtual carma::services::AstroTime::~AstroTime ( )
virtual

Destructor.

Member Function Documentation

static double carma::services::AstroTime::elapsedJulCent ( double  mjd = carma::util::Time::MJD())
static

Computes the time in Julian Centuries (36525 days of universal time) elapsed since 2000 January 1 12 UT.

This quantity is commonly called TU and
TU = ( JD - 2451545.0 )/36525.0;

Parameters
mjdthe MJD at which to compute TU. Defaults to the MJD at the time the method is called.
Returns
the Julian Century for the given Modified Julian Day
double carma::services::AstroTime::eqnEqx ( double  mjd = carma::util::Time::MJD())
Parameters
mjdmodified julian day
Returns
the equation of the equinoxes in seconds (i.e. the difference between apparent and mean sidereal times) specified by setSite and the given mjd.
Location carma::services::AstroTime::getSite ( ) const
Returns
Location containing lon, lat, alt (Angle,Angle,Length)
double carma::services::AstroTime::hourAngle ( double  mjd,
double  RA 
)

Compute the hour angle for a given RA and time, at the location set in setSite()

Parameters
mjdmodified julian date
RAthe right ascension, in radians
Returns
The hour angle in radians, guaranteed to be between -PI and PI
HourAngle carma::services::AstroTime::hourAngle ( double  mjd,
Angle  RA 
)

Compute the hour angle for a given RA and time, at the location set in setSite()

Parameters
mjdmodified julian date
RAan Angle representing the right ascension
Returns
an HourAngle representing the hour angle
double carma::services::AstroTime::iersTableAge ( )
Returns
the age in days of the member IERS table in days
See Also
IERSTable::age()
static double carma::services::AstroTime::julianDay ( double  mjd = carma::util::Time::MJD())
static

Returns the Julian Day given the Modified Julian Day.

Parameters
mjdthe MJD at which to compute the JD. Defaults to the MJD at the time the method is called.
Returns
the Julian Day for the given MJD
static double carma::services::AstroTime::leap ( const double  mjd)
static

retrieve the number of leap seconds to be added to UTC to get TIA

See Also
http://maia.usno.navy.mil/eo/leapsec.html
Parameters
mjdmodified julian date
Returns
number of leap seconds (currently about 32)
double carma::services::AstroTime::localSiderealTime ( double  mjd = carma::util::Time::MJD())
Parameters
mjdmodified julian day
Returns
the local apparent sidereal time in hours at the location specified by setSite and the given mjd.
std::string carma::services::AstroTime::lstString ( double  mjd = carma::util::Time::MJD(),
int  precision = 1 
)
Parameters
mjdmodified julian day
precisiondigits to the right of the decimal for seconds
Returns
The local sidereal time as a sexagesimal string, HH:MM:SS[.sss]
double carma::services::AstroTime::meanSiderealTime ( double  mjd = carma::util::Time::MJD())
Parameters
mjdmodified julian day specified by setSite and the given mjd.
static double carma::services::AstroTime::modulo24 ( double  hours)
static
Parameters
hoursInpu time in hours the input hours modulo 24;
void carma::services::AstroTime::setSite ( Angle  longitude,
Angle  latitude,
Length  altitude 
)

Set the location for calculating the time functions using Conformable Quantities.

Parameters
longitudeAngle representing the site longitude
latitudeAngle representing the site latitude
altitudeLength representing the site altitude
void carma::services::AstroTime::setSite ( double  longitude,
double  latitude,
double  altitude 
)

Set the location for calculating the time functions using native types.

Parameters
longitudethe site longitude in radians
latitudethe site latitude in radians
altitudethe site altitude in meters
void carma::services::AstroTime::setSite ( Location  location)

Set the location for calculating the time functions.

Parameters
locationThe longitude, latitude, and altitude of the site represented by a Location object.
double carma::services::AstroTime::ut1Utc ( double  mjd = carma::util::Time::MJD())
Parameters
mjdmodified julian day
Returns
the UT1 minus UTC (dut1) difference in seconds at the given mjd Based on the IERS tables
double carma::services::AstroTime::xPolar ( double  mjd = carma::util::Time::MJD())
Parameters
mjdmodified julian day
Returns
X polar motion, in arcsecs Based on the IERS tables
double carma::services::AstroTime::yPolar ( double  mjd = carma::util::Time::MJD())
Parameters
mjdmodified julian day
Returns
Y polar motion, in arcsecs Based on the IERS tables

Member Data Documentation

const double carma::services::AstroTime::HOURS_PER_DAY
static

The number of solar hours per solar day.

Definition at line 233 of file AstroTime.h.

const double carma::services::AstroTime::HOURS_PER_RADIAN
static

Number of solar hours per radian, i.e.

12/pi

Definition at line 263 of file AstroTime.h.

const double carma::services::AstroTime::HOURS_PER_SIDEREAL_DAY
static

The number of solar hours per sidereal day.

Definition at line 238 of file AstroTime.h.

const double carma::services::AstroTime::JULIAN_CENTURY
static

Value of one Julian Century, in days.

Definition at line 211 of file AstroTime.h.

const double carma::services::AstroTime::JULIAN_DAY_ZERO
static

Difference between Julian Day and Modified Julian Day.


JD = MJD + JULIAN_DAY_ZERO

Definition at line 206 of file AstroTime.h.

const double carma::services::AstroTime::MINUTES_PER_DAY
static

The number of minutes per solar day.

Definition at line 228 of file AstroTime.h.

const double carma::services::AstroTime::MINUTES_PER_HOUR
static

Number of minutes in one hour.

Definition at line 258 of file AstroTime.h.

const double carma::services::AstroTime::SECONDS_PER_DAY
static

The number of seconds per solar day.

Definition at line 216 of file AstroTime.h.

const double carma::services::AstroTime::SECONDS_PER_HOUR
static

Number of seconds in one hour.

Definition at line 253 of file AstroTime.h.

const double carma::services::AstroTime::SIDEREAL_DAY
static

The length of a sidereal day in solar days.

Definition at line 248 of file AstroTime.h.

const double carma::services::AstroTime::SOLAR_DAY
static

The length of a solar day in sidereal days.

Definition at line 243 of file AstroTime.h.


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