Sun position
Sun position algorithm
|
Go to the documentation of this file.
197 bool correctionInUse;
218 int hour,
int minute,
double second,
222 double sky_unixTimespecToJ2kd(
struct timespec uTs);
225 #ifdef INCLUDE_MJD_ROUTINES
227 double sky_calTimeToMjd(
int year,
int month,
int day,
228 int hour,
int minute,
double second,
230 double sky_unixTimeToMjd(time_t unixTime);
232 double sky_unixTimespecToMjd(
struct timespec uTs);
242 #ifdef INCLUDE_MJD_ROUTINES
244 void sky_updateTimesFromMjd(
double mjdUtc,
291 #ifdef INCLUDE_MJD_ROUTINES
292 void sky_mjdToCalTime(
double mjd,
338 double longitude_deg,
377 double *hourAngle_rad,
378 double *declination_rad);
V3D_Matrix azElPolM
rotation matrix from TIRS to Az/El coords
general.h - definitions of general use to (standard) C programs
V3D_Vector appCirsV
Direction of object in apparent or CIRS coordinates (effectively a unit vector).
void sky_j2kdToCalTime(double j2k_d, int *year, int *month, int *day, int *hour, int *minute, double *second)
This procedure converts the integral part of the date in "J2KD" form to a calendar date and the fract...
double deltaT_d
TT - UT1, scaled to days.
This structure contains relatively constant data, and is set up by one of the three functions sky_ini...
double deltaTT_d
TT - UTC, scaled to days.
void sky_siteTirsToTopo(const V3D_Vector *terInterV, double dist_au, const Sky_SiteProp *site, Sky_SiteHorizon *topo)
Transform a coordinate vector from the Terrestrial Intermediate Reference System to topocentric Az/El...
void sky_setPolarMotion(double xPolar_as, double yPolar_as, double t_cy, Sky_PolarMot *polar)
Update polar motion correction.
double astLat_rad
Astronomical latitude of site (ϕA) (radian)
void sky_updateTimes(double j2kUtc_d, const Sky_DeltaTs *d, Sky_Times *t)
Convert the given "J2KD" in the UTC timescale to the other timescales, and pre-calculate some other q...
Struct used for holding an object's coordinates in equatorial apparent or Intermediate coordinates.
void sky_setSiteLocation(double latitude_deg, double longitude_deg, double height_m, Sky_SiteProp *site)
Initialise the site structure by calculating those site-related values that do not change with time.
double j2kTT_cy
Julian centuries since J2000.0, TT timescale [T].
V3D_Matrix * azElM
points to either azElPolM or azElBaseM
This structure contains the continuously varying time (and earth rotation) data, in various forms tha...
double geocRadius_km
Approx geocentric radius of site (≈ ae*ρ)(km)
V3D_Matrix haDecM
rotation matrix from Az/El to HA/Dec coords
double rhoSin_au
ae*ρ*sin(ϕ - ϕ′) geocentre-to-site x (AU)
double era_rad
Earth Rotation Angle (radian) [θ].
double eqEq_rad
Equation of the Equinoxes (radian).
double deltaUT_d
UT1 - UTC, scaled to days.
double azimuth_rad
azimuth (radian)
double timestamp_cy
Time applying to the other figures in this struct (centuries since J2000.0, TT timescale)
void sky_adjustSiteForPolarMotion(const Sky_PolarMot *polar, Sky_SiteProp *site)
Modify our azEl rotation matrix to incorporate a polar motion rotation matrix.
double timeZone_d
time zone offset from UTC (fraction of a day)
void sky_setupSiteSurface(double azimuth_deg, double slope_deg, Sky_SiteHorizon *surface)
Set the orientation and slope of a surface (such as a solar panel) for which you want to calculate th...
double distance_au
Distance to object (Astronomical Units) or 0.0 for far distant objects (that is, those with negligibl...
void sky_initTimeDetailed(double mjdUtc, double usnoMjdBase, double usnoCoeffC11, double usnoCoeffC12, int deltaAT_s, Sky_DeltaTs *d)
This is one of three alternative routines for setting up the various delta time values for use in ong...
double j2kTT_d
days since J2000.0, TT timescale [D]
double sky_unixTimeToJ2kd(time_t unixTime)
Convert a time in Unix system time format to days since 2000 Jan 1, noon UTC.
This structure contains polar motion parameters and a rotation matrix.
void sky_setSiteTimeZone(double timeZone_h, Sky_SiteProp *site)
Set the time zone offset for this site.
double astLong_rad
Astronomical longitude of site (radian)
void sky_setSiteTempPress(double temperature_degC, double pressure_hPa, Sky_SiteProp *site)
Set refraction coefficients based on atmospheric temperature and pressure at the site.
void sky_initTime(int deltaAT_s, double deltaUT_s, Sky_DeltaTs *d)
This is one of three alternative routines for setting up the various delta time values for use in ong...
double rhoCos_au
-ae*ρ*cos(ϕ - ϕ′) geocentre-to-site z (AU)
vectors3d.h - Three dimensional geometry, vectors and matrices
double elevation_rad
elevation (or altitude) (radian)
double mjdUtc
Modified Julian Date (= JD - 2 400 000.5), UTC.
double j2kUT1_d
days since J2000.0, UT1 timescale [Du]
void sky_siteAzElToHaDec(const V3D_Vector *topoV, const Sky_SiteProp *site, double *hourAngle_rad, double *declination_rad)
Take a topocentric position vector in Azimuth/Elevation frame and use it to calculate the observed Ho...
void sky_initTimeSimple(Sky_DeltaTs *d)
This is one of three alternative routines for setting up the various delta time values for use in ong...
double refracPT
Refraction correction: pressure & temperature.
double sky_siteIncidence_rad(const V3D_Vector *topoV, const V3D_Vector *surfaceV)
Calculate the incidence angle of rays from the celestial object described by topoV (such as the sun) ...
void sky_setSiteLoc2(double astLat_deg, double astLong_deg, double geodLat_deg, double geodLong_deg, double height_m, Sky_SiteProp *site)
Alternative initialisation function to sky_setSiteLocation().
double sky_calTimeToJ2kd(int year, int month, int day, int hour, int minute, double second, double tz_h)
Return the number of days (and fraction of a day) since noon 2000 Jan 1 (UTC) of the given calendar d...
V3D_Matrix azElBaseM
as above, but excluding polar motion correctn
double diurnalAberr
Diurnal aberration: caused by earth rotation.
Coordinates of a celestial object in the horizon frame, in both rectangular and polar forms.
V3D_Vector rectV
unit vector in horizon coordinates