mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
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.
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.
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.
template<typename realT>
realT mx::astro::parAngRad (realT ha, realT dec, realT lat)
 Calculate the Parallactic Angle, with angles in radians.
template<typename realT>
realT mx::astro::parAngDeg (realT ha, realT dec, realT lat, bool newflag)
 Calculate the Parallactic Angle, with angles in degrees.

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 208 of file astroDynamics.hpp.

References mx::math::pi().

◆ 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.
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 295 of file astroDynamics.hpp.

References mx::math::dtor(), 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 258 of file astroDynamics.hpp.

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

Referenced by TEST_CASE().

◆ 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.
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 276 of file astroDynamics.hpp.

References parAngRad().

◆ 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.
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 239 of file astroDynamics.hpp.

Referenced by parAngDeg(), parAngDeg(), and parAngRad().