![]() |
SuperNOVAS v1.3
The NOVAS C library, made better
|
Functions | |
short | grav_def (double jd_tdb, enum novas_observer_place unused, enum novas_accuracy accuracy, const double *pos_src, const double *pos_obs, double *out) |
int | grav_planets (const double *pos_src, const double *pos_obs, const novas_planet_bundle *restrict planets, double *out) |
double | grav_redshift (double M_kg, double r_m) |
int | grav_undef (double jd_tdb, enum novas_accuracy accuracy, const double *pos_app, const double *pos_obs, double *out) |
int | grav_undo_planets (const double *pos_app, const double *pos_obs, const novas_planet_bundle *restrict planets, double *out) |
int | grav_vec (const double *pos_src, const double *pos_obs, const double *pos_body, double rmass, double *out) |
Variables | |
int | grav_bodies_full_accuracy = DEFAULT_GRAV_BODIES_FULL_ACCURACY |
int | grav_bodies_reduced_accuracy = DEFAULT_GRAV_BODIES_REDUCED_ACCURACY |
Various functions to deal with gravitational effects of the major Solar-system bodies on the astrometry.
short grav_def | ( | double | jd_tdb, |
enum novas_observer_place | unused, | ||
enum novas_accuracy | accuracy, | ||
const double * | pos_src, | ||
const double * | pos_obs, | ||
double * | out | ||
) |
Computes the total gravitational deflection of light for the observed object due to the major gravitating bodies in the solar system. This function valid for an observed body within the solar system as well as for a star.
If 'accuracy' is NOVAS_FULL_ACCURACY (0), the deflections due to the Sun, Jupiter, Saturn, and Earth are calculated. Otherwise, only the deflection due to the Sun is calculated. In either case, deflection for a given body is ignored if the observer is within ~1500 km of the center of the gravitating body.
NOTES:
REFERENCES:
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
unused | The type of observer frame (no longer used) | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1). In full accuracy mode, it will calculate the deflection due to the Sun, Jupiter, Saturn and Earth. In reduced accuracy mode, only the deflection due to the Sun is calculated. | |
pos_src | [AU] Position 3-vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, components in AU. | |
pos_obs | [AU] Position 3-vector of observer (or the geocenter), with respect to origin at solar system barycenter, referred to ICRS axes, components in AU. | |
[out] | out | [AU] Position vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, corrected for gravitational deflection, components in AU. It can be the same vector as the input, but not the same as pos_obs. |
References grav_bodies_full_accuracy, grav_bodies_reduced_accuracy, grav_planets(), NOVAS_FULL_ACCURACY, and obs_planets().
int grav_planets | ( | const double * | pos_src, |
const double * | pos_obs, | ||
const novas_planet_bundle *restrict | planets, | ||
double * | out | ||
) |
Computes the total gravitational deflection of light for the observed object due to the specified gravitating bodies in the solar system. This function is valid for an observed body within the solar system as well as for a star.
NOTES:
REFERENCES:
pos_src | [AU] Position 3-vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, components in AU. | |
pos_obs | [AU] Position 3-vector of observer (or the geocenter), with respect to origin at solar system barycenter, referred to ICRS axes, components in AU. | |
planets | Apparent planet data containing positions and velocities for the major gravitating bodies in the solar-system. | |
[out] | out | [AU] Position vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, corrected for gravitational deflection, components in AU. It can be the same vector as the input, but not the same as pos_obs. |
References d_light(), grav_vec(), NOVAS_PLANETS, NOVAS_RMASS_INIT, and novas_vlen().
double grav_redshift | ( | double | M_kg, |
double | r_m | ||
) |
Returns the gravitational redshift (z) for light emitted near a massive spherical body at some distance from its center, and observed at some very large (infinite) distance away.
M_kg | [kg] Mass of gravitating body that is contained inside the emitting radius. |
r_m | [m] Radius at which light is emitted. |
int grav_undef | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
const double * | pos_app, | ||
const double * | pos_obs, | ||
double * | out | ||
) |
Computes the gravitationally undeflected position of an observed source position due to the major gravitating bodies in the solar system. This function valid for an observed body within the solar system as well as for a star.
If 'accuracy' is set to zero (full accuracy), three bodies (Sun, Jupiter, and Saturn) are used in the calculation. If the reduced-accuracy option is set, only the Sun is used in the calculation. In both cases, if the observer is not at the geocenter, the deflection due to the Earth is included.
The number of bodies used at full and reduced accuracy can be set by making a change to the code in this function as indicated in the comments.
REFERENCES:
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
pos_app | [AU] Apparent position 3-vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, components in AU. | |
pos_obs | [AU] Position 3-vector of observer (or the geocenter), with respect to origin at solar system barycenter, referred to ICRS axes, components in AU. | |
[out] | out | [AU] Nominal position vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, without gravitational deflection, components in AU. It can be the same vector as the input, but not the same as pos_obs. |
References grav_bodies_full_accuracy, grav_bodies_reduced_accuracy, grav_undo_planets(), NOVAS_FULL_ACCURACY, and obs_planets().
int grav_undo_planets | ( | const double * | pos_app, |
const double * | pos_obs, | ||
const novas_planet_bundle *restrict | planets, | ||
double * | out | ||
) |
Computes the gravitationally undeflected position of an observed source position due to the specified Solar-system bodies.
REFERENCES:
pos_app | [AU] Apparent position 3-vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, components in AU. | |
pos_obs | [AU] Position 3-vector of observer (or the geocenter), with respect to origin at solar system barycenter, referred to ICRS axes, components in AU. | |
planets | Apparent planet data containing positions and velocities for the major gravitating bodies in the solar-system. | |
[out] | out | [AU] Nominal position vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, without gravitational deflection, components in AU. It can be the same vector as the input, but not the same as pos_obs. |
References grav_planets(), novas_inv_max_iter, and novas_vlen().
int grav_vec | ( | const double * | pos_src, |
const double * | pos_obs, | ||
const double * | pos_body, | ||
double | rmass, | ||
double * | out | ||
) |
Corrects position vector for the deflection of light in the gravitational field of an arbitrary body. This function valid for an observed body within the solar system as well as for a star.
NOTES:
REFERENCES:
pos_src | [AU] Position 3-vector of observed object, with respect to origin at observer (or the geocenter), components in AU. | |
pos_obs | [AU] Position vector of gravitating body, with respect to origin at solar system barycenter, components in AU. | |
pos_body | [AU] Position 3-vector of gravitating body, with respect to origin at solar system barycenter, components in AU. | |
rmass | [1/Msun] Reciprocal mass of gravitating body in solar mass units, that is, Sun mass / body mass. | |
[out] | out | [AU] Position 3-vector of observed object, with respect to origin at observer (or the geocenter), corrected for gravitational deflection, components in AU. It can the same vector as the input. |
References novas_vlen().
int grav_bodies_full_accuracy = DEFAULT_GRAV_BODIES_FULL_ACCURACY |
Current set of gravitating bodies to use for deflection calculations in full accuracy mode. Each bit signifies whether a given body is to be accounted for as a gravitating body that bends light, such as the bit (1 << NOVAS_JUPITER)
indicates whether or not Jupiter is considered as a deflecting body. You should also be sure that you provide ephemeris data for bodies that are designated for the deflection calculation.
int grav_bodies_reduced_accuracy = DEFAULT_GRAV_BODIES_REDUCED_ACCURACY |
Current set of gravitating bodies to use for deflection calculations in reduced accuracy mode. Each bit signifies whether a given body is to be accounted for as a gravitating body that bends light, such as the bit (1 << NOVAS_JUPITER)
indicates whether or not Jupiter is considered as a deflecting body. You should also be sure that you provide ephemeris data for bodies that are designated for the deflection calculation.