kstars
Common ephemeris functions.
The ephemeris functions are date-dependent. More...
Functions | |
void | aberrate (double *RA, double *Dec) |
double | angularDistance (double fromRA, double fromDEC, double toRA, double toDEC) |
void | apparentCoord (double jd0, double jdf, double *RA, double *Dec) |
double | calculateDec (double latitude, double SDTime) |
double | calculateRA (double SDTime) |
double | constAberr () |
double | dEcLong () |
double | dObliq () |
double | earthEccentricity () |
double | earthPerihelionLongitude () |
double | julianCenturies () |
void | nutate (double *RA, double *Dec) |
double | obliquity () |
double | p1 (int i1, int i2) |
double | p2 (int i1, int i2) |
void | precessFromAnyEpoch (double jd0, double jdf, double *RA, double *Dec) |
double | sunMeanAnomaly () |
double | sunMeanLongitude () |
double | sunTrueAnomaly () |
double | sunTrueLongitude () |
void | updateAstroValues (double jd) |
Detailed Description
The ephemeris functions are date-dependent.Call updateAstroValues() to update orbital values used in many algorithms before using any ephemeris function. You only need to call updateAstroValues() again if you need to update the orbital values for a different date.
Function Documentation
void aberrate | ( | double * | RA, | |
double * | Dec | |||
) |
Aberrate a given RA and Dec.
- Parameters:
-
RA a pointer to a double containing the Right ascension in degrees to aberrate. The function stores the processed Right ascension back in this variable. Dec a pointer to a double containing the delination in degrees to aberrate. The function stores the processed delination back in this variable.
double angularDistance | ( | double | fromRA, | |
double | fromDEC, | |||
double | toRA, | |||
double | toDEC | |||
) |
Calculates the angular distance between two points on the celestial sphere.
- Parameters:
-
fromRA Right ascension of starting point in degrees. fromDEC Declination of starting point in degrees. toRA Right ascension of ending point in degrees. toDEC Declination of ending point in degrees.
- Returns:
- Angular seperation in degrees.
void apparentCoord | ( | double | jd0, | |
double | jdf, | |||
double * | RA, | |||
double * | Dec | |||
) |
Calculate the apparent coordiantes for RA and Dec from any epoch to any epoch.
- Parameters:
-
jd0 starting epoch. jdf final epoch. RA a pointer to a double containing the Right ascension in hours. The function stores the processed Right ascension back in this variable. Dec a pointer to a double containing the delination in degrees. The function stores the processed delination back in this variable.
double calculateDec | ( | double | latitude, | |
double | SDTime | |||
) |
Calculates the declination on the celestial sphere at 0 degrees altitude given the siderial time and latitude.
- Parameters:
-
latitude Current latitude. SDTime Current sideral time.
- Returns:
- Returns declinatation at 0 degrees altitude for the given parameters.
double calculateRA | ( | double | SDTime | ) |
Calculates the right ascension on the celestial sphere at 0 degrees azimuth given the siderial time.
- Parameters:
-
SDTime Current sidereal time.
- Returns:
- Returns right ascension at 0 degrees azimith for the given parameters.
double constAberr | ( | ) |
Returns the constant of aberration (20.49 arcsec).
double dEcLong | ( | ) |
Returns the change in Ecliptic Longitude due to nutation.
double dObliq | ( | ) |
Returns the change in obliquity due to the nutation of Earth's orbit.
double earthEccentricity | ( | ) |
Returns eccentricity of Earth's orbit.
double earthPerihelionLongitude | ( | ) |
Returns the longitude of the Earth's perihelion point.
double julianCenturies | ( | ) |
Returns Julian centuries since J2000.
void nutate | ( | double * | RA, | |
double * | Dec | |||
) |
Nutate a given RA and Dec.
- Parameters:
-
RA a pointer to a double containing the Right ascension in degrees to nutate. The function stores the processed Right ascension back in this variable. Dec a pointer to a double containing the delination in degrees to nutate. The function stores the processed delination back in this variable.
double obliquity | ( | ) |
Returns the obliquity of orbit.
double p1 | ( | int | i1, | |
int | i2 | |||
) |
Returns element of P1 precession array at position [i1][i2].
double p2 | ( | int | i1, | |
int | i2 | |||
) |
Returns element of P2 precession array at position [i1][i2].
void precessFromAnyEpoch | ( | double | jd0, | |
double | jdf, | |||
double * | RA, | |||
double * | Dec | |||
) |
Precess the given RA and Dec from any epoch to any epoch.
- Parameters:
-
jd0 starting epoch. jdf final epoch. RA a pointer to a double containing the Right ascension in degrees to precess. The function stores the processed Right ascension back in this variable. Dec a pointer to a double containing the delination in degrees to precess. The function stores the processed delination back in this variable.
double sunMeanAnomaly | ( | ) |
Returns the mean solar anomaly.
double sunMeanLongitude | ( | ) |
Returns the mean solar longitude.
double sunTrueAnomaly | ( | ) |
Returns the true solar anomaly.
double sunTrueLongitude | ( | ) |
Returns the true solar longitude.
void updateAstroValues | ( | double | jd | ) |
Update all orbital values for the given date as an argument.
Any subsecquent functions will use values affected by this date until changed.
- Parameters:
-
jd Julian date