Environmental functions. More...
Classes | |
struct | mag_data_s |
Structure for storing magnetic field data. More... | |
Typedefs | |
typedef struct mag_data_s | mag_data_t |
Structure for storing magnetic field data. | |
Enumerations | |
enum | { kMercury, kVenus, kEarth, kMars, kJupiter, kSaturn, kUranus, kNeptune, kPluto, kMoon, kPhobos, kDeimos, kSun } |
Planet IDs. | |
Functions | |
double | mol_wt_to_R (double mol_wt) |
Compute gas constant R given the molecular weight. | |
double | atm_dens_exp (double h, int planet=kEarth) |
Atmospheric density using an exponential model. | |
double | atm_dens_scale (double h) |
Atmospheric density using scale heights. | |
double | earth_radiation_total (const ml_matrix &pos, const ml_matrix &u_sun) |
Computes the total earth radiation including albedo. | |
double | earth_radiation (const ml_matrix &pos) |
Computes the earth radiation. | |
ml_matrix | b_dipole (const ml_matrix &pos, double jd) |
Computes the magnetic field based on a tilted dipole model. | |
ml_matrix | mag_field (const ml_matrix &position, double jd, int nMax, const mag_data_s &mag_data) |
Planetary magnetic field at a given position. | |
ml_matrix | schmidt (int nMax, int mMax) |
Schmidt normalization. | |
double | albedo_flux (const ml_matrix &r, const ml_matrix &rPlanet, const ml_matrix &rSun, double radius=RADIUS_EARTH, double albedo=0.34) |
Albedo flux. |
Atmosphere, magnetic field, and radiation models.
double mol_wt_to_R | ( | double | mol_wt ) |
Compute gas constant R given the molecular weight.
mol_wt | The molecular weight. |
References GAS_R.
double atm_dens_exp | ( | double | h, |
int | planet | ||
) |
Atmospheric density using an exponential model.
The earth model has an additional scaling coefficient in the exponent.
h | Altitude (km) |
planet | Planetary ID |
double atm_dens_scale | ( | double | h ) |
Atmospheric density using scale heights.
Valid from 0 to 1000 km. Ref: Wertz, J.R., Spacecraft Attitude Determination and Control, Kluwer, 1976, p. 820.
h | Altitude (km) |
double earth_radiation_total | ( | const ml_matrix & | pos, |
const ml_matrix & | u_sun | ||
) |
Computes the total earth radiation including albedo.
pos | Position vector relative to the Earth (km) |
u_sun | Sun unit vector |
References RADIUS_EARTH.
double earth_radiation | ( | const ml_matrix & | pos ) |
pos | Position vector relative to the Earth (km) |
References RADIUS_EARTH.
ml_matrix b_dipole | ( | const ml_matrix & | pos, |
double | jd | ||
) |
Computes the magnetic field based on a tilted dipole model.
pos | (3,1) position vector in ECI frame. |
jd | Julian date. |
ml_matrix mag_field | ( | const ml_matrix & | position, |
double | jd, | ||
int | nMax, | ||
const mag_data_t & | mag_data | ||
) |
Planetary magnetic field at a given position.
Ref: Wertz, J., Spacecraft Attitude Determination and Control, Kluwer, 1976, pp. 779-781. Jursa, Adolph S., ed., Handbook of Geophysics and the Space Environment, Air Force Geophysics Laboratory, 1985, p. 4-28.
position | (3,1) Position in planet-centered frame (km) |
jd | Julian date |
nMax | Maximum number of terms used |
mag_data | Structure containing magnetic field data |
References mag_data_s::dateOfModel, mag_data_s::g, mag_data_s::gDot, mag_data_s::h, and mag_data_s::hDot.
ml_matrix schmidt | ( | int | nMax, |
int | mMax | ||
) |
Schmidt normalization.
Used by MagField.
nMax | Maximum n coefficient |
mMax | Maximum m coefficient |
double albedo_flux | ( | const ml_matrix & | r, |
const ml_matrix & | rPlanet, | ||
const ml_matrix & | rSun, | ||
double | radius, | ||
double | albedo | ||
) |
r | Position vector |
rPlanet | Location of the planet in the same frame |
rSun | Position vector of the sun |
radius | Planet radius |
albedo | albedo fraction |
Maximum | m coefficient |