Sun position
Sun position algorithm
|
sky1.h - astronomical coordinate conversion routines, IAU 1980 More...
Go to the source code of this file.
Data Structures | |
struct | Sky1_Prec1976 |
Precession angles. More... | |
struct | Sky1_Nut1980 |
Nutation angles and obliquity. More... | |
Functions | |
void | sky1_frameBiasFK5 (V3D_Matrix *biasM) |
Create the frame bias matrix from the IAU 2000 precession-nutation model. More... | |
void | sky1_precessionIAU1976 (double t0, double t1, Sky1_Prec1976 *terms) |
This procedure calculates the equatorial precession parameters ζ, z, and θ which represent the rotation required to transform the FK5 equatorial reference system of Julian epoch t0 to that of Julian epoch t1, according to the IAU 1976 precession constants. More... | |
void | sky1_createPrec1976Matrix (const Sky1_Prec1976 *terms, V3D_Matrix *precM) |
This routine calculates the precession matrix, based on angles ζ, z, and θ. More... | |
void | sky1_nutationIAU1980 (double t_cy, int precision, Sky1_Nut1980 *nut) |
Calculates the nutation in longitude and obliquity, according to the IAU 1980 Nutation Theory. More... | |
void | sky1_epsilon1980 (double t_cy, Sky1_Nut1980 *nut) |
Calculate the obliquity of the ecliptic and the equation of the equinoxes. More... | |
void | sky1_createNut1980Matrix (const Sky1_Nut1980 *nut, V3D_Matrix *nutM) |
This routine calculates the Nutation matrix, using the nutation in longitude, the nutation in obliquity, and the mean obliquity of the equator. More... | |
void | sky1_createNPmatrix (double t0_cy, double t1_cy, int precision, V3D_Matrix *npM) |
Call the various precession and nutation routines in this module to create a combined precession and nutation rotation matrix, suitable for converting a celestial object's coordinates from mean place at epoch t0_cy to apparent coordinates at epoch t1_cy. More... | |
double | sky1_gmSiderealTimeIAU1982 (double du) |
Calculate the Greenwich mean sidereal time. More... | |
void | sky1_appToTirs (const V3D_Vector *appV, double j2kUT1_d, double eqEq_rad, V3D_Vector *terInterV) |
Convert a position in geocentric apparent coordinates to geocentric coordinates in the Terrestrial Intermediate Reference System. More... | |
sky1.h - astronomical coordinate conversion routines, IAU 1980
This is one of three alternative modules: sky0.h / sky0.c, sky1.h / sky1.c and sky2.h / sky2.c. They contain routines for transforming astronomical positions from frame to another: precession, nutation, sidereal time etc. and they reflect changes in the International Astronomical Union's precession and nutation theory. The differences are:
This module (sky1.h / sky1.c) contains precession and nutation routines. The precession routine uses the IAU 1976 algorithm. The nutation routine uses the IAU 1980 algorithm.
Definition in file sky1.h.
void sky1_frameBiasFK5 | ( | V3D_Matrix * | biasM | ) |
Create the frame bias matrix from the IAU 2000 precession-nutation model.
This matrix is used to convert coordinates from the Geocentric Celestial Reference System (GCRS) to FK5 reference system. (Although anything to do with the ICRS/GCRS is related to the IAU2000+ precession-nutation theory, this routine is included here to allow ICRS star catalogue positions to be converted to apparent coordinates using the IAU1980 precession-nutation theory, which is quite good enough for tracking. It is not good enough for astrometry, but it will get us to better than within an arcsecond of our desired apparent position).
[out] | biasM | Frame bias matrix B |
void sky1_precessionIAU1976 | ( | double | t0_cy, |
double | t1_cy, | ||
Sky1_Prec1976 * | terms | ||
) |
This procedure calculates the equatorial precession parameters ζ, z, and θ which represent the rotation required to transform the FK5 equatorial reference system of Julian epoch t0 to that of Julian epoch t1, according to the IAU 1976 precession constants.
[in] | t0_cy | Julian centuries since J2000.0 of initial epoch, TT timescale |
[in] | t1_cy | Julian centuries since J2000.0 of final epoch, TT timescale |
[out] | terms | The three precession angles ζ, z, θ. |
void sky1_createPrec1976Matrix | ( | const Sky1_Prec1976 * | terms, |
V3D_Matrix * | precM | ||
) |
This routine calculates the precession matrix, based on angles ζ, z, and θ.
precM is the combined orthogonal rotation matrix P, required for rigorous precession transformations using rectangular coordinates and matrix methods: V1 = P * V0 It appears to be calculated from
P = R3(-z) × R2(θ) × R3(-ζ)
[in] | terms | The three precession angles ζ, z, θ, as returned by sky1_precessionIAU1976() |
[out] | precM | Precession rotation matrix |
void sky1_nutationIAU1980 | ( | double | t_cy, |
int | precision, | ||
Sky1_Nut1980 * | nut | ||
) |
Calculates the nutation in longitude and obliquity, according to the IAU 1980 Nutation Theory.
Calculates first the fundamental nutation arguments, and then a series of terms. There are 106 terms in the series, but fewer may be selected for faster execution.
[in] | t_cy | Julian centuries since J2000.0, TT timescale |
[in] | precision | How much precision do you want? Valid range [0, 4]. Values outside this range will be clamped to the range.
|
[out] | nut | field nut->dPsi_rad - Nutation in longitude Δψ (radian) field nut->dEps_rad - Nutation in obliquity Δε (radian) |
With precision = 4, differences of up to 5 milliarcseconds were seen.
For tracking purposes, these are still very small. The testing was not exhaustive, so take this as a rough guide only.
void sky1_epsilon1980 | ( | double | t_cy, |
Sky1_Nut1980 * | nut | ||
) |
Calculate the obliquity of the ecliptic and the equation of the equinoxes.
[in] | t_cy | Julian centuries since J2000.0, TT timescale |
[in,out] | nut | [in] field nut->dPsi_rad - Nutation in longitude Δψ, as returned by function sky1_nutationIAU1980() (radian) [in] field nut->dEps_rad - Nutation in obliquity Δε, as returned by function sky1_nutationIAU1980() (radian) [out] field nut->eps0_rad - Mean obliquity of the ecliptic ε0 (radian) [out] field nut->eqEq_rad - Equation of the equinoxes = Δψ * cos(ε0 + Δε) (radian) Note: not seconds |
iauObl80()
void sky1_createNut1980Matrix | ( | const Sky1_Nut1980 * | nut, |
V3D_Matrix * | nutM | ||
) |
This routine calculates the Nutation matrix, using the nutation in longitude, the nutation in obliquity, and the mean obliquity of the equator.
We calculate the Nutation matrix in a completely rigorous manner from the product of three rotation matrices:
N = R1(-ε) × R3(-Δψ) × R1(ε0) where ε = ε0 + Δε (true obliquity of the equator)
[in] | nut | Angles Δψ, Δε and ε0, as returned by functions sky1_nutationIAU1980() and sky1_epsilon1980() |
[out] | nutM | Nutation rotation matrix N |
void sky1_createNPmatrix | ( | double | t0_cy, |
double | t1_cy, | ||
int | precision, | ||
V3D_Matrix * | npM | ||
) |
Call the various precession and nutation routines in this module to create a combined precession and nutation rotation matrix, suitable for converting a celestial object's coordinates from mean place at epoch t0_cy to apparent coordinates at epoch t1_cy.
[in] | t0_cy | Julian centuries since J2000.0 of initial epoch, TT timescale |
[in] | t1_cy | Julian centuries since J2000.0 of final epoch, TT timescale |
[in] | precision | Precision specification to be passed to routine sky1_nutationIAU1980(). See that routine for explanation |
[out] | npM | Combined precession and nutation matrix NP = N × P |
This function calls routines sky1_precessionIAU1976(), sky1_createPrec1976Matrix(), sky1_nutationIAU1980(), sky1_epsilon1980() and sky1_createNut1980Matrix() to calculate the precession and nutation matrices.
double sky1_gmSiderealTimeIAU1982 | ( | double | du | ) |
Calculate the Greenwich mean sidereal time.
[in] | du | Days since J2000.0, UT1 timescale |
void sky1_appToTirs | ( | const V3D_Vector * | appV, |
double | j2kUT1_d, | ||
double | eqEq_rad, | ||
V3D_Vector * | terInterV | ||
) |
Convert a position in geocentric apparent coordinates to geocentric coordinates in the Terrestrial Intermediate Reference System.
This is the first stage of converting apparent coordinates to topocentric coordinates. The resulting vector depends upon the current rotational position of the Earth. (For the second stage, to obtain topocentric coordinates, call routine sky_siteTirsToTopo()).
[in] | appV | Position vector of apparent place (unit vector in equatorial coordinates) |
[in] | j2kUT1_d | days since J2000.0, UT1 timescale, as returned by function sky_updateTimes() in the j2kUT1_d field of the Sky_Times struct. |
[in] | eqEq_rad | Equation of the equinoxes (radian), as returned by function sky1_epsilon1980() in the eqEq_rad field of the Sky1_Nut1980 struct. |
[out] | terInterV | Position vector in Terrestrial Intermediate Ref System |