mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Positional Astronomy

Utilities for calculating sky positions

Functions

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...
 

Function Documentation

◆ calcAzEl()

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.

References: J. Meeus "Astronomical Algorithms", 1991; V. Pisacane "Fundamentals of Space Systems", 2nd ed., 2005.

Template Parameters
realTthe real floating point type for calculations
Returns
0 on success
-1 on error
Parameters
[out]azthe calculated azimuth [degrees]
[out]elthe calculate elevation [degrees]
[in]hathe hour ange [degrees]
[in]decthe declination [degrees]
[in]latthe latitude [degrees]

Definition at line 212 of file astroDynamics.hpp.

◆ parAngDeg() [1/2]

template<typename realT >
realT mx::astro::parAngDeg ( realT  ha,
realT  dec,
realT  lat,
bool  newflag 
)

Calculate the Parallactic Angle, with angles in degrees.

Returns
the parallactic angle in degrees.
Test:
Scenario: calculating parallactic angles [test doc]
Note
2020-Jan-19: re-reordered arguments and added newflag to prevent compilation of current programs so the new order is implemented.
Parameters
[in]hathe hour angle, in degrees, negative to the east
[in]decthe object declination, in degrees.
[in]latthe observer latitude, in degrees.
[in]newflag[temporary] to force adaptation of new argument order. Unused, so can be true or false. Added 2020-Jan-19.

Definition at line 301 of file astroDynamics.hpp.

References mx::math::dtor(), mx::astro::parAngRad(), and mx::math::rtod().

◆ parAngDeg() [2/2]

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.

Returns
the parallactic angle in degrees.
Parameters
[in]sinHAthe sine of the target hour angle
[in]cosHAthe cosine of the target hour angle
[in]sinDecthe sine of the target declination
[in]cosDecthe cosine of the target declination
[in]tanLatthe tangent of the observer latitude

Definition at line 263 of file astroDynamics.hpp.

References mx::astro::parAngRad(), and mx::math::rtod().

Referenced by SCENARIO().

◆ parAngRad() [1/2]

template<typename realT >
realT mx::astro::parAngRad ( realT  ha,
realT  dec,
realT  lat 
)

Calculate the Parallactic Angle, with angles in radians.

Returns
the parallactic angle in radians.
Test:
Scenario: calculating parallactic angles [test doc]
Parameters
[in]hathe hour angle, in radians, negative to the east
[in]decthe object declination, in radians.
[in]latthe observer latitude, in radians.

Definition at line 282 of file astroDynamics.hpp.

Referenced by mx::astro::parAngDeg().

◆ parAngRad() [2/2]

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.

Returns
the parallactic angle in radians.
Test:
Scenario: calculating parallactic angles [test doc]
Parameters
[in]sinHAthe sine of the target hour angle
[in]cosHAthe cosine of the target hour angle
[in]sinDecthe sine of the target declination
[in]cosDecthe cosine of the target declination
[in]tanLatthe tangent of the observer latitude

Definition at line 244 of file astroDynamics.hpp.