Spacecraft Control Framework 1.0
Spacecraft Control Library
sc_ephemeris.h
Go to the documentation of this file.
1/*
2 * sc_ephemeris.h
3 *
4 * Programmers: Mike Paluszek, Stephanie Thomas, Wil Turner
5 *
6 * Copyright 1999-2006, Princeton Satellite Systems. All rights reserved.
7 *
8 * Ephemeris functions. Time and data conversions and planetary movement, position, and eclipse computations.
9 * Coordinated Universal Time (UTC) is used for inputs in seconds with the UNIX epoch, 1970-01-01 00:00:00+00.
10 */
11
18#ifndef __SC_EPHEMERIS__
19#define __SC_EPHEMERIS__
20
21#ifdef AS_OS_WINDOWS
22#include "matrixlib.h"
23#else
24#include <MatrixLib/MatrixLib.h>
25#endif
26#include "sc_constants.h"
27
28extern "C++"
29{
30
35 double date_to_jd(const ml_matrix& dateTime );
37double jd_to_utc_secs(double jd);
39double utc_secs_to_jd(double secs);
41double jd_to_jcent(double jd);
43double jcent_to_jd(double jcent);
45double jd_to_midnight(double jd);
47double gms_time(double jd);
49double ms_day(double jd);
51double local_sidereal_time (double jd, double lon);
53double mean_sidereal_day( double jd );
55ml_matrix jd_to_date( double jd );
57double jd_to_day_number( double jd );
59
64ml_matrix stellar_reduction( const ml_matrix& rA0, const ml_matrix& dec0, const ml_matrix& pMRA, const ml_matrix& pMDec, const ml_matrix&parallax, const ml_matrix& rV, const ml_matrix& vSc, double jD );
66void earth_barycenter( const ml_matrix& jD, ml_matrix eB, ml_matrix eB_dot );
67void earth_barycenter( double jD, ml_matrix eB, ml_matrix eB_dot );
69ml_matrix light_deflection( const ml_matrix& p, const ml_matrix& e );
71ml_matrix stellar_aberration( const ml_matrix& u, const ml_matrix& v );
73
74
79ml_matrix meci_to_planet(double alpha0, double delta0, double w);
81ml_matrix meci_to_earth(double jD);
83ml_matrix sun_vector(double jd, double &r);
84ml_matrix sun_vector(double jd);
86ml_matrix moon_vector(double jd, double &r);
88ml_matrix true_earth(double jcent);
90ml_matrix earth_pre(double jcent);
92ml_matrix earth_rot(double jcent);
94ml_matrix earth_rot_eq(double jcent);
96ml_matrix earth_nut(double jcent);
98double nut_delta(double j_cent, double &delta_eps);
100double ob_of_ecliptic(double jcent);
102ml_matrix c_ecl_to_eq( double jD );
104double eq_of_equinoxes(double jcent);
106double eclipse_spice( const ml_matrix &pos, const ml_matrix &planet_radius, const ml_matrix &planet_position, const ml_matrix &planet_index, int observer );
108double eclipse(const ml_matrix &pos, const ml_matrix &l_pos, const ml_matrix &p_pos, double p_radius = RADIUS_EARTH, double l_radius = RADIUS_SUN);
110double earth_rate( double jd );
112ml_matrix local_star_position( double jd, double lY );
114ml_matrix planet_ecliptic_to_orbit( int naif_code, double jd = JD_2000 );
115ml_matrix planet_ecliptic_to_orbit( char * planet_name, double jd = JD_2000 );
117
118
119}
120
121#endif
Physical and mathematical constants.
const double JD_2000
Julian date value for 2000-01-01 12:00:00+00.
Definition: sc_constants.h:23
const double RADIUS_SUN
Sun radius [km].
Definition: sc_constants.h:61
const double RADIUS_EARTH
Earth equatorial radius in km.
Definition: sc_constants.h:59
ml_matrix local_star_position(double jd, double lY)
Local star positions.
Definition: sc_ephemeris.cc:849
void earth_barycenter(const ml_matrix &jD, ml_matrix eB, ml_matrix eB_dot)
Earth barycenter.
Definition: sc_ephemeris.cc:1038
ml_matrix meci_to_earth(double jD)
Generate the ECI to eart transformation matrix.
Definition: sc_ephemeris.cc:259
ml_matrix meci_to_planet(double alpha0, double delta0, double w)
Generate the ECI to Planet transformation matrix.
Definition: sc_ephemeris.cc:275
double eclipse_spice(const ml_matrix &pos, const ml_matrix &planet_radius, const ml_matrix &planet_position, const ml_matrix &planet_index, int observer)
Compute eclipses using Spice data.
Definition: sc_ephemeris.cc:698
ml_matrix c_ecl_to_eq(double jD)
Transformation from eclipic to equatorial.
Definition: sc_ephemeris.cc:649
ml_matrix true_earth(double jcent)
Computes the matrix from mean of Aries 2000 to earth fixed frame.
Definition: sc_ephemeris.cc:402
ml_matrix planet_ecliptic_to_orbit(int naif_code, double jd=JD_2000)
Planet orbit rotation frame.
Definition: sc_ephemeris.cc:895
ml_matrix earth_rot_eq(double jcent)
Computes the earth Greenwich matrix using apparent sidereal time.
Definition: sc_ephemeris.cc:473
double jd_to_jcent(double jd)
Convert Julian date to Julian century.
Definition: sc_ephemeris.cc:106
double nut_delta(double j_cent, double &delta_eps)
The changes in longitude and obliquity due to earth nutation.
Definition: sc_ephemeris.cc:522
double eclipse(const ml_matrix &pos, const ml_matrix &l_pos, const ml_matrix &p_pos, double p_radius=RADIUS_EARTH, double l_radius=RADIUS_SUN)
Compute eclipses.
Definition: sc_ephemeris.cc:763
double local_sidereal_time(double jd, double lon)
Compute the local sidereal time for a given Julian date and longitude.
Definition: sc_ephemeris.cc:247
double jd_to_midnight(double jd)
Round a Julian date value to the most recent midnight (0 hours) value.
Definition: sc_ephemeris.cc:126
double earth_rate(double jd)
Earth rotation rate.
Definition: sc_ephemeris.cc:818
ml_matrix moon_vector(double jd, double &r)
Generate the moon vector in the earth-centered inertial frame.
Definition: sc_ephemeris.cc:360
double date_to_jd(const ml_matrix &dateTime)
Converts date to jd.
Definition: sc_ephemeris.cc:34
double gms_time(double jd)
Get Greenwich Mean Sidereal time.
Definition: sc_ephemeris.cc:203
ml_matrix jd_to_date(double jd)
Convert Julian date to date.
Definition: sc_ephemeris.cc:137
double jd_to_utc_secs(double jd)
Converts Julian date to seconds since 00:00:00 January 1, 1970 (UTC)
Definition: sc_ephemeris.cc:86
ml_matrix stellar_aberration(const ml_matrix &u, const ml_matrix &v)
Stellar aberration.
Definition: sc_ephemeris.cc:1126
ml_matrix sun_vector(double jd, double &r)
Generate the sun vector in the earth-centered inertial frame.
Definition: sc_ephemeris.cc:311
double ob_of_ecliptic(double jcent)
Computes the mean obliquity of the ecliptic of date.
Definition: sc_ephemeris.cc:636
double jcent_to_jd(double jcent)
Convert Julian century to Julian date.
Definition: sc_ephemeris.cc:116
ml_matrix light_deflection(const ml_matrix &p, const ml_matrix &e)
Light deflection.
Definition: sc_ephemeris.cc:1007
double mean_sidereal_day(double jd)
Mean sidereal day
Definition: sc_ephemeris.cc:823
double jd_to_day_number(double jd)
Convert Julian date to day number
Definition: sc_ephemeris.cc:182
double eq_of_equinoxes(double jcent)
Computes the equation of the equinoxes.
Definition: sc_ephemeris.cc:673
ml_matrix earth_pre(double jcent)
Computes the earth precession matrix.
Definition: sc_ephemeris.cc:422
ml_matrix stellar_reduction(const ml_matrix &rA0, const ml_matrix &dec0, const ml_matrix &pMRA, const ml_matrix &pMDec, const ml_matrix &parallax, const ml_matrix &rV, const ml_matrix &vSc, double jD)
Stellar reduction.
Definition: sc_ephemeris.cc:946
double utc_secs_to_jd(double secs)
Converts seconds since 00:00:00 January 1, 1970 (UTC) to Julian date.
Definition: sc_ephemeris.cc:96
ml_matrix earth_nut(double jcent)
The matrix that rotates from the mean axes to the true axes.
Definition: sc_ephemeris.cc:496
ml_matrix earth_rot(double jcent)
Computes the earth Greenwich matrix using GMST, that transforms from ECI to Earth-fixed.
Definition: sc_ephemeris.cc:449
double ms_day(double jd)
Compute a mean sidereal (solar) day.
Definition: sc_ephemeris.cc:231