Sun position
Sun position algorithm
|
sky0.h - astronomical coordinate conversion for NREL Sun Position Algorithm More...
Go to the source code of this file.
Data Structures | |
struct | Sky0_Nut1980 |
Nutation angles and obliquity. More... | |
Functions | |
void | sky0_nutationSpa (double t_cy, Sky0_Nut1980 *nut) |
Calculates the nutation in longitude and obliquity, according to the algorithm set out in the NREL SPA document. More... | |
void | sky0_epsilonSpa (double t_cy, Sky0_Nut1980 *nut) |
Calculate the obliquity of the ecliptic and the equation of the equinoxes. More... | |
double | sky0_gmSiderealTimeSpa (double du) |
Calculate the Greenwich mean sidereal time using the algorithm from the NREL SPA document. More... | |
void | sky0_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... | |
sky0.h - astronomical coordinate conversion for NREL Sun Position Algorithm
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 (sky0.h / sky0.c) contains only those routines necessary for supporting the NREL Solar Position Algorithm and Moon Position algorithms. Basically this is a subset of the routines in the sky1.h / sky1.c module. Precession is omitted, and the nutation routine uses only the largest 63 terms of the IAU 1980 nutation algorithm.
Definition in file sky0.h.
void sky0_nutationSpa | ( | double | t_cy, |
Sky0_Nut1980 * | nut | ||
) |
Calculates the nutation in longitude and obliquity, according to the algorithm set out in the NREL SPA document.
This is a simplified version of the IAU 1980 Nutation Theory. Calculates first the fundamental nutation arguments, and then a series of terms. There are 106 terms in the full series, but this routine uses only the largest 63 of those terms.
[in] | t_cy | centuries since J2000.0, TT timescale |
[out] | nut | field nut->dPsi_rad - Nutation in longitude Δψ (radian) field nut->dEps_rad - Nutation in obliquity Δε (radian) |
void sky0_epsilonSpa | ( | double | t_cy, |
Sky0_Nut1980 * | nut | ||
) |
Calculate the obliquity of the ecliptic and the equation of the equinoxes.
[in] | t_cy | centuries since J2000.0, TT timescale |
[in,out] | nut | [in] field nut->dPsi_rad - Nutation in longitude Δψ, as returned by function sky0_nutationSpa() (radian) [in] field nut->dEps_rad - Nutation in obliquity Δε, as returned by function sky0_nutationSpa() (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 |
double sky0_gmSiderealTimeSpa | ( | double | du | ) |
Calculate the Greenwich mean sidereal time using the algorithm from the NREL SPA document.
This is basically the IAU 1982 algorithm, but the various constants have been scaled in degrees.
[in] | du | days since J2000.0, UT1 timescale |
void sky0_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 sky0_epsilonSpa() in the eqEq_rad field of the Sky0_Nut1980 struct. |
[out] | terInterV | Position vector in Terrestrial Intermediate Ref System |