mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Various utilities for astrodynamics. More...
Various utilities for astrodynamics.
Definition in file astroDynamics.hpp.
Go to the source code of this file.
Namespaces | |
mx | |
The mxlib c++ namespace. | |
Functions | |
template<typename realT > | |
int | mx::astro::hrMinSecFromDay (int &Dy, int &hr, int &min, realT &sec, realT day) |
Breaks down a decimal day into hours, minutes and decimal point seconds. More... | |
template<typename realT > | |
int | mx::astro::getGMST (realT &GMST, int Yr, int Mo, int Dy, int hr, int min, realT sec) |
Returns Greenwich Mean Sidereal Time for a given UTC time. More... | |
template<typename realT > | |
int | mx::astro::getGMST (realT &GMST, int Yr, int Mo, realT day) |
Returns Greenwich Mean Sidereal Time for a given UTC time. More... | |
template<typename realT > | |
int | mx::astro::getLMST (realT &LMST, int Yr, int Mo, int Dy, int hr, int min, realT sec, realT lon) |
Returns Local Mean Sidereal Time for a given UTC time and longitude. More... | |
template<typename realT > | |
int | mx::astro::getLMST (realT &LMST, int Yr, int Mo, realT day, realT lon) |
Returns Local Mean Sidereal Time for a given UTC time. More... | |
template<typename realT > | |
int | mx::astro::calcAzEl (realT &az, realT &el, realT ha, realT dec, realT lat) |
Calculates the Azimuth and Elevation for a given Hour-Angle, Declination, and Latitude. More... | |
template<typename realT > | |
realT | mx::astro::parAngRad (realT sinHA, realT cosHA, realT sinDec, realT cosDec, realT tanLat) |
Calculate the Parallactic Angle from the pre-calculated trig functions. Result in radians. More... | |
template<typename realT > | |
realT | mx::astro::parAngDeg (realT sinHA, realT cosHA, realT sinDec, realT cosDec, realT tanLat) |
Calculate the Parallactic Angle from the pre-calculated trig functions. Result in degrees. More... | |
template<typename realT > | |
realT | mx::astro::parAngRad (realT ha, realT dec, realT lat) |
Calculate the Parallactic Angle, with angles in radians. More... | |
template<typename realT > | |
realT | mx::astro::parAngDeg (realT ha, realT dec, realT lat, bool newflag) |
Calculate the Parallactic Angle, with angles in degrees. More... | |
int mx::astro::getGMST | ( | realT & | GMST, |
int | Yr, | ||
int | Mo, | ||
int | Dy, | ||
int | hr, | ||
int | min, | ||
realT | sec | ||
) |
Returns Greenwich Mean Sidereal Time for a given UTC time.
Uses the SOFA 2006 GMST function, and a (for now) hardcoded value of dUT1
0 | on success |
[out] | GMST | GMST in hours |
[in] | Yr | integer year |
[in] | Mo | integer month (1-12) |
[in] | Dy | integer day (1-31) |
[in] | hr | integer hour (0-23) |
[in] | min | integer minute (0-59) |
[in] | sec | decimal second (0-59) |
Definition at line 76 of file astroDynamics.hpp.
References mx::astro::getGMST().
Referenced by mx::astro::getGMST(), and mx::astro::getLMST().
int mx::astro::getGMST | ( | realT & | GMST, |
int | Yr, | ||
int | Mo, | ||
realT | day | ||
) |
Returns Greenwich Mean Sidereal Time for a given UTC time.
Uses the SOFA 2006 GMST function, and a (for now) hardcoded value of dUT1
GMST | [output] GMST in hours |
Yr | [input] integer year |
Mo | [input] integer month (1-12) |
day | [input] decimal day (1-31) |
0 | on sucess |
[out] | GMST | GMST in hours |
[in] | Yr | integer year |
[in] | Mo | integer month (1-12) |
[in] | day | decimal day (1-31) |
Definition at line 134 of file astroDynamics.hpp.
References mx::astro::constants::day(), and mx::astro::getGMST().
int mx::astro::getLMST | ( | realT & | LMST, |
int | Yr, | ||
int | Mo, | ||
int | Dy, | ||
int | hr, | ||
int | min, | ||
realT | sec, | ||
realT | lon | ||
) |
Returns Local Mean Sidereal Time for a given UTC time and longitude.
Uses the SOFA 2006 GMST function, and a (for now) hardcoded value of dUT1
0 | on success |
[out] | LMST | LMST in hours |
[in] | Yr | integer year |
[in] | Mo | integer month (1-12) |
[in] | Dy | integer day (1-31) |
[in] | hr | integer hour (0-23) |
[in] | min | integer minute (0-59) |
[in] | sec | decimal second (0-59) |
[in] | lon | longitude in degrees, E+, W- |
Definition at line 154 of file astroDynamics.hpp.
References mx::astro::getGMST(), and mx::astro::getLMST().
Referenced by mx::astro::getLMST().
int mx::astro::getLMST | ( | realT & | LMST, |
int | Yr, | ||
int | Mo, | ||
realT | day, | ||
realT | lon | ||
) |
Returns Local Mean Sidereal Time for a given UTC time.
Uses the SOFA 2006 GMST function, and a (for now) hardcoded value of dUT1
realT | the floating point type for all calculations |
0 | on sucess |
[out] | LMST | LMST in hours |
[in] | Yr | integer year |
[in] | Mo | integer month (1-12) |
[in] | day | decimal day (1-31) |
[in] | lon | longitude in degrees, E+, W- |
Definition at line 185 of file astroDynamics.hpp.
References mx::astro::constants::day(), and mx::astro::getLMST().
int mx::astro::hrMinSecFromDay | ( | int & | Dy, |
int & | hr, | ||
int & | min, | ||
realT & | sec, | ||
realT | day | ||
) |
Breaks down a decimal day into hours, minutes and decimal point seconds.
Assumes 86400 seconds per day, ignoring leap seconds.
realT | the floating point type for calculations |
0 | on success |
-1 | on failure. |
[out] | Dy | the integer day |
[out] | hr | the integer hour |
[out] | min | the integer minute |
[out] | sec | the integer second |
[in] | day | the decimal day to be broken down |
Definition at line 54 of file astroDynamics.hpp.
References mx::astro::constants::day(), and mx::astro::hrMinSecFromDay().
Referenced by mx::astro::hrMinSecFromDay().