SuperNOVAS v1.2
The NOVAS C library, made better
|
Data Structures | |
struct | cat_entry |
struct | in_space |
struct | novas_delaunay_args |
struct | novas_frame |
struct | novas_matrix |
struct | novas_planet_bundle |
struct | novas_timespec |
struct | novas_transform |
struct | object |
struct | observer |
struct | on_surface |
struct | ra_of_cio |
struct | sky_pos |
Macros | |
#define | ASEC2RAD (DEG2RAD / 3600.0) |
[rad/arcsec] 1 arcsecond in radians | |
#define | ASEC360 (360 * 60 * 60) |
[arcsec] Number of arcseconds in 360 degrees. | |
#define | BARYC NOVAS_BARYCENTER |
#define | CAT_ENTRY_INIT { {'\0'}, {'\0'}, 0L, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } |
#define | DE405_AU 1.4959787069098932e+11 |
#define | DEFAULT_CIO_LOCATOR_FILE "/usr/share/novas/cio_ra.bin" |
#define | DEFAULT_GRAV_BODIES_FULL_ACCURACY ( DEFAULT_GRAV_BODIES_REDUCED_ACCURACY | (1 << NOVAS_JUPITER) | (1 << NOVAS_SATURN) ) |
#define | DEFAULT_GRAV_BODIES_REDUCED_ACCURACY ( (1 << NOVAS_SUN) | (1 << NOVAS_EARTH) ) |
#define | DEG2RAD (M_PI / 180.0) |
[rad/deg] 1 degree in radians | |
#define | HELIOC NOVAS_HELIOCENTER |
#define | IN_SPACE_INIT {{0.0}, {0.0}} |
#define | M_PI 3.14159265358979323846 |
Definition of π in case it's not defined in math.h. | |
#define | NOVAS_AU 1.495978707e+11 |
#define | NOVAS_AU_KM ( 1e-3 * NOVAS_AU ) |
[km] Astronomical Unit in kilometers. | |
#define | NOVAS_AU_SEC ( NOVAS_AU / NOVAS_C ) |
[s] Light-time for one astronomical unit (AU) in seconds. | |
#define | NOVAS_C 299792458.0 |
[m/s] Speed of light in meters/second is a defining physical constant. | |
#define | NOVAS_C_AU_PER_DAY ( 86400.0 / AU_SEC ) |
[AU/day] Speed of light in AU/day. Value is 86400 / AU_SEC. | |
#define | NOVAS_CIO_CACHE_SIZE 1024 |
[pts] cache size for GCRS CIO locator data (16 bytes per point). | |
#define | NOVAS_EARTH_ANGVEL 7.2921150e-5 |
#define | NOVAS_EARTH_FLATTENING (1.0 / 298.25642) |
#define | NOVAS_EARTH_RADIUS 6378136.6 |
[m] Radius of Earth in meters from IERS Conventions (2003). | |
#define | NOVAS_G_EARTH 3.98600433e+14 |
#define | NOVAS_G_SUN 1.32712440017987e+20 |
#define | NOVAS_GPS_TO_TAI 19.0 |
[s] TAI - GPS time offset | |
#define | NOVAS_JD_B1900 15019.81352 |
[day] Julian date at B1900 | |
#define | NOVAS_JD_B1950 2433282.42345905 |
[day] Julian date at B1950 | |
#define | NOVAS_JD_HIP 2448349.0625 |
#define | NOVAS_JD_J2000 2451545.0 |
[day] Julian date at J2000 | |
#define | NOVAS_JD_MJD0 2400000.5 |
[day] Julian date at which the Modified Julian Date (MJD) is zero | |
#define | NOVAS_MAJOR_VERSION 3 |
Major version of NOVAS on which this library is based. | |
#define | NOVAS_MINOR_VERSION 1 |
Minor version of NOVAS on which this library is based. | |
#define | NOVAS_OBJECT_TYPES (NOVAS_CATALOG_OBJECT + 1) |
The number of object types distinguished by NOVAS. | |
#define | NOVAS_OBSERVER_PLACES (NOVAS_SOLAR_SYSTEM_OBSERVER + 1) |
The number of observer place types supported. | |
#define | NOVAS_ORIGIN_TYPES (NOVAS_HELIOCENTER + 1) |
the number of different ICSR origins available in NOVAS. | |
#define | NOVAS_PLANET_GRAV_Z_INIT |
#define | NOVAS_PLANET_NAMES_INIT { "SSB", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "Sun", "Moon" } |
#define | NOVAS_PLANETS (NOVAS_MOON + 1) |
The number of major planets defined in NOVAS. | |
#define | NOVAS_REFERENCE_SYSTEMS (NOVAS_MOD + 1) |
The number of basic coordinate reference systems in NOVAS. | |
#define | NOVAS_RMASS_INIT |
#define | NOVAS_SOLAR_RADIUS 696340000.0 |
#define | NOVAS_TAI_TO_TT 32.184 |
[s] TT - TAI time offset | |
#define | NOVAS_TIMESCALES (NOVAS_UT1 + 1) |
#define | NOVAS_TRANSFORM_TYPES (ICRS_TO_J2000 + 1) |
The number of coordinate transfor types in NOVAS. | |
#define | NOVAS_VERSION_STRING #NOVAS_MAJOR_VERSION "." NOVAS_MINOR_VERSION |
The version string of the upstream NOVAS library on which this library is based. | |
#define | RAD2DEG (1.0 / DEG2RAD) |
[deg/rad] 1 radian in degrees | |
#define | SIZE_OF_CAT_NAME 6 |
Maximum bytes in catalog IDs including string termination. | |
#define | SIZE_OF_OBJ_NAME 50 |
Maximum bytes in object names including string termination. | |
#define | SKY_POS_INIT { {0.0}, 0.0, 0.0, 0.0, 0.0 } |
#define | SUPERNOVAS_MAJOR_VERSION 1 |
API major version. | |
#define | SUPERNOVAS_MINOR_VERSION 2 |
API minor version. | |
#define | SUPERNOVAS_PATCHLEVEL 0 |
Integer sub version of the release. | |
#define | SUPERNOVAS_RELEASE_STRING "-devel" |
Additional release information in version, e.g. "-1", or "-rc1". | |
#define | SUPERNOVAS_VERSION_STRING |
#define | TWOPI (2.0 * M_PI) |
2π | |
Typedefs | |
typedef double(* | RefractionModel) (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
Functions | |
int | aberration (const double *pos, const double *vobs, double lighttime, double *pos2) |
double | accum_prec (double t) |
short | app_planet (double jd_tt, const object *ss_body, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) |
short | app_star (double jd_tt, const cat_entry *star, enum novas_accuracy accuracy, double *ra, double *dec) |
double | app_to_cirs_ra (double jd_tt, enum novas_accuracy accuracy, double ra) |
short | astro_planet (double jd_tt, const object *ss_body, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) |
short | astro_star (double jd_tt, const cat_entry *star, enum novas_accuracy accuracy, double *ra, double *dec) |
int | bary2obs (const double *pos, const double *pos_obs, double *out, double *lighttime) |
int | cal_date (double tjd, short *year, short *month, short *day, double *hour) |
short | cel2ter (double jd_ut1_high, double jd_ut1_low, double ut1_to_tt, enum novas_earth_rotation_measure erot, enum novas_accuracy accuracy, enum novas_equatorial_class class, double xp, double yp, const double *in, double *out) |
short | cel_pole (double jd_tt, enum novas_pole_offset_type type, double dpole1, double dpole2) |
short | cio_array (double jd_tdb, long n_pts, ra_of_cio *cio) |
short | cio_basis (double jd_tdb, double ra_cio, enum novas_cio_location_type loc_type, enum novas_accuracy accuracy, double *x, double *y, double *z) |
short | cio_location (double jd_tdb, enum novas_accuracy accuracy, double *ra_cio, short *loc_type) |
short | cio_ra (double jd_tt, enum novas_accuracy accuracy, double *ra_cio) |
double | cirs_to_app_ra (double jd_tt, enum novas_accuracy accuracy, double ra) |
int | cirs_to_gcrs (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out) |
int | cirs_to_itrs (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out) |
int | cirs_to_tod (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out) |
double | d_light (const double *pos_src, const double *pos_body) |
int | e_tilt (double jd_tdb, enum novas_accuracy accuracy, double *mobl, double *tobl, double *ee, double *dpsi, double *deps) |
int | ecl2equ (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, double elon, double elat, double *ra, double *dec) |
short | ecl2equ_vec (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, const double *in, double *out) |
double | ee_ct (double jd_tt_high, double jd_tt_low, enum novas_accuracy accuracy) |
short | ephemeris (const double *jd_tdb, const object *body, enum novas_origin origin, enum novas_accuracy accuracy, double *pos, double *vel) |
short | equ2ecl (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, double ra, double dec, double *elon, double *elat) |
short | equ2ecl_vec (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, const double *in, double *out) |
int | equ2gal (double ra, double dec, double *glon, double *glat) |
int | equ2hor (double jd_ut1, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const on_surface *location, double ra, double dec, enum novas_refraction_model option, double *zd, double *az, double *rar, double *decr) |
double | era (double jd_ut1_high, double jd_ut1_low) |
int | frame_tie (const double *in, enum novas_frametie_direction direction, double *out) |
int | fund_args (double t, novas_delaunay_args *a) |
int | gal2equ (double glon, double glat, double *ra, double *dec) |
short | gcrs2equ (double jd_tt, enum novas_dynamical_type sys, enum novas_accuracy accuracy, double rag, double decg, double *ra, double *dec) |
int | gcrs_to_cirs (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out) |
int | gcrs_to_j2000 (const double *in, double *out) |
short | geo_posvel (double jd_tt, double ut1_to_tt, enum novas_accuracy accuracy, const observer *obs, double *pos, double *vel) |
double | get_ut1_to_tt (int leap_seconds, double dut1) |
double | get_utc_to_tt (int leap_seconds) |
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 *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 *planets, double *out) |
int | grav_vec (const double *pos_src, const double *pos_obs, const double *pos_body, double rmass, double *out) |
int | hor_to_itrs (const on_surface *location, double az, double za, double *itrs) |
double | ira_equinox (double jd_tdb, enum novas_equinox_type equinox, enum novas_accuracy accuracy) |
int | itrs_to_cirs (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out) |
int | itrs_to_hor (const on_surface *location, const double *itrs, double *az, double *za) |
int | itrs_to_tod (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out) |
int | j2000_to_gcrs (const double *in, double *out) |
int | j2000_to_tod (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out) |
double | julian_date (short year, short month, short day, double hour) |
short | light_time (double jd_tdb, const object *body, const double *pos_obs, double tlight0, enum novas_accuracy accuracy, double *pos_src_obs, double *tlight) |
int | light_time2 (double jd_tdb, const object *body, const double *pos_obs, double tlight0, enum novas_accuracy accuracy, double *pos_src_obs, double *v_ssb, double *tlight) |
int | limb_angle (const double *pos_src, const double *pos_obs, double *limb_ang, double *nadir_ang) |
short | local_planet (double jd_tt, const object *ss_body, double ut1_to_tt, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) |
short | local_star (double jd_tt, double ut1_to_tt, const cat_entry *star, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec) |
int | make_airborne_observer (const on_surface *location, const double *vel, observer *obs) |
short | make_cat_entry (const char *star_name, const char *catalog, long cat_num, double ra, double dec, double pm_ra, double pm_dec, double parallax, double rad_vel, cat_entry *star) |
int | make_cat_object (const cat_entry *star, object *source) |
int | make_ephem_object (const char *name, long num, object *body) |
int | make_in_space (const double *sc_pos, const double *sc_vel, in_space *loc) |
short | make_object (enum novas_object_type, long number, const char *name, const cat_entry *star_data, object *source) |
short | make_observer (enum novas_observer_place, const on_surface *loc_surface, const in_space *loc_space, observer *obs) |
int | make_observer_at_geocenter (observer *obs) |
int | make_observer_in_space (const double *sc_pos, const double *sc_vel, observer *obs) |
int | make_observer_on_surface (double latitude, double longitude, double height, double temperature, double pressure, observer *obs) |
int | make_on_surface (double latitude, double longitude, double height, double temperature, double pressure, on_surface *loc) |
int | make_planet (enum novas_planet num, object *planet) |
int | make_redshifted_object (const char *name, double ra, double dec, double z, object *source) |
int | make_solar_system_observer (const double *sc_pos, const double *sc_vel, observer *obs) |
double | mean_obliq (double jd_tdb) |
short | mean_star (double jd_tt, double tra, double tdec, enum novas_accuracy accuracy, double *ira, double *idec) |
double | norm_ang (double angle) |
int | novas_app_to_geom (const novas_frame *frame, enum novas_reference_system sys, double ra, double dec, double dist, double *geom_icrs) |
int | novas_app_to_hor (const novas_frame *frame, enum novas_reference_system sys, double ra, double dec, RefractionModel ref_model, double *az, double *el) |
void | novas_case_sensitive (int value) |
int | novas_change_observer (const novas_frame *orig, const observer *obs, novas_frame *out) |
void | novas_debug (enum novas_debug_mode mode) |
double | novas_diff_tcb (const novas_timespec *t1, const novas_timespec *t2) |
double | novas_diff_tcg (const novas_timespec *t1, const novas_timespec *t2) |
double | novas_diff_time (const novas_timespec *t1, const novas_timespec *t2) |
int | novas_geom_posvel (const object *source, const novas_frame *frame, enum novas_reference_system sys, double *pos, double *vel) |
int | novas_geom_to_app (const novas_frame *frame, const double *pos, enum novas_reference_system sys, sky_pos *out) |
enum novas_debug_mode | novas_get_debug_mode () |
double | novas_get_split_time (const novas_timespec *time, enum novas_timescale timescale, long *ijd) |
double | novas_get_time (const novas_timespec *time, enum novas_timescale timescale) |
time_t | novas_get_unix_time (const novas_timespec *time, long *nanos) |
int | novas_hor_to_app (const novas_frame *frame, double az, double el, RefractionModel ref_model, enum novas_reference_system sys, double *ra, double *dec) |
double | novas_inv_refract (RefractionModel model, double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el0) |
int | novas_invert_transform (const novas_transform *transform, novas_transform *inverse) |
int | novas_make_frame (enum novas_accuracy accuracy, const observer *obs, const novas_timespec *time, double dx, double dy, novas_frame *frame) |
int | novas_make_transform (const novas_frame *frame, enum novas_reference_system from_system, enum novas_reference_system to_system, novas_transform *transform) |
int | novas_offset_time (const novas_timespec *time, double seconds, novas_timespec *out) |
double | novas_optical_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
enum novas_planet | novas_planet_for_name (const char *name) |
double | novas_radio_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
int | novas_set_split_time (enum novas_timescale timescale, long ijd, double fjd, int leap, double dut1, novas_timespec *time) |
int | novas_set_time (enum novas_timescale timescale, double jd, int leap, double dut1, novas_timespec *time) |
int | novas_set_unix_time (time_t unix_time, long nanos, int leap, double dut1, novas_timespec *time) |
int | novas_sky_pos (const object *object, const novas_frame *frame, enum novas_reference_system sys, sky_pos *output) |
double | novas_standard_refraction (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
int | novas_transform_sky_pos (const sky_pos *in, const novas_transform *transform, sky_pos *out) |
int | novas_transform_vector (const double *in, const novas_transform *transform, double *out) |
double | novas_v2z (double vel) |
double | novas_z2v (double z) |
double | novas_z_add (double z1, double z2) |
double | novas_z_inv (double z) |
int | nutation (double jd_tdb, enum novas_nutation_direction direction, enum novas_accuracy accuracy, const double *in, double *out) |
int | nutation_angles (double t, enum novas_accuracy accuracy, double *dpsi, double *deps) |
int | obs_planets (double jd_tdb, enum novas_accuracy accuracy, const double *pos_obs, int pl_mask, novas_planet_bundle *planets) |
int | obs_posvel (double jd_tdb, double ut1_to_tt, enum novas_accuracy accuracy, const observer *obs, const double *geo_pos, const double *geo_vel, double *pos, double *vel) |
short | place (double jd_tt, const object *source, const observer *location, double ut1_to_tt, enum novas_reference_system coord_sys, enum novas_accuracy accuracy, sky_pos *output) |
int | place_cirs (double jd_tt, const object *source, enum novas_accuracy accuracy, sky_pos *pos) |
int | place_gcrs (double jd_tt, const object *source, enum novas_accuracy accuracy, sky_pos *pos) |
int | place_icrs (double jd_tt, const object *source, enum novas_accuracy accuracy, sky_pos *pos) |
int | place_j2000 (double jd_tt, const object *source, enum novas_accuracy accuracy, sky_pos *pos) |
int | place_mod (double jd_tt, const object *source, enum novas_accuracy accuracy, sky_pos *pos) |
int | place_star (double jd_tt, const cat_entry *star, const observer *obs, double ut1_to_tt, enum novas_reference_system system, enum novas_accuracy accuracy, sky_pos *pos) |
int | place_tod (double jd_tt, const object *source, enum novas_accuracy accuracy, sky_pos *pos) |
double | planet_lon (double t, enum novas_planet planet) |
short | precession (double jd_tdb_in, const double *in, double jd_tdb_out, double *out) |
int | proper_motion (double jd_tdb_in, const double *pos, const double *vel, double jd_tdb_out, double *out) |
int | rad_vel (const object *source, const double *pos, const double *vel, const double *vel_obs, double d_obs_geo, double d_obs_sun, double d_src_sun, double *rv) |
double | rad_vel2 (const object *source, const double *pos_emit, const double *vel_src, const double *pos_det, const double *vel_obs, double d_obs_geo, double d_obs_sun, double d_src_sun) |
int | radec2vector (double ra, double dec, double dist, double *pos) |
int | radec_planet (double jd_tt, const object *ss_body, const observer *obs, double ut1_to_tt, enum novas_reference_system sys, enum novas_accuracy accuracy, double *ra, double *dec, double *dis, double *rv) |
int | radec_star (double jd_tt, const cat_entry *star, const observer *obs, double ut1_to_tt, enum novas_reference_system sys, enum novas_accuracy accuracy, double *ra, double *dec, double *rv) |
double | redshift_vrad (double vrad, double z) |
double | refract (const on_surface *location, enum novas_refraction_model option, double zd_obs) |
double | refract_astro (const on_surface *location, enum novas_refraction_model option, double zd_calc) |
int | set_cio_locator_file (const char *filename) |
int | set_nutation_lp_provider (novas_nutation_provider func) |
short | sidereal_time (double jd_ut1_high, double jd_ut1_low, double ut1_to_tt, enum novas_equinox_type gst_type, enum novas_earth_rotation_measure method, enum novas_accuracy accuracy, double *gst) |
int | spin (double angle, const double *in, double *out) |
int | starvectors (const cat_entry *star, double *pos, double *vel) |
int | tdb2tt (double jd_tdb, double *jd_tt, double *secdiff) |
short | ter2cel (double jd_ut1_high, double jd_ut1_low, double ut1_to_tt, enum novas_earth_rotation_measure erot, enum novas_accuracy accuracy, enum novas_equatorial_class class, double xp, double yp, const double *in, double *out) |
int | terra (const on_surface *location, double lst, double *pos, double *vel) |
int | tod_to_cirs (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out) |
int | tod_to_itrs (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out) |
int | tod_to_j2000 (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out) |
short | topo_planet (double jd_tt, const object *ss_body, double ut1_to_tt, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) |
short | topo_star (double jd_tt, double ut1_to_tt, const cat_entry *star, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec) |
short | transform_cat (enum novas_transform_type, double jd_tt_in, const cat_entry *in, double jd_tt_out, const char *out_id, cat_entry *out) |
int | transform_hip (const cat_entry *hipparcos, cat_entry *hip_2000) |
double | tt2tdb (double jd_tt) |
double | unredshift_vrad (double vrad, double z) |
short | vector2radec (const double *pos, double *ra, double *dec) |
short | virtual_planet (double jd_tt, const object *ss_body, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) |
short | virtual_star (double jd_tt, const cat_entry *star, enum novas_accuracy accuracy, double *ra, double *dec) |
int | wobble (double jd_tt, enum novas_wobble_direction direction, double xp, double yp, const double *in, double *out) |
Variables | |
int | grav_bodies_full_accuracy |
int | grav_bodies_reduced_accuracy |
SuperNOVAS astrometry software based on the Naval Observatory Vector Astrometry Software (NOVAS). It has been modified to fix outstanding issues and to make it easier to use.
Based on the NOVAS C Edition, Version 3.1:
U. S. Naval Observatory
Astronomical Applications Dept.
Washington, DC
http://www.usno.navy.mil/USNO/astronomical-applications
#define BARYC NOVAS_BARYCENTER |
#define CAT_ENTRY_INIT { {'\0'}, {'\0'}, 0L, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } |
Initializer for a NOVAS cat_entry structure.
#define DE405_AU 1.4959787069098932e+11 |
[m] Astronomical unit (AU). based on DE-405. (old definition)
#define DEFAULT_CIO_LOCATOR_FILE "/usr/share/novas/cio_ra.bin" |
Path / name of file to use for interpolating the CIO location relative to GCRS This file can be generated with the cio_file.c
tool using the CIO_RA.TXT
data (both are included in the distribution)
#define DEFAULT_GRAV_BODIES_FULL_ACCURACY ( DEFAULT_GRAV_BODIES_REDUCED_ACCURACY | (1 << NOVAS_JUPITER) | (1 << NOVAS_SATURN) ) |
Default set of gravitating bodies to use for deflection calculations in full accuracy mode.
#define DEFAULT_GRAV_BODIES_REDUCED_ACCURACY ( (1 << NOVAS_SUN) | (1 << NOVAS_EARTH) ) |
Default set of gravitating bodies to use for deflection calculations in reduced accuracy mode.
#define HELIOC NOVAS_HELIOCENTER |
#define IN_SPACE_INIT {{0.0}, {0.0}} |
Initializer for a NOVAS in_space structure.
#define NOVAS_AU 1.495978707e+11 |
[m] Astronomical unit (AU). IAU definition. See IAU 2012 Resolution B2.
#define NOVAS_EARTH_ANGVEL 7.2921150e-5 |
[rad/s] Rotational angular velocity of Earth in radians/sec from IERS Conventions (2003).
#define NOVAS_EARTH_FLATTENING (1.0 / 298.25642) |
Earth ellipsoid flattening from IERS Conventions (2003). Value is 1 / 298.25642.
#define NOVAS_G_EARTH 3.98600433e+14 |
[m3/s2] Geocentric gravitational constant in meters^3 / second^2, from DE-405.
#define NOVAS_G_SUN 1.32712440017987e+20 |
[m3/s2] Heliocentric gravitational constant in meters^3 / second^2, from DE-405.
#define NOVAS_JD_HIP 2448349.0625 |
[day] Julian date for J1991.25, which the Hipparcos catalog is referred to
#define NOVAS_PLANET_GRAV_Z_INIT |
Gravitational redshifts for major planets (and Moon and Sun) for light emitted at surface and detected at a large distance away.
#define NOVAS_PLANET_NAMES_INIT { "SSB", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "Sun", "Moon" } |
String array initializer for Major planet names, matching the enum novas_planet. E.g.
#define NOVAS_RMASS_INIT |
Reciprocal masses of solar system bodies, from DE-405 (Sun mass / body mass). [0]: Earth/Moon barycenter, MASS[1] = Mercury, ..., [9]: Pluto, [10]: Sun, [11]: Moon.
#define NOVAS_SOLAR_RADIUS 696340000.0 |
[m] Solar radius (photosphere)
#define NOVAS_TIMESCALES (NOVAS_UT1 + 1) |
The number of asronomical time scales supported.
#define SKY_POS_INIT { {0.0}, 0.0, 0.0, 0.0, 0.0 } |
Initializer for a NOVAS sky_pos structure.
#define SUPERNOVAS_VERSION_STRING |
The version string for this library
typedef double(* RefractionModel) (double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) |
A function that returns a refraction correction for a given date/time of observation at the given site on earth, and for a given astrometric source elevation
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Whether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0). |
el | [deg] Astrometric (unrefracted) source elevation |
enum novas_accuracy |
Constants to control the precision of NOVAS nutation calculations.
enum novas_debug_mode |
Settings for 'novas_debug()'
enum novas_dynamical_type |
Constants that determine the type of dynamical system type for gcrs2equ()
enum novas_equator_type |
enum novas_equinox_type |
Direction constant to use for frame_tie(), to determine the direction of transformation between J2000 and ICRS coordinates.
Direction constant for nutation(), between mean and true equatorial coordinates.
enum novas_object_type |
The type of astronomical objects distinguied by the NOVAS library.
Enumerator | |
---|---|
NOVAS_PLANET | A major planet, or else the Sun, the Moon, or the Solar-System Barycenter (SSB).
|
NOVAS_EPHEM_OBJECT | A Solar-system body that does not fit the major planet type, and requires specific user-provided novas_ephem_provider implementation.
|
NOVAS_CATALOG_OBJECT | Any non-solar system object that may be handled via 'catalog' coordinates, such as a star or a quasar. |
enum novas_observer_place |
Types of places on and around Earth that may serve a a reference position for the observation.
enum novas_origin |
enum novas_planet |
Enumeration for the 'major planet' numbers in NOVAS to use as the solar-system body number whenever the object type is NOVAS_PLANET.
The basic types of positional coordinate reference systems supported by NOVAS. These determine only how the celestial pole is to be located, but not how velocities are to be referenced. specific pos-vel coordinates are referenced to an 'astro_frame', which must specify one of the values defined here.
Constants that determine whether refraction calculations should use a standard atmospheric model, or whatever weather parameters have been been specified for the observing location.
The type of elevation value for which to calculate a refraction.
Enumerator | |
---|---|
NOVAS_REFRACT_OBSERVED | Refract observed elevation value. |
NOVAS_REFRACT_ASTROMETRIC | Refract astrometric elevation value. |
enum novas_timescale |
Constants to reference various astrnomical timescales used
enum novas_transform_type |
The types of coordinate transformations available for tranform_cat().
Direction constants for polar wobble corrections via the wobble() function.
Enumerator | |
---|---|
WOBBLE_ITRS_TO_PEF | use for wobble() to change from ITRS (actual rotating Earth) to Pseudo Earth Fixed (PEF). |
WOBBLE_PEF_TO_ITRS | use for wobble() to change from Pseudo Earth Fixed (PEF) to ITRS (actual rotating Earth). (You can use any non-zero value as well.) |
int aberration | ( | const double * | pos, |
const double * | vobs, | ||
double | lighttime, | ||
double * | out | ||
) |
Corrects position vector for aberration of light. Algorithm includes relativistic terms.
NOTES:
REFERENCES:
pos | [AU] Position vector of source relative to observer | |
vobs | [AU/day] Velocity vector of observer, relative to the solar system barycenter, components in AU/day. | |
lighttime | [day] Light time from object to Earth in days (if known). Or set to 0, and this function will compute it. | |
[out] | out | [AU] Position vector, referred to origin at center of mass of the Earth, corrected for aberration, components in AU. It can be the same vector as one of the inputs. |
References C_AUDAY.
double accum_prec | ( | double | t | ) |
Returns the general precession in longitude (Simon et al. 1994), equivalent to 5028.8200 arcsec/cy at J2000.
t | [cy] Julian centuries since J2000 |
References TWOPI.
short app_planet | ( | double | jd_tt, |
const object * | ss_body, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | dis | ||
) |
Computes the apparent place of a solar system body. This is the same as calling place() for the body with NOVAS_TOD as the system, except the different set of return values used.
REFERENCES:
jd_tt | [day] Terretrial Time (TT) based Julian date. | |
ss_body | Pointer to structure containing the body designation for the solar system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Apparent right ascension in hours, referred to true equator and equinox of date 'jd_tt'. (It may be NULL if not required) |
[out] | dec | [deg] Apparent declination in degrees, referred to true equator and equinox of date 'jd_tt'. (It may be NULL if not required) |
[out] | dis | [AU] True distance from Earth to the body at 'jd_tt' in AU (can be NULL if not needed). |
References NOVAS_TOD, and radec_planet().
short app_star | ( | double | jd_tt, |
const cat_entry * | star, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec | ||
) |
Computes the apparent place of a star, referenced to dynamical equator at date 'jd_tt', given its catalog mean place, proper motion, parallax, and radial velocity.
Notwithstanding the different set of return values, this is the same as calling place_star() with a NULL observer location and NOVAS_TOD as the system for an object that specifies the star.
REFERENCES:
jd_tt | [day] Terretrial Time (TT) based Julian date. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Apparent right ascension in hours, referred to true equator and equinox of date 'jd_tt' (it may be NULL if not required). |
[out] | dec | [deg] Apparent declination in degrees, referred to true equator and equinox of date 'jd_tt' (it may be NULL if not required). |
References NOVAS_TOD, and radec_star().
double app_to_cirs_ra | ( | double | jd_tt, |
enum novas_accuracy | accuracy, | ||
double | ra | ||
) |
Converts an apparent right ascension coordinate (measured from the true equinox of date) to a CIRS R.A., measured from the CIO.
jd_tt | [day] Terrestrial Time (TT) based Julian date |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) |
ra | [h] the apparent R.A. coordinate measured from the true equinox of date. |
References cio_ra().
short astro_planet | ( | double | jd_tt, |
const object * | ss_body, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | dis | ||
) |
Computes the astrometric place of a solar system body, referenced to the ICRS without light deflection or aberration. This is the same as calling place_icrs() for the body, except the different set of return values used.
REFERENCES:
jd_tt | [day] Terretrial Time (TT) based Julian date. | |
ss_body | Pointer to structure containing the body designation for the solar system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Astrometric right ascension in hours, referred to the ICRS, without light deflection or aberration. (It may be NULL if not required) |
[out] | dec | [deg] Astrometric declination in degrees, referred to the ICRS, without light deflection or aberration. (It may be NULL if not required) |
[out] | dis | [AU] True distance from Earth to the body at 'jd_tt' in AU (can be NULL if not needed). |
References NOVAS_ICRS, and radec_planet().
short astro_star | ( | double | jd_tt, |
const cat_entry * | star, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec | ||
) |
Computes the astrometric place of a star, referred to the ICRS without light deflection or aberration, at date 'jd_tt', given its catalog mean place, proper motion, parallax, and radial velocity.
Notwithstanding the different set of return values, this is the same as calling place_star() with a NULL observer location and NOVAS_ICRS as the system, or place_icrs() for an object that specifies the star.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Astrometric right ascension in hours, referred to the ICRS, without light deflection or aberration. (It may be NULL if not required) |
[out] | dec | [deg] Astrometric declination in degrees, referred to the ICRS, without light deflection or aberration. (It may be NULL if not required) |
References NOVAS_ICRS, and radec_star().
int bary2obs | ( | const double * | pos, |
const double * | pos_obs, | ||
double * | out, | ||
double * | lighttime | ||
) |
Moves the origin of coordinates from the barycenter of the solar system to the observer (or the geocenter); i.e., this function accounts for parallax (annual+geocentric or just annual).
REFERENCES:
pos | [AU] Position vector, referred to origin at solar system barycenter, components in AU. | |
pos_obs | [AU] Position vector of observer (or the geocenter), with respect to origin at solar system barycenter, components in AU. | |
[out] | out | [AU] Position vector, referred to origin at center of mass of the Earth, components in AU. It may be NULL if not required, or be the same vector as either of the inputs. |
[out] | lighttime | [day] Light time from object to Earth in days. It may be NULL if not required. |
References C_AUDAY.
int cal_date | ( | double | tjd, |
short * | year, | ||
short * | month, | ||
short * | day, | ||
double * | hour | ||
) |
This function will compute a broken down date on the Gregorian calendar for given the Julian date input. Input Julian date can be based on any UT-like time scale (UTC, UT1, TT, etc.) - output time value will have same basis.
REFERENCES:
tjd | [day] Julian date | |
[out] | year | [yr] Gregorian calendar year. It may be NULL if not required. |
[out] | month | [month] Gregorian calendat month [1:12]. It may be NULL if not required. |
[out] | day | [day] Day of the month [1:31]. It may be NULL if not required. |
[out] | hour | [h] Hour of day [0:24]. It may be NULL if not required. |
short cel2ter | ( | double | jd_ut1_high, |
double | jd_ut1_low, | ||
double | ut1_to_tt, | ||
enum novas_earth_rotation_measure | erot, | ||
enum novas_accuracy | accuracy, | ||
enum novas_equatorial_class | class, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Rotates a vector from the celestial to the terrestrial system. Specifically, it transforms a vector in the GCRS, or the dynamcal CIRS or TOD frames to the ITRS (a rotating earth-fixed system) by applying rotations for the GCRS-to-dynamical frame tie, precession, nutation, Earth rotation, and polar motion.
If 'system' is NOVAS_CIRS then method EROT_ERA must be used. Similarly, if 'system' is NOVAS_TOD then method must be EROT_ERA. Otherwise an error 3 is returned.
If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.
REFERENCES:
jd_ut1_high | [day] High-order part of UT1 Julian date. | |
jd_ut1_low | [day] Low-order part of UT1 Julian date. | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
erot | EROT_ERA (0) or EROT_GST (1), depending on whether to use GST relative to equinox of date (pre IAU 2006) or ERA relative to the CIO (IAU 2006 standard) as the Earth rotation measure. The main effect of this option is that it specifies the input coordinate system as CIRS or TOD when the input coordinate class is NOVAS_DYNAMICAL_CLASS. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
class | Input coordinate class, NOVAS_REFERENCE_CLASS (0) or NOVAS_DYNAMICAL_CLASS (1). Use the former if the input coordinates are in the GCRS, and the latter if they are CIRS or TOD (the 'erot' parameter selects which dynamical system the input is specified in.) | |
xp | [arcsec] Conventionally-defined X coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
in | Input position vector, geocentric equatorial rectangular coordinates in the specified input coordinate system (GCRS if 'class' is NOVAS_REFERENCE_CLASS; or else either CIRS if 'erot' is EROT_ERA, or TOD if 'erot' is EROT_GST). | |
[out] | out | ITRS position vector, geocentric equatorial rectangular coordinates (terrestrial system). It can be the same vector as the input. |
References era(), EROT_ERA, EROT_GST, gcrs_to_cirs(), NOVAS_DYNAMICAL_CLASS, NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUINOX, sidereal_time(), spin(), tt2tdb(), wobble(), and WOBBLE_PEF_TO_ITRS.
short cel_pole | ( | double | jd_tt, |
enum novas_pole_offset_type | type, | ||
double | dpole1, | ||
double | dpole2 | ||
) |
specifies the celestial pole offsets for high-precision applications. Each set of offsets is a correction to the modeled position of the pole for a specific date, derived from observations and published by the IERS.
The variables 'PSI_COR' and 'EPS_COR' are used only in NOVAS function e_tilt().
This function, if used, should be called before any other NOVAS functions for a given date. Values of the pole offsets specified via a call to this function will be used until explicitly changed.
'tjd' is used only if 'type' is POLE_OFFSETS_X_Y (2), to transform dx and dy to the equivalent Δδψ and Δδε values.
If 'type' is POLE_OFFSETS_X_Y (2), dx and dy are unit vector component corrections, but are expressed in milliarcseconds simply by multiplying by 206264806, the number of milliarcseconds in one radian.
NOTES:
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. |
type | POLE_OFFSETS_DPSI_DEPS (1) or POLE_OFFSETS_X_Y (2) |
dpole1 | [mas] Value of celestial pole offset in first coordinate, (Δδψ or dx) in milliarcseconds. |
dpole2 | [mas] Value of celestial pole offset in second coordinate, (Δδε or dy) in milliarcseconds. |
References EPS_COR, POLE_OFFSETS_DPSI_DEPS, POLE_OFFSETS_X_Y, and PSI_COR.
short cio_array | ( | double | jd_tdb, |
long | n_pts, | ||
ra_of_cio * | cio | ||
) |
Given an input TDB Julian date and the number of data points desired, this function returns a set of Julian dates and corresponding values of the GCRS right ascension of the celestial intermediate origin (CIO). The range of dates is centered (at least approximately) on the requested date. The function obtains the data from an external data file.
This function assumes that a CIO locator file (CIO_RA.TXT
or cio_ra.bin
) exists in the default location (configured at build time), or else was specified via set_cio_locator_file()
prior to calling this function.
NOTES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date | |
n_pts | Number of Julian dates and right ascension values requested (not less than 2 or more than NOVAS_CIO_CACHE_SIZE). | |
[out] | cio | A time series (array) of the right ascension of the Celestial Intermediate Origin (CIO) with respect to the GCRS. |
References DEFAULT_CIO_LOCATOR_FILE, NOVAS_CIO_CACHE_SIZE, and set_cio_locator_file().
short cio_basis | ( | double | jd_tdb, |
double | ra_cio, | ||
enum novas_cio_location_type | loc_type, | ||
enum novas_accuracy | accuracy, | ||
double * | x, | ||
double * | y, | ||
double * | z | ||
) |
Computes the orthonormal basis vectors, with respect to the GCRS (geocentric ICRS), of the celestial intermediate system defined by the celestial intermediate pole (CIP) (in the z direction) and the celestial intermediate origin (CIO) (in the x direction). A TDB Julian date and the right ascension of the CIO at that date is required as input. The right ascension of the CIO can be with respect to either the GCRS origin or the true equinox of date – different algorithms are used in the two cases.
This function effectively constructs the matrix C in eq. (3) of the reference.
REFERENCES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date | |
ra_cio | [h] Right ascension of the CIO at epoch (hours). | |
loc_type | CIO_VS_GCRS (1) if the cio location is relative to the GCRS or else CIO_VS_EQUINOX (2) if relative to the true equinox of date. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | x | Unit 3-vector toward the CIO, equatorial rectangular coordinates, referred to the GCRS. |
[out] | y | Unit 3-vector toward the y-direction, equatorial rectangular coordinates, referred to the GCRS. |
[out] | z | Unit 3-vector toward north celestial pole (CIP), equatorial rectangular coordinates, referred to the GCRS. |
References CIO_VS_EQUINOX, CIO_VS_GCRS, NOVAS_FULL_ACCURACY, and NOVAS_REDUCED_ACCURACY.
short cio_location | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
double * | ra_cio, | ||
short * | loc_type | ||
) |
Returns the location of the celestial intermediate origin (CIO) for a given Julian date, as a right ascension with respect to either the GCRS (geocentric ICRS) origin or the true equinox of date. The CIO is always located on the true equator (= intermediate equator) of date.
The user may specify an interpolation file to use via set_cio_locator_file() prior to calling this function. In that case the call will return CIO location relative to GCRS. In the absence of the table, it will calculate the CIO location relative to the true equinox. In either case the type of the location is returned alongside the corresponding CIO location value.
NOTES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra_cio | [h] Right ascension of the CIO, in hours, or NAN if returning with an error. |
[out] | loc_type | Pointer in which to return the reference system in which right ascension is given, which is either CIO_VS_GCRS (1) if the location was obtained via interpolation of the available data file, or else CIO_VS_EQUINOX (2) if it was calculated locally. It is set to -1 if returning with an error. |
References cio_array(), CIO_VS_EQUINOX, CIO_VS_GCRS, ira_equinox(), novas_debug(), NOVAS_DEBUG_OFF, NOVAS_DEBUG_ON, NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, and NOVAS_TRUE_EQUINOX.
short cio_ra | ( | double | jd_tt, |
enum novas_accuracy | accuracy, | ||
double * | ra_cio | ||
) |
Computes the true right ascension of the celestial intermediate origin (CIO) at a given TT Julian date. This is the negative value for the equation of the origins.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra_cio | [h] Right ascension of the CIO, with respect to the true equinox of date, in hours (+ or -), or NAN when returning with an error code. |
References cio_basis(), cio_location(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, and tt2tdb().
double cirs_to_app_ra | ( | double | jd_tt, |
enum novas_accuracy | accuracy, | ||
double | ra | ||
) |
Converts a CIRS right ascension coordinate (measured from the CIO) to an apparent R.A. measured from the true equinox of date.
jd_tt | [day] Terrestrial Time (TT) based Julian date |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) |
ra | [h] The CIRS right ascension coordinate, measured from the CIO. |
References cio_ra().
int cirs_to_gcrs | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Transforms a rectangular equatorial (x, y, z) vector from the Celestial Intermediate Reference System (CIRS) frame at the given epoch to the Geocentric Celestial Reference System (GCRS).
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | CIRS Input (x, y, z) position or velocity vector | |
[out] | out | Output position or velocity 3-vector in the GCRS coordinate frame. It can be the same vector as the input. |
References cio_basis(), and cio_location().
int cirs_to_itrs | ( | double | jd_tt_high, |
double | jd_tt_low, | ||
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Rotates a position vector from the dynamical CIRS frame of date to the Earth-fixed ITRS frame (IAU 2000 standard method).
If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.
If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.
REFERENCES:
jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date. | |
jd_tt_low | [day] Low-order part of Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
xp | [arcsec] Conventionally-defined X coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
in | Position vector, geocentric equatorial rectangular coordinates, referred to CIRS axes (celestial system). | |
[out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system). |
References cel2ter(), EROT_ERA, and NOVAS_DYNAMICAL_CLASS.
int cirs_to_tod | ( | double | jd_tt, |
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Transforms a rectangular equatorial (x, y, z) vector from the Celestial Intermediate Reference System (CIRS) at the given epoch to the True of Date (TOD) reference system.
jd_tt | [day] Terrestrial Time (TT) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | CIRS Input (x, y, z) position or velocity vector | |
[out] | out | Output position or velocity 3-vector in the True of Date (TOD) frame. It can be the same vector as the input. |
double d_light | ( | const double * | pos_src, |
const double * | pos_body | ||
) |
Returns the difference in light-time, for a star, between the barycenter of the solar system and the observer (or the geocenter) (Usage A).
Alternatively (Usage B), this function returns the light-time from the observer (or the geocenter) to a point on a light ray that is closest to a specific solar system body. For this purpose, 'pos_src' is the position vector toward observed object, with respect to origin at observer (or the geocenter); 'pos_body' is the position vector of solar system body, with respect to origin at observer (or the geocenter), components in AU; and the returned value is the light time to point on line defined by 'pos' that is closest to solar system body (positive if light passes body before hitting observer, i.e., if 'pos_body' is within 90 degrees of 'pos_src').
NOTES:
pos_src | Position vector towards observed object, with respect to the SSB (Usage A), or relative to the observer / geocenter (Usage B). |
pos_body | [AU] Position of observer relative to SSB (Usage A), or position of intermediate solar-system body with respect to the observer / geocenter (Usage B). |
References C_AUDAY.
int e_tilt | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
double * | mobl, | ||
double * | tobl, | ||
double * | ee, | ||
double * | dpsi, | ||
double * | deps | ||
) |
Computes quantities related to the orientation of the Earth's rotation axis at Julian date 'jd_tdb'.
Values of the celestial pole offsets 'PSI_COR' and 'EPS_COR' are set using function 'cel_pole', if desired. See the prolog of cel_pole() for details.
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | mobl | [deg] Mean obliquity of the ecliptic in degrees. It may be NULL if not required. |
[out] | tobl | [deg] True obliquity of the ecliptic in degrees. It may be NULL if not required. |
[out] | ee | [deg] Equation of the equinoxes in seconds of time. It may be NULL if not required. |
[out] | dpsi | [arcsec] Nutation in longitude in arcseconds. It may be NULL if not required. |
[out] | deps | [arcsec] Nutation in obliquity in arcseconds. It may be NULL if not required. |
References ee_ct(), EPS_COR, mean_obliq(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, nutation_angles(), and PSI_COR.
int ecl2equ | ( | double | jd_tt, |
enum novas_equator_type | coord_sys, | ||
enum novas_accuracy | accuracy, | ||
double | elon, | ||
double | elat, | ||
double * | ra, | ||
double * | dec | ||
) |
Convert ecliptic longitude and latitude to right ascension and declination. To convert GCRS ecliptic coordinates (mean ecliptic and equinox of J2000.0), set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at'jd_tt'.
jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2]) | |
coord_sys | The astrometric reference system of the coordinates. If 'coord_sys' is NOVAS_GCRS_EQUATOR(2), the input GCRS coordinates are converted to J2000 ecliptic coordinates. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
elon | [deg] Ecliptic longitude in degrees, referred to specified ecliptic and equinox of date. | |
elat | [deg] Ecliptic latitude in degrees, referred to specified ecliptic and equinox of date. | |
[out] | ra | [h] Right ascension in hours, referred to specified equator and equinox of date. |
[out] | dec | [deg] Declination in degrees, referred to specified equator and equinox of date. |
References ecl2equ_vec().
short ecl2equ_vec | ( | double | jd_tt, |
enum novas_equator_type | coord_sys, | ||
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Converts an ecliptic position vector to an equatorial position vector. To convert ecliptic coordinates (mean ecliptic and equinox of J2000.0) to GCRS RA and dec to, set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at 'jd_tt'.
jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2]) | |
coord_sys | The astrometric reference system type of the coordinates | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | Position vector, referred to specified ecliptic and equinox of date. | |
[out] | out | Position vector, referred to specified equator and equinox of date. It can be the same vector as the input. |
References e_tilt(), frame_tie(), J2000_TO_ICRS, mean_obliq(), NOVAS_FULL_ACCURACY, NOVAS_GCRS_EQUATOR, NOVAS_MEAN_EQUATOR, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUATOR, and tt2tdb().
double ee_ct | ( | double | jd_tt_high, |
double | jd_tt_low, | ||
enum novas_accuracy | accuracy | ||
) |
Computes the "complementary terms" of the equation of the equinoxes. The input Julian date can be split into high and low order parts for improved accuracy. Typically, the split is into integer and fractiona parts. If the precision of a single part is sufficient, you may set the low order part to 0.
The series used in this function was derived from the first reference. This same series was also adopted for use in the IAU's Standards of Fundamental Astronomy (SOFA) software (i.e., subroutine eect00.for and function eect00.c
).
The low-accuracy series used in this function is a simple implementation derived from the first reference, in which terms smaller than 2 microarcseconds have been omitted.
REFERENCES:
jd_tt_high | [day] High-order part of TT based Julian date. |
jd_tt_low | [day] Low-order part of TT based Julian date. |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) |
References accum_prec(), novas_delaunay_args::D, novas_delaunay_args::F, fund_args(), NOVAS_FULL_ACCURACY, NOVAS_MERCURY, NOVAS_NEPTUNE, novas_delaunay_args::Omega, and planet_lon().
short ephemeris | ( | const double * | jd_tdb, |
const object * | body, | ||
enum novas_origin | origin, | ||
enum novas_accuracy | accuracy, | ||
double * | pos, | ||
double * | vel | ||
) |
Retrieves the position and velocity of a solar system body from a fundamental ephemeris.
It is recommended that the input structure 'cel_obj' be created using make_object()
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date | |
body | Pointer to structure containing the designation of the body of interest | |
origin | NOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) | |
accuracy | NOCAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | [AU] Pointer to structure containing the designation of the body of interest |
[out] | vel | [AU/day] Velocity vector of the body at 'jd_tdb'; equatorial rectangular coordinates in AU/day referred to the ICRS. |
cel_obj->type
is invalid, 10 + the error code from solarsystem(), or 20 + the error code from readeph().References object::name, NOVAS_BARYCENTER, NOVAS_EPHEM_OBJECT, NOVAS_FULL_ACCURACY, NOVAS_HELIOCENTER, NOVAS_ORIGIN_TYPES, NOVAS_PLANET, NOVAS_SSB, NOVAS_SUN, object::number, readeph(), and object::type.
short equ2ecl | ( | double | jd_tt, |
enum novas_equator_type | coord_sys, | ||
enum novas_accuracy | accuracy, | ||
double | ra, | ||
double | dec, | ||
double * | elon, | ||
double * | elat | ||
) |
Convert right ascension and declination to ecliptic longitude and latitude. To convert GCRS RA and dec to ecliptic coordinates (mean ecliptic and equinox of J2000.0), set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at 'jd_tt'.
jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2]) | |
coord_sys | The astrometric reference system of the coordinates. If 'coord_sys' is NOVAS_GCRS_EQUATOR(2), the input GCRS coordinates are converted to J2000 ecliptic coordinates. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
ra | [h] Right ascension in hours, referred to specified equator and equinox of date. | |
dec | [deg] Declination in degrees, referred to specified equator and equinox of date. | |
[out] | elon | [deg] Ecliptic longitude in degrees, referred to specified ecliptic and equinox of date. |
[out] | elat | [deg] Ecliptic latitude in degrees, referred to specified ecliptic and equinox of date. |
References equ2ecl_vec().
short equ2ecl_vec | ( | double | jd_tt, |
enum novas_equator_type | coord_sys, | ||
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Converts an equatorial position vector to an ecliptic position vector. To convert ICRS RA and dec to ecliptic coordinates (mean ecliptic and equinox of J2000.0), set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at 'jd_tt'.
jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2]) | |
coord_sys | The astrometric reference system type of the coordinates. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | Position vector, referred to specified equator and equinox of date. | |
[out] | out | Position vector, referred to specified ecliptic and equinox of date. It can be the same vector as the input. If 'coord_sys' is NOVAS_GCRS_EQUATOR(2), the input GCRS coordinates are converted to J2000 ecliptic coordinates. |
References e_tilt(), frame_tie(), ICRS_TO_J2000, mean_obliq(), NOVAS_FULL_ACCURACY, NOVAS_GCRS_EQUATOR, NOVAS_MEAN_EQUATOR, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUATOR, and tt2tdb().
int equ2gal | ( | double | ra, |
double | dec, | ||
double * | glon, | ||
double * | glat | ||
) |
Converts ICRS right ascension and declination to galactic longitude and latitude.
REFERENCES:
ra | [h] ICRS right ascension in hours. | |
dec | [deg] ICRS declination in degrees. | |
[out] | glon | [deg] Galactic longitude in degrees. |
[out] | glat | [deg] Galactic latitude in degrees. |
int equ2hor | ( | double | jd_ut1, |
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
double | xp, | ||
double | yp, | ||
const on_surface * | location, | ||
double | ra, | ||
double | dec, | ||
enum novas_refraction_model | ref_option, | ||
double * | zd, | ||
double * | az, | ||
double * | rar, | ||
double * | decr | ||
) |
Transforms topocentric (TOD) right ascension and declination to zenith distance and azimuth. This method should not be used to convert CIRS apparent coordinates (IAU 2000 standard) – for those you should use cirs_to_itrs() followed by itrs_to_hor() instead.
It uses a method that properly accounts for polar motion, which is significant at the sub-arcsecond level. This function can also adjust coordinates for atmospheric refraction.
NOTES:
REFERENCES:
jd_ut1 | [day] UT1 based Julian date | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
xp | [arcsec] Conventionally-defined x coordinate of celestial intermediate pole with respect to ITRS reference pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined y coordinate of celestial intermediate pole with respect to ITRS reference pole, in arcseconds. | |
location | The observer location | |
ra | [h] Topocentric right ascension of object of interest, in hours, referred to true equator and equinox of date. | |
dec | [deg] Topocentric declination of object of interest, in degrees, referred to true equator and equinox of date. | |
ref_option | NOVAS_STANDARD_ATMOSPHERE (1), or NOVAS_WEATHER_AT_LOCATION (2) if to use the weather | |
[out] | zd | [deg] Topocentric zenith distance in degrees (unrefracted). |
[out] | az | [deg] Topocentric azimuth (measured east from north) in degrees. |
[out] | rar | [h] Topocentric right ascension of object of interest, in hours, referred to true equator and equinox of date, affected by refraction if 'ref_option' is non-zero. (It may be NULL if not required) |
[out] | decr | [deg] Topocentric declination of object of interest, in degrees, referred to true equator and equinox of date. (It may be NULL if not required) |
References EROT_GST, on_surface::latitude, on_surface::longitude, NOVAS_DYNAMICAL_CLASS, refract_astro(), and ter2cel().
double era | ( | double | jd_ut1_high, |
double | jd_ut1_low | ||
) |
Returns the value of the Earth Rotation Angle (theta) for a given UT1 Julian date. The expression used is taken from the note to IAU Resolution B1.8 of 2000. The input Julian date cane be split into an into high and low order parts (e.g. integer and fractional parts) for improved accuracy, or else one of the components (e.g. the low part) can be set to zero if no split is desired.
The algorithm used here is equivalent to the canonical theta = 0.7790572732640 + 1.00273781191135448 * t, where t is the time in days from J2000 (t = jd_high + jd_low - JD_J2000), but it avoids many two-PI 'wraps' that decrease precision (adopted from SOFA Fortran routine iau_era00; see also expression at top of page 35 of IERS Conventions (1996)).
REFERENCES:
jd_ut1_high | [day] High-order part of UT1 Julian date. |
jd_ut1_low | [day] Low-order part of UT1 Julian date. |
int frame_tie | ( | const double * | in, |
enum novas_frametie_direction | direction, | ||
double * | out | ||
) |
Transforms a vector from the dynamical reference system to the International Celestial Reference System (ICRS), or vice versa. The dynamical reference system is based on the dynamical mean equator and equinox of J2000.0. The ICRS is based on the space-fixed ICRS axes defined by the radio catalog positions of several hundred extragalactic objects.
For geocentric coordinates, the same transformation is used between the dynamical reference system and the GCRS.
NOTES:
REFERENCES:
in | Position vector, equatorial rectangular coordinates. | |
direction | <0 for for dynamical to ICRS transformation, or else >=0 for ICRS to dynamical transformation. Alternatively you may use the constants J2000_TO_ICRS (-1; or negative) or ICRS_TO_J2000 (0; or positive). | |
[out] | out | Position vector, equatorial rectangular coordinates. It can be the same vector as the input. |
int fund_args | ( | double | t, |
novas_delaunay_args * | a | ||
) |
Compute the fundamental arguments (mean elements) of the Sun and Moon.
REFERENCES:
t | [cy] TDB time in Julian centuries since J2000.0 | |
[out] | a | [rad] Fundamental arguments data to populate (5 doubles) [0:2π] |
References novas_delaunay_args::D, novas_delaunay_args::F, novas_delaunay_args::l, novas_delaunay_args::l1, norm_ang(), and novas_delaunay_args::Omega.
int gal2equ | ( | double | glon, |
double | glat, | ||
double * | ra, | ||
double * | dec | ||
) |
Converts galactic longitude and latitude to ICRS right ascension and declination.
REFERENCES:
glon | [deg] Galactic longitude in degrees. | |
glat | [deg] Galactic latitude in degrees. | |
[out] | ra | [h] ICRS right ascension in hours. |
[out] | dec | [deg] ICRS declination in degrees. |
short gcrs2equ | ( | double | jd_tt, |
enum novas_dynamical_type | sys, | ||
enum novas_accuracy | accuracy, | ||
double | rag, | ||
double | decg, | ||
double * | ra, | ||
double * | dec | ||
) |
Converts GCRS right ascension and declination to coordinates with respect to the equator of date (mean or true). For coordinates with respect to the true equator of date, the origin of right ascension can be either the true equinox or the celestial intermediate origin (CIO). This function only supports the CIO-based method.
jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_ICRS_EQUATOR) | |
sys | Dynamical equatorial system type | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) (unused if 'coord_sys' is not NOVAS_ICRS [3]) | |
rag | [h] GCRS right ascension in hours. | |
decg | [deg] GCRS declination in degrees. | |
[out] | ra | [h] Right ascension in hours, referred to specified equator and right ascension origin of date. |
[out] | dec | [deg] Declination in degrees, referred to specified equator of date. |
References DEG2RAD, frame_tie(), gcrs_to_cirs(), ICRS_TO_J2000, NOVAS_DYNAMICAL_CIRS, NOVAS_DYNAMICAL_MOD, NOVAS_DYNAMICAL_TOD, precession(), tt2tdb(), and vector2radec().
int gcrs_to_cirs | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Transforms a rectangular equatorial (x, y, z) vector from the Geocentric Celestial Reference System (GCRS) to the Celestial Intermediate Reference System (CIRS) frame at the given epoch
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | GCRS Input (x, y, z) position or velocity vector | |
[out] | out | Output position or velocity 3-vector in the True equinox of Date coordinate frame. It can be the same vector as the input. |
References cio_basis(), and cio_location().
int gcrs_to_j2000 | ( | const double * | in, |
double * | out | ||
) |
Change GCRS coordinates to J2000 coordinates. Same as frame_tie() called with ICRS_TO_J2000
in | GCRS input 3-vector | |
[out] | out | J2000 output 3-vector |
References frame_tie(), and ICRS_TO_J2000.
short geo_posvel | ( | double | jd_tt, |
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
const observer * | obs, | ||
double * | pos, | ||
double * | vel | ||
) |
Computes the geocentric position and velocity of an observer. The final vectors are expressed in the GCRS.
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] TT - UT1 time difference in seconds | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
obs | Observer location | |
[out] | pos | [AU] Position 3-vector of observer, with respect to origin at geocenter, referred to GCRS axes, components in AU. (It may be NULL if not required.) |
[out] | vel | [AU/day] Velocity 3-vector of observer, with respect to origin at geocenter, referred to GCRS axes, components in AU/day. (It must be distinct from the pos output vector, and may be NULL if not required) |
References AU_KM, CAT_ENTRY_INIT, e_tilt(), ephemeris(), EROT_ERA, geo_posvel(), observer::near_earth, NOVAS_AIRBORNE_OBSERVER, NOVAS_BARYCENTER, NOVAS_EARTH, NOVAS_FULL_ACCURACY, NOVAS_OBSERVER_AT_GEOCENTER, NOVAS_OBSERVER_IN_EARTH_ORBIT, NOVAS_OBSERVER_ON_EARTH, NOVAS_PLANET, NOVAS_REDUCED_ACCURACY, NOVAS_SOLAR_SYSTEM_OBSERVER, observer::on_surf, in_space::sc_pos, in_space::sc_vel, sidereal_time(), terra(), tt2tdb(), and observer::where.
double get_ut1_to_tt | ( | int | leap_seconds, |
double | dut1 | ||
) |
Returns the TT - UT1 time difference given the leap seconds and the actual UT1 - UTC time difference as measured and published by IERS.
NOTES:
leap_seconds | [s] Leap seconds at the time of observations |
dut1 | [s] UT1 - UTC time difference [-0.5:0.5] |
ut1_to_tt
argument.References get_utc_to_tt().
double get_utc_to_tt | ( | int | leap_seconds | ) |
Returns the difference between Terrestrial Time (TT) and Universal Coordinated Time (UTC)
leap_seconds | [s] The current leap seconds (see IERS Bulletins) |
References NOVAS_TAI_TO_TT.
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 * | 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 C_AUDAY, d_light(), grav_vec(), novas_planet_bundle::mask, NOVAS_PLANETS, NOVAS_RMASS_INIT, novas_planet_bundle::pos, and novas_planet_bundle::vel.
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. |
References C.
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 * | 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(), and novas_inv_max_iter.
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. |
int hor_to_itrs | ( | const on_surface * | location, |
double | az, | ||
double | za, | ||
double * | itrs | ||
) |
Converts astrometric (unrefracted) azimuth and zenith angles at the specified observer location to a unit position vector in the Earth-fixed ITRS frame.
location | Observer location on Earth | |
az | [deg] astrometric azimuth angle at observer location [0:360]. It may be NULL if not required. | |
za | [deg] astrometric zenith angle at observer location [0:180]. It may be NULL if not required. | |
[out] | itrs | Unit 3-vector direction in Earth-fixed ITRS frame |
References on_surface::latitude, and on_surface::longitude.
double ira_equinox | ( | double | jd_tdb, |
enum novas_equinox_type | equinox, | ||
enum novas_accuracy | accuracy | ||
) |
Compute the intermediate right ascension of the equinox at the input Julian date, using an analytical expression for the accumulated precession in right ascension. For the true equinox, the result is the equation of the origins.
NOTES:
REFERENCES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date |
equinox | NOVAS_MEAN_EQUINOX (0) or NOVAS_TRUE_EQUINOX (1; or non-zero) |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) |
References e_tilt(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, and NOVAS_TRUE_EQUINOX.
int itrs_to_cirs | ( | double | jd_tt_high, |
double | jd_tt_low, | ||
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Rotates a position vector from the Earth-fixed ITRS frame to the dynamical CIRS frame of date (IAU 2000 standard method).
If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.
If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.
REFERENCES:
jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date. | |
jd_tt_low | [day] Low-order part of Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
xp | [arcsec] Conventionally-defined X coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
in | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system) | |
[out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to CIRS axes (celestial system). |
References EROT_ERA, NOVAS_DYNAMICAL_CLASS, and ter2cel().
int itrs_to_hor | ( | const on_surface * | location, |
const double * | itrs, | ||
double * | az, | ||
double * | za | ||
) |
Converts a position vector in the Earth-fixed ITRS frame to astrometric (unrefracted) azimuth and zenith angles at the specified observer location.
location | Observer location on Earth | |
itrs | 3-vector position in Earth-fixed ITRS frame | |
[out] | az | [deg] astrometric azimuth angle at observer location [0:360]. It may be NULL if not required. |
[out] | za | [deg] astrometric zenith angle at observer location [0:180]. It may be NULL if not required. |
References on_surface::latitude, and on_surface::longitude.
int itrs_to_tod | ( | double | jd_tt_high, |
double | jd_tt_low, | ||
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Rotates a position vector from the Earth-fixed ITRS frame to the dynamical True of Date (TOD) frame of date (pre IAU 2000 method).
If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.
If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.
REFERENCES:
jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date. | |
jd_tt_low | [day] Low-order part of Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
xp | [arcsec] Conventionally-defined X coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
in | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system) | |
[out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to True of Date (TOD) axes (celestial system) |
References EROT_GST, NOVAS_DYNAMICAL_CLASS, and ter2cel().
int j2000_to_gcrs | ( | const double * | in, |
double * | out | ||
) |
Change J2000 coordinates to GCRS coordinates. Same as frame_tie() called with J2000_TO_ICRS
in | J2000 input 3-vector | |
[out] | out | GCRS output 3-vector |
References frame_tie(), and J2000_TO_ICRS.
int j2000_to_tod | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Transforms a rectangular equatorial (x, y, z) vector from J2000 coordinates to the True of Date (TOD) reference frame at the given epoch
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | Input (x, y, z) position or velocity vector in rectangular equatorial coordinates at J2000 | |
[out] | out | Output position or velocity 3-vector in the True equinox of Date coordinate frame. It can be the same vector as the input. |
References NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NUTATE_MEAN_TO_TRUE, nutation(), and precession().
double julian_date | ( | short | year, |
short | month, | ||
short | day, | ||
double | hour | ||
) |
Returns the Julian date for a given Gregorian calendar date. This function makes no checks for a valid input calendar date. Input calendar date must be Gregorian. Input time value can be based on any UT-like time scale (UTC, UT1, TT, etc.) - output Julian date will have the same basis.
REFERENCES:
year | [yr] Gregorian calendar year |
month | [month] Gregorian calendar month [1:12] |
day | [day] Day of month [1:31] |
hour | [hr] Hour of day [0:24] |
short light_time | ( | double | jd_tdb, |
const object * | body, | ||
const double * | pos_obs, | ||
double | tlight0, | ||
enum novas_accuracy | accuracy, | ||
double * | pos_src_obs, | ||
double * | tlight | ||
) |
Computes the geocentric position of a solar system body, as antedated for light-time.
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
body | Pointer to structure containing the designation for the solar system body | |
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. | |
tlight0 | [day] First approximation to light-time, in days (can be set to 0.0 if unknown). | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos_src_obs | [AU] Position 3-vector of body, with respect to origin at observer (or the geocenter), referred to ICRS axes, components in AU. It can be the same vector as either of the inputs. |
[out] | tlight | [day] Calculated light time |
References light_time2().
int light_time2 | ( | double | jd_tdb, |
const object * | body, | ||
const double * | pos_obs, | ||
double | tlight0, | ||
enum novas_accuracy | accuracy, | ||
double * | p_src_obs, | ||
double * | v_ssb, | ||
double * | tlight | ||
) |
Computes the geocentric position and velocity of a solar system body, as antedated for light-time. It is effectively the same as the original NOVAS C light_time(), except that this returns the antedated source velocity vector also.
NOTES:
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
body | Pointer to structure containing the designation for the solar system body | |
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. | |
tlight0 | [day] First approximation to light-time, in days (can be set to 0.0 if unknown). | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | p_src_obs | [AU] Position 3-vector of body, relative to observer, referred to ICRS axes, components in AU. |
[out] | v_ssb | [AU/day] Velocity 3-vector of body, with respect to the Solar-system barycenter, referred to ICRS axes, components in AU/day. |
[out] | tlight | [day] Calculated light time, or NAN when returning with an error code. |
References bary2obs(), ephemeris(), NOVAS_BARYCENTER, NOVAS_FULL_ACCURACY, and novas_inv_max_iter.
int limb_angle | ( | const double * | pos_src, |
const double * | pos_obs, | ||
double * | limb_ang, | ||
double * | nadir_ang | ||
) |
Determines the angle of an object above or below the Earth's limb (horizon). The geometric limb is computed, assuming the Earth to be an airless sphere (no refraction or oblateness is included). The observer can be on or above the Earth. For an observer on the surface of the Earth, this function returns the approximate unrefracted elevation.
pos_src | [AU] Position 3-vector of observed object, with respect to origin at geocenter, components in AU. | |
pos_obs | [AU] Position 3-vector of observer, with respect to origin at geocenter, components in AU. | |
[out] | limb_ang | [deg] Angle of observed object above (+) or below (-) limb in degrees, or NAN if reurning with an error. It may be NULL if not required. |
[out] | nadir_ang | Nadir angle of observed object as a fraction of apparent radius of limb: lt;1.0 if below the limb; 1.0 on the limb; or >1.0 if above the limb. Returns NAN in case of an error return. It may be NULL if not required. |
References M_PI.
short local_planet | ( | double | jd_tt, |
const object * | ss_body, | ||
double | ut1_to_tt, | ||
const on_surface * | position, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | dis | ||
) |
Computes the local apparent place of a solar system body, in the GCRS. This is the same as calling place() for the body for the same observer location and NOVAS_GCRS as the reference system, except the different set of return values used.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
ss_body | Pointer to structure containing the body designation for the solar system body. | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
position | Position of the observer | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Local right ascension in hours, referred to the GCRS (it may be NULL if not required). |
[out] | dec | [deg] Local right ascension in hours, referred to the GCRS (it may be NULL if not required). |
[out] | dis | [AU] True distance from Earth to the body at 'jd_tt' in AU (it may be NULL if not required). |
References make_observer(), NOVAS_GCRS, NOVAS_OBSERVER_ON_EARTH, and radec_planet().
short local_star | ( | double | jd_tt, |
double | ut1_to_tt, | ||
const cat_entry * | star, | ||
const on_surface * | position, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec | ||
) |
Computes the local apparent place of a star at date 'jd_tt', in the GCRS, given its catalog mean place, proper motion, parallax, and radial velocity.
Notwithstanding the different set of return values, this is the same as calling place_star() with the same observer location NOVAS_GCRS for an object that specifies the star.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
position | Position of the observer | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Local right ascension in hours, referred to the GCRS (it may be NULL if not required). |
[out] | dec | [deg] Local right ascension in hours, referred to the GCRS (it may be NULL if not required). |
References make_observer(), NOVAS_GCRS, NOVAS_OBSERVER_ON_EARTH, and radec_star().
int make_airborne_observer | ( | const on_surface * | location, |
const double * | vel, | ||
observer * | obs | ||
) |
Populates an 'observer' data structure for an observer moving relative to the surface of Earth, such as an airborne observer. Airborne observers have an earth fixed momentary location, defined by longitude, latitude, and altitude, the same was as for a stationary observer on Earth, but are moving relative to the surface, such as in an aircraft or balloon observatory.
location | Current longitude, latitude and altitude, and local weather (temperature and pressure) | |
vel | [km/s] Surface velocity. | |
[out] | obs | Pointer to data structure to populate. |
References IN_SPACE_INIT, make_observer(), NOVAS_AIRBORNE_OBSERVER, and in_space::sc_vel.
short make_cat_entry | ( | const char * | star_name, |
const char * | catalog, | ||
long | cat_num, | ||
double | ra, | ||
double | dec, | ||
double | pm_ra, | ||
double | pm_dec, | ||
double | parallax, | ||
double | rad_vel, | ||
cat_entry * | star | ||
) |
Populates the data structure for a 'catalog' source, such as a star.
star_name | Object name (less than SIZE_OF_OBJ_NAME in length). It may be NULL if not relevant. | |
catalog | Catalog identifier (less than SIZE_OF_CAT_NAME in length). E.g. 'HIP' = Hipparcos, 'TY2' = Tycho-2. It may be NULL if not relevant. | |
cat_num | Object number in the catalog. | |
ra | [h] Right ascension of the object (hours). | |
dec | [deg] Declination of the object (degrees). | |
pm_ra | [mas/yr] Proper motion in right ascension (milliarcseconds/year). | |
pm_dec | [mas/yr] Proper motion in declination (milliarcseconds/year). | |
parallax | [mas] Parallax (milliarcseconds). | |
rad_vel | [km/s] Radial velocity (LSR) | |
[out] | star | Pointer to data structure to populate. |
References cat_entry::catalog, cat_entry::dec, cat_entry::parallax, cat_entry::promodec, cat_entry::promora, cat_entry::ra, rad_vel(), cat_entry::radialvelocity, cat_entry::starname, and cat_entry::starnumber.
Populates and object data structure with the data for a catalog source.
star | Pointer to structure to populate with the catalog data for a celestial object located outside the solar system. | |
[out] | source | Pointer to the celestial object data structure to be populated. |
References make_object(), NOVAS_CATALOG_OBJECT, cat_entry::starname, and cat_entry::starnumber.
int make_ephem_object | ( | const char * | name, |
long | num, | ||
object * | body | ||
) |
Sets a celestial object to be a Solar-system ephemeris body. Typically this would be used to define minor planets, asteroids, comets and planetary satellites.
name | Name of object. By default converted to upper-case, unless novas_case_sensitive() was called with a non-zero argument. Max. SIZE_OF_OBJ_NAME long, including termination. If the ephemeris provider uses names, then the name should match those of the ephemeris provider – otherwise it is not important. | |
num | Solar-system body ID number (e.g. NAIF). The number should match the needs of the ephemeris provider used with NOVAS. (If the ephemeris provider is by name and not ID number, then the number here is not important). | |
[out] | body | Pointer to structure to populate. |
References make_object(), and NOVAS_EPHEM_OBJECT.
int make_in_space | ( | const double * | sc_pos, |
const double * | sc_vel, | ||
in_space * | loc | ||
) |
Populates an 'in_space' data structure, for an observer situated on a near-Earth spacecraft, with the provided position and velocity components. Both input vectors are assumed with respect to true equator and equinox of date.
sc_pos | [km] Geocentric (x, y, z) position vector in km. NULL defaults to the origin | |
sc_vel | [km/s] Geocentric (x, y, z) velocity vector in km/s. NULL defaults to zero speed. | |
[out] | loc | Pointer to earth-orbit location data structure to populate. |
References in_space::sc_pos, and in_space::sc_vel.
short make_object | ( | enum novas_object_type | type, |
long | number, | ||
const char * | name, | ||
const cat_entry * | star, | ||
object * | source | ||
) |
Populates an object data structure using the parameters provided. By default (for compatibility with NOVAS C) source names are converted to upper-case internally. You can however enable case-sensitive processing by calling novas_case_sensitive() before.
type | The type of object. NOVAS_PLANET (0), NOVAS_EPHEM_OBJECT (1) or NOVAS_CATALOG_OBJECT (2) | |
number | The novas ID number (for solar-system bodies only, otherwise ignored) | |
name | The name of the object (case insensitive). It should be shorter than SIZE_OF_OBJ_NAME or else an error will be returned. The name is converted to upper internally unless novas_case_sensitive() was called before to change that. | |
star | Pointer to structure to populate with the catalog data for a celestial object located outside the solar system. Used only if type is NOVAS_CATALOG_OBJECT, otherwise ignored and can be NULL. | |
[out] | source | Pointer to the celestial object data structure to be populated. |
References object::name, NOVAS_CATALOG_OBJECT, NOVAS_OBJECT_TYPES, NOVAS_PLANET, NOVAS_PLANETS, object::number, object::star, and object::type.
short make_observer | ( | enum novas_observer_place | where, |
const on_surface * | loc_surface, | ||
const in_space * | loc_space, | ||
observer * | obs | ||
) |
Populates an 'observer' data structure given the parameters. The output data structure may be used an the the inputs to NOVAS-C function 'place()'.
where | The location type of the observer | |
loc_surface | Pointer to data structure that defines a location on Earth's surface. Used only if 'where' is NOVAS_OBSERVER_ON_EARTH, otherwise can be NULL. | |
loc_space | Pointer to data structure that defines a near-Earth location in space. Used only if 'where' is NOVAS_OBSERVER_IN_EARTH_ORBIT, otherwise can be NULL. | |
[out] | obs | Pointer to observer data structure to populate. |
References observer::near_earth, NOVAS_AIRBORNE_OBSERVER, NOVAS_OBSERVER_AT_GEOCENTER, NOVAS_OBSERVER_IN_EARTH_ORBIT, NOVAS_OBSERVER_ON_EARTH, NOVAS_SOLAR_SYSTEM_OBSERVER, observer::on_surf, in_space::sc_vel, and observer::where.
int make_observer_at_geocenter | ( | observer * | obs | ) |
Populates an 'observer' data structure for a hypothetical observer located at Earth's geocenter. The output data structure may be used an the the inputs to NOVAS-C function 'place()'.
[out] | obs | Pointer to data structure to populate. |
References make_observer(), and NOVAS_OBSERVER_AT_GEOCENTER.
int make_observer_in_space | ( | const double * | sc_pos, |
const double * | sc_vel, | ||
observer * | obs | ||
) |
Populates an 'observer' data structure, for an observer situated on a near-Earth spacecraft, with the specified geocentric position and velocity vectors. Both input vectors are with respect to true equator and equinox of date. The output data structure may be used an the the inputs to NOVAS-C function 'place()'.
sc_pos | [km] Geocentric (x, y, z) position vector in km. | |
sc_vel | [km/s] Geocentric (x, y, z) velocity vector in km/s. | |
[out] | obs | Pointer to the data structure to populate |
References make_in_space(), make_observer(), and NOVAS_OBSERVER_IN_EARTH_ORBIT.
int make_observer_on_surface | ( | double | latitude, |
double | longitude, | ||
double | height, | ||
double | temperature, | ||
double | pressure, | ||
observer * | obs | ||
) |
Populates and 'on_surface' data structure with the specified location defining parameters of the observer. The output data structure may be used an the the inputs to NOVAS-C function 'place()'.
latitude | [deg] Geodetic (ITRS) latitude in degrees; north positive. | |
longitude | [deg] Geodetic (ITRS) longitude in degrees; east positive. | |
height | [m] Altitude over se level of the observer (meters). | |
temperature | [C] Temperature (degrees Celsius). | |
pressure | [mbar] Atmospheric pressure (millibars). | |
[out] | obs | Pointer to the data structure to populate. |
References make_observer(), make_on_surface(), and NOVAS_OBSERVER_ON_EARTH.
int make_on_surface | ( | double | latitude, |
double | longitude, | ||
double | height, | ||
double | temperature, | ||
double | pressure, | ||
on_surface * | loc | ||
) |
Populates an 'on_surface' data structure, for an observer on the surface of the Earth, with the given parameters.
Note, that because this is an original NOVAS C routine, it does not have an argument to set a humidity value (e.g. for radio refraction). As such the call will set humidity to 0.0. To set the humidity, set the output structure's field after calling this funcion. Its unit is [%], and so the range is 0.0–100.0.
latitude | [deg] Geodetic (ITRS) latitude in degrees; north positive. | |
longitude | [deg] Geodetic (ITRS) longitude in degrees; east positive. | |
height | [m] Altitude over se level of the observer (meters). | |
temperature | [C] Temperature (degrees Celsius). | |
pressure | [mbar] Atmospheric pressure (millibars). | |
[out] | loc | Pointer to Earth location data structure to populate. |
References on_surface::height, on_surface::humidity, on_surface::latitude, on_surface::longitude, on_surface::pressure, and on_surface::temperature.
int make_planet | ( | enum novas_planet | num, |
object * | planet | ||
) |
Sets a celestial object to be a major planet, or the Sun, Moon or Solar-system Barycenter.
num | Planet ID number (NOVAS convention) | |
[out] | planet | Pointer to structure to populate. |
References make_object(), NOVAS_PLANET, NOVAS_PLANET_NAMES_INIT, and NOVAS_PLANETS.
int make_redshifted_object | ( | const char * | name, |
double | ra, | ||
double | dec, | ||
double | z, | ||
object * | source | ||
) |
Populates a celestial object data structure with the parameters for a redhifted catalog source, such as a distant quasar or galaxy. It is similar to make_cat_object()
except that it takes a Doppler-shift (z) instead of radial velocity and it assumes no parallax and no proper motion (appropriately for a distant redshifted source). The catalog name is set to EXT
to indicate an extragalactic source, and the catalog number defaults to 0. The user may change these default field values as appropriate afterwards, if necessary.
name | Object name (less than SIZE_OF_OBJ_NAME in length). It may be NULL. | |
ra | [h] Right ascension of the object (hours). | |
dec | [deg] Declination of the object (degrees). | |
z | Redhift value (λobs / λrest - 1 = frest / fobs - 1). | |
[out] | source | Pointer to structure to populate. |
References make_cat_entry(), make_cat_object(), and novas_z2v().
int make_solar_system_observer | ( | const double * | sc_pos, |
const double * | sc_vel, | ||
observer * | obs | ||
) |
Populates an 'observer' data structure, for an observer situated on a near-Earth spacecraft, with the specified geocentric position and velocity vectors. Solar-system observers are similar to observers in Earth-orbit but their momentary position and velocity is defined relative to the Solar System Barycenter, instead of the geocenter.
sc_pos | [AU] Solar-system barycentric (x, y, z) position vector in ICRS. | |
sc_vel | [AU/day] Solar-system barycentric (x, y, z) velocity vector in ICRS. | |
[out] | obs | Pointer to the data structure to populate |
References make_in_space(), make_observer(), and NOVAS_SOLAR_SYSTEM_OBSERVER.
double mean_obliq | ( | double | jd_tdb | ) |
Computes the mean obliquity of the ecliptic.
REFERENCES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date |
short mean_star | ( | double | jd_tt, |
double | tra, | ||
double | tdec, | ||
enum novas_accuracy | accuracy, | ||
double * | ira, | ||
double * | idec | ||
) |
Computes the ICRS position of a star, given its True of Date (TOD) apparent place at date 'jd_tt'. Proper motion, parallax and radial velocity are assumed to be zero.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
tra | [h] Apparent (TOD) right ascension in hours, referred to true equator and equinox of date. | |
tdec | [deg] Apparent (TOD) declination in degrees, referred to true equator and equinox of date. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ira | [h] ICRS right ascension in hours, or NAN when returning with an error code. |
[out] | idec | [deg] ICRS declination in degrees, or NAN when returning with an error code. |
References app_star(), CAT_ENTRY_INIT, cat_entry::dec, novas_inv_max_iter, precession(), cat_entry::ra, starvectors(), and vector2radec().
double norm_ang | ( | double | angle | ) |
Returns the normalized angle in the [0:2π) range.
angle | [rad] an angle in radians. |
References TWOPI.
int novas_app_to_geom | ( | const novas_frame * | frame, |
enum novas_reference_system | sys, | ||
double | ra, | ||
double | dec, | ||
double | dist, | ||
double * | geom_icrs | ||
) |
Converts an observed apparent sky position of a source to an ICRS geometric position, by undoing the gravitational deflection and aberration corrections.
frame | The observer frame, defining the location and time of observation | |
sys | The reference system in which the observed position is specified. | |
ra | [h] Observed ICRS right-ascension of the source | |
dec | [deg] Observed ICRS declination of the source | |
dist | [AU] Observed distance from observer. A value of <=0 will translate to 1015 AU (around 5 Gpc). | |
[out] | geom_icrs | [AU] The corresponding geometric position for the source, in ICRS. |
References novas_frame::gcrs_to_cirs, grav_undo_planets(), novas_frame::icrs_to_j2000, NOVAS_CIRS, NOVAS_J2000, NOVAS_MOD, NOVAS_REFERENCE_SYSTEMS, NOVAS_TOD, novas_frame::nutation, novas_frame::obs_pos, novas_frame::planets, novas_frame::precession, and radec2vector().
int novas_app_to_hor | ( | const novas_frame * | frame, |
enum novas_reference_system | sys, | ||
double | ra, | ||
double | dec, | ||
RefractionModel | ref_model, | ||
double * | az, | ||
double * | el | ||
) |
Converts an observed apparent position vector in the specified coordinate system to local horizontal coordinates in the specified observer frame. The observer must be located on the surface of Earth, or else the call will return with an error. The caller may optionally supply a refraction model of choice to calculate an appropriate elevation angle that includes a refraction correction for Earth's atmosphere. If no such model is provided the calculated elevation will be the astrometric elevation without a refraction correction.
frame | Observer frame, defining the time and place of observation (on Earth). | |
sys | Astronomical coordinate system in which the observed position is given. | |
ra | [h] Observed apparent right ascension (R.A.) coordinate | |
dec | [deg] Observed apparent declination coordinate | |
ref_model | An appropriate refraction model, or NULL to calculate unrefracted elevation. Depending on the refraction model, you might want to make sure that the weather parameters were set when the observing frame was defined. | |
[out] | az | [deg] Calculated azimuth angle. It may be NULL if not required. |
[out] | el | [deg] Calculated elevation angle. It may be NULL if not required. |
References novas_frame::era, novas_timespec::fjd_tt, novas_frame::gcrs_to_cirs, novas_frame::gst, novas_timespec::ijd_tt, itrs_to_hor(), NOVAS_AIRBORNE_OBSERVER, NOVAS_CIRS, NOVAS_GCRS, NOVAS_ICRS, NOVAS_J2000, NOVAS_MOD, NOVAS_OBSERVER_ON_EARTH, NOVAS_REFRACT_ASTROMETRIC, NOVAS_TOD, novas_frame::nutation, novas_frame::observer, observer::on_surf, novas_frame::precession, radec2vector(), spin(), novas_frame::time, and observer::where.
void novas_case_sensitive | ( | int | value | ) |
Enables or disables case-sensitive processing of the object name. The effect is not retroactive. The setting will only affect the celestial objects that are defined after the call. Note, that catalog names, set via make_cat_entry() are always case sensitive regardless of this setting.
value | (boolean) TRUE (non-zero) to enable case-sensitive object names, or else FALSE (0) to convert names to upper case only (NOVAS C compatible behavior). |
int novas_change_observer | ( | const novas_frame * | orig, |
const observer * | obs, | ||
novas_frame * | out | ||
) |
Change the observer location for an observing frame.
orig | Pointer to original observing frame | |
obs | New observer location | |
[out] | out | Observing frame to populate with a original frame data and new observer location. It can be the same as the input. |
References novas_frame::accuracy, grav_bodies_full_accuracy, grav_bodies_reduced_accuracy, NOVAS_FULL_ACCURACY, novas_get_time(), NOVAS_TDB, obs_planets(), novas_frame::obs_pos, novas_frame::observer, novas_frame::planets, novas_frame::state, and novas_frame::time.
void novas_debug | ( | enum novas_debug_mode | mode | ) |
Enables or disables reporting errors and traces to the standard error stream.
mode | NOVAS_DEBUG_OFF (0; or <0), NOVAS_DEBUG_ON (1), or NOVAS_DEBUG_EXTRA (2; or >2). |
References NOVAS_DEBUG_EXTRA.
double novas_diff_tcb | ( | const novas_timespec * | t1, |
const novas_timespec * | t2 | ||
) |
Returns the Barycentric Coordinate Time (TCB) based time difference (t1 - t2) in days between two astronomical time specifications. TCB progresses slightly faster than time on Earth, at a rate about 1.6×10-8 higher, due to the lack of gravitational time dilation by the Earth or Sun.
t1 | First time |
t2 | Second time |
References novas_diff_time().
double novas_diff_tcg | ( | const novas_timespec * | t1, |
const novas_timespec * | t2 | ||
) |
Returns the Geocentric Coordinate Time (TCG) based time difference (t1 - t2) in days between two astronomical time specifications. TCG progresses slightly faster than time on Earth, at a rate about 7×10-10 higher, due to the lack of gravitational time dilation by Earth. TCG is an appropriate time measure for a spacecraft that is in the proximity of the orbit of Earth, but far enough from Earth such that the relativistic effects of Earth's gravity can be ignored.
t1 | First time |
t2 | Second time |
References novas_diff_time().
double novas_diff_time | ( | const novas_timespec * | t1, |
const novas_timespec * | t2 | ||
) |
Returns the Terrestrial Time (TT) based time difference (t1 - t2) in days between two astronomical time specifications.
t1 | First time |
t2 | Second time |
References novas_timespec::fjd_tt, and novas_timespec::ijd_tt.
int novas_geom_posvel | ( | const object * | source, |
const novas_frame * | frame, | ||
enum novas_reference_system | sys, | ||
double * | pos, | ||
double * | vel | ||
) |
Calculates the geometric position and velocity vectors, relative to the observer, for a source in the given observing frame, in the specified coordinate system of choice. The geometric position includes proper motion, and for solar-system bodies it is antedated for light travel time, so it effectively represents the geometric position as seen by the observer. However, the geometric does not include aberration correction, nor gravitational deflection.
If you want apparent positions, which account for aberration and gravitational deflection, use novas_skypos() instead.
You can also use novas_transform_vector() to convert the output position and velocity vectors to a dfferent coordinate system of choice afterwards if you want the results expressed in more than one coordinate system.
It implements the same geometric transformations as place()
but at a reduced computational cost. See place()
for references.
source | Pointer to a celestial source data structure that is observed | |
frame | Observer frame, defining the location and time of observation | |
sys | The coordinate system in which to return positions and velocities. | |
[out] | pos | [AU] Calculated geometric position vector of the source relative to the observer location, in the designated coordinate system. It may be NULL if not required. |
[out] | vel | [AU/day] The calculated velocity vector of the source relative to the observer in the designated coordinate system. It must be distinct from the pos output vector, and may be NULL if not required. |
References novas_frame::accuracy, bary2obs(), d_light(), light_time2(), novas_planet_bundle::mask, NOVAS_CATALOG_OBJECT, NOVAS_FULL_ACCURACY, novas_get_time(), NOVAS_JD_J2000, NOVAS_PLANET, NOVAS_REDUCED_ACCURACY, NOVAS_TDB, object::number, novas_frame::obs_pos, novas_frame::planets, novas_planet_bundle::pos, proper_motion(), object::star, starvectors(), novas_frame::time, object::type, and novas_planet_bundle::vel.
int novas_geom_to_app | ( | const novas_frame * | frame, |
const double * | pos, | ||
enum novas_reference_system | sys, | ||
sky_pos * | out | ||
) |
Converts an geometric position in ICRS to an apparent position on sky, by applying appropriate corrections for aberration and gravitational deflection for the observer's frame. Unlike place()
the output reports the distance calculated from the parallax for sidereal sources. The radial velocity of the output is set to NAN (if needed use novas_sky_pos() instead).
frame | The observer frame, defining the location and time of observation | |
pos | [AU] Geometric position of source in ICRS coordinates | |
sys | The coordinate system in which to return the apparent sky location | |
[out] | out | Pointer to the data structure which is populated with the calculated apparent location in the designated coordinate system. It may be the same pounter as the input position. |
References novas_frame::accuracy, sky_pos::dec, sky_pos::dis, grav_planets(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, novas_frame::obs_pos, novas_frame::planets, sky_pos::r_hat, sky_pos::ra, sky_pos::rv, and vector2radec().
enum novas_debug_mode novas_get_debug_mode | ( | ) |
Returns the current, thread-local, mode for reporting errors encountered (and traces).
double novas_get_split_time | ( | const novas_timespec * | time, |
enum novas_timescale | timescale, | ||
long * | ijd | ||
) |
Returns the fractional Julian date of an astronomical time in the specified timescale, as an integer and fractional part. The two-component split of the time allows for absolute precisions at the picosecond level, as opposed to novas_set_time()
, whose precision is limited to a few microseconds typically.
The accuracy of Barycentric Time measures (TDB and TCB) relative to other time measures is limited by the precision of the tbd2tt()
implemenation, to around 10 μs.
REFERENCES:
time | Pointer to the astronomical time specification data structure. | |
timescale | The astronomical time scale in which the returned Julian Date is to be provided | |
[out] | ijd | [day] The integer part of the Julian date in the requested timescale. It may be NULL if not required. |
References novas_timespec::dut1, novas_timespec::fjd_tt, novas_timespec::ijd_tt, NOVAS_GPS, NOVAS_TAI, NOVAS_TCB, NOVAS_TCG, NOVAS_TDB, NOVAS_TT, NOVAS_UT1, NOVAS_UTC, novas_timespec::tt2tdb, and novas_timespec::ut1_to_tt.
double novas_get_time | ( | const novas_timespec * | time, |
enum novas_timescale | timescale | ||
) |
Returns the fractional Julian date of an astronomical time in the specified timescale. The returned time is accurate to a few μs (microsecond) due to the inherent precision of the double-precision result. For higher precision applications you may use novas_get_split_time()
instead, which has an inherent accuracy at the picosecond level.
time | Pointer to the astronomical time specification data structure. |
timescale | The astronomical time scale in which the returned Julian Date is to be provided |
References novas_get_split_time().
time_t novas_get_unix_time | ( | const novas_timespec * | time, |
long * | nanos | ||
) |
Returns the UNIX time for an astronomical time instant.
time | Pointer to the astronomical time specification data structure. | |
[out] | nanos | [ns] UTC sub-second component. It may be NULL if not required. |
References novas_get_split_time(), and NOVAS_UTC.
int novas_hor_to_app | ( | const novas_frame * | frame, |
double | az, | ||
double | el, | ||
RefractionModel | ref_model, | ||
enum novas_reference_system | sys, | ||
double * | ra, | ||
double * | dec | ||
) |
Converts an observed azimuth and elevation coordinate to right ascension (R.A.) and declination coordinates expressed in the coordinate system of choice. The observer must be located on the surface of Earth, or else the call will return with an error. The caller may optionally supply a refraction model of choice to calculate an appropriate elevation angle that includes a refraction correction for Earth's atmosphere. If no such model is provided, the provided elevation value will be assumed to be an astrometric elevation without a refraction correction.
frame | Observer frame, defining the time and place of observation (on Earth). | |
az | [deg] Observed azimuth angle. It may be NULL if not required. | |
el | [deg] Observed elevation angle. It may be NULL if not required. | |
ref_model | An appropriate refraction model, or NULL to assume unrefracted elevation. Depending on the refraction model, you might want to make sure that the weather parameters were set when the observing frame was defined. | |
sys | Astronomical coordinate system in which the output is R.A. and declination values are to be calculated. | |
[out] | ra | [h] Calculated apparent right ascension (R.A.) coordinate |
[out] | dec | [deg] Calculated apparent declination coordinate |
References novas_frame::era, novas_timespec::fjd_tt, novas_frame::gcrs_to_cirs, novas_frame::gst, hor_to_itrs(), novas_timespec::ijd_tt, NOVAS_AIRBORNE_OBSERVER, NOVAS_CIRS, NOVAS_GCRS, NOVAS_ICRS, NOVAS_J2000, NOVAS_MOD, NOVAS_OBSERVER_ON_EARTH, NOVAS_REFRACT_OBSERVED, NOVAS_TOD, novas_frame::nutation, novas_frame::observer, observer::on_surf, novas_frame::precession, spin(), novas_frame::time, vector2radec(), and observer::where.
double novas_inv_refract | ( | RefractionModel | model, |
double | jd_tt, | ||
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el0 | ||
) |
Computes the reverse atmospheric refraction for a given refraction model. Thus if a refraction model takes observed elevation as an input, the reverse refraction takes astrometric elevation as its input, and vice versa.
model | The original refraction model |
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Refraction type to use for the original model: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0). |
el0 | [deg] input elevation for the inverse refraction model. |
References novas_inv_max_iter, and NOVAS_REFRACT_OBSERVED.
int novas_invert_transform | ( | const novas_transform * | transform, |
novas_transform * | inverse | ||
) |
Inverts a novas coordinate transformation matrix.
transform | Pointer to a coordinate transformation matrix. | |
[out] | inverse | Pointer to a coordinate transformation matrix to populate with the inverse transform. It may be the same as the input. |
References novas_transform::matrix.
int novas_make_frame | ( | enum novas_accuracy | accuracy, |
const observer * | obs, | ||
const novas_timespec * | time, | ||
double | dx, | ||
double | dy, | ||
novas_frame * | frame | ||
) |
Sets up a observing frame for a specific observer location, time of observation, and accuracy requirement. The frame is initialized using the currently configured planet ephemeris provider function (see set_planet_provider() and set_planet_provider_hp()), and in case of reduced accuracy mode, the currently configured IAU nutation model provider (see set_nutation_lp_provider()).
Note, that to construct full accuracy frames, you will need a high-precision ephemeris provider for the major planets (not just the default Earth/Sun), as without it, gravitational bending around massive plannets cannot be accounted for, and therefore μas accuracy cannot be ensured, in general. Attempting to construct a high-accuracy frame without a high-precision ephemeris provider for the major planets will result in an error in the 10–40 range from the required ephemeris() call.
accuracy | Accuracy requirement, NOVAS_FULL_ACCURACY (0) for the utmost precision or NOVAS_REDUCED_ACCURACY (1) if ~1 mas accuracy is sufficient. | |
obs | Observer location | |
time | Time of observation | |
dx | [mas] Earth orientation parameter, polar offset in x. | |
dy | [mas] Earth orientation parameter, polar offset in y. | |
[out] | frame | Pointer to the observing frame to configure. |
References novas_frame::accuracy, CAT_ENTRY_INIT, novas_frame::deps0, novas_frame::dpsi0, novas_frame::dx, novas_frame::dy, e_tilt(), novas_frame::earth_pos, novas_frame::earth_vel, novas_frame::ee, ephemeris(), novas_frame::era, era(), EROT_GST, novas_timespec::fjd_tt, novas_frame::gst, novas_timespec::ijd_tt, novas_frame::mobl, NOVAS_BARYCENTER, novas_change_observer(), NOVAS_EARTH, novas_get_split_time(), NOVAS_JD_J2000, NOVAS_OBSERVER_PLACES, NOVAS_PLANET, NOVAS_REDUCED_ACCURACY, NOVAS_SUN, NOVAS_TRUE_EQUINOX, NOVAS_UT1, nutation_angles(), sidereal_time(), novas_frame::state, novas_frame::sun_pos, novas_frame::sun_vel, novas_frame::time, novas_frame::tobl, tt2tdb(), novas_timespec::ut1_to_tt, and observer::where.
int novas_make_transform | ( | const novas_frame * | frame, |
enum novas_reference_system | from_system, | ||
enum novas_reference_system | to_system, | ||
novas_transform * | transform | ||
) |
Calculates a transformation matrix that can be used to convert positions and velocities from one coordinate reference system to another.
frame | Observer frame, defining the location and time of observation | |
from_system | Original coordinate reference system | |
to_system | New coordinate reference system | |
[out] | transform | Pointer to the transform data structure to populate. |
References novas_transform::frame, novas_transform::from_system, novas_frame::gcrs_to_cirs, novas_frame::icrs_to_j2000, novas_matrix::M, novas_transform::matrix, NOVAS_CIRS, NOVAS_GCRS, NOVAS_ICRS, NOVAS_J2000, NOVAS_MOD, NOVAS_REFERENCE_SYSTEMS, NOVAS_TOD, novas_frame::nutation, novas_frame::precession, and novas_transform::to_system.
int novas_offset_time | ( | const novas_timespec * | time, |
double | seconds, | ||
novas_timespec * | out | ||
) |
Increments the astrometric time by a given amount.
time | Original time specification | |
seconds | [s] Seconds to add to the original | |
[out] | out | New incremented time specification. It may be the same as the input. |
References novas_timespec::fjd_tt, and novas_timespec::ijd_tt.
double novas_optical_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
Returns an optical refraction correction using the weather parameters defined for the observer location.
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Whether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0). |
el | [deg] Astrometric (unrefracted) source elevation |
References NOVAS_WEATHER_AT_LOCATION.
enum novas_planet novas_planet_for_name | ( | const char * | name | ) |
Returns the NOVAS planet ID for a given name (case insensitive), or -1 if no match is found.
name | The planet name, or that for the "Sun", "Moon" or "SSB" (case insensitive). The spelled out "Solar System Barycenter" is also recognized with either spaces, hyphens ('-') or underscores ('_') separating the case insensitive words. |
References NOVAS_PLANET_NAMES_INIT, NOVAS_PLANETS, and NOVAS_SSB.
double novas_radio_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
Atmospheric refraction model for radio wavelengths (Berman & Rockwell 1976). It uses the weather parameters defined for the location, including humidity. As such make sure the weather data is fully defined, and that the humidity was explicitly set after calling make_on_surface()
.
Adapted from FORTAN code provided by Berman & Rockwell 1976.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather. Make sure all weather values, including humidity (added in v1.1), are fully populated. |
type | Whether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0). |
el | [deg] source elevation of the specified type. |
References on_surface::humidity, novas_inv_refract(), novas_radio_refraction(), NOVAS_REFRACT_ASTROMETRIC, NOVAS_REFRACT_OBSERVED, on_surface::pressure, and on_surface::temperature.
int novas_set_split_time | ( | enum novas_timescale | timescale, |
long | ijd, | ||
double | fjd, | ||
int | leap, | ||
double | dut1, | ||
novas_timespec * | time | ||
) |
Sets an astronomical time to the split Julian Date value, defined in the specified timescale. The split into the integer and fractional parts can be done in any convenient way. The highest precision is reached if the fractional part is ≤ 1 day. In that case, the time may be specified to picosecond accuracy, if needed.
The accuracy of Barycentric Time measures (TDB and TCB) relative to other time measures is limited by the precision of tbd2tt()
implementation, to around 10 μs.
REFERENCES:
timescale | The astronomical time scale in which the Julian Date is given | |
ijd | [day] integer part of the Julian day in the specified timescale | |
fjd | [day] fractional part Julian day value in the specified timescale | |
leap | [s] Leap seconds, e.g. as published by IERS Bulletin C. | |
dut1 | [s] UT1-UTC time difference, e.g. as published in IERS Bulletin A. | |
[out] | time | Pointer to the data structure that uniquely defines the astronomical time for all applications. |
References novas_timespec::dut1, novas_timespec::fjd_tt, novas_timespec::ijd_tt, NOVAS_GPS, NOVAS_TAI, NOVAS_TCB, NOVAS_TCG, NOVAS_TDB, NOVAS_TT, NOVAS_UT1, NOVAS_UTC, novas_timespec::tt2tdb, tt2tdb(), and novas_timespec::ut1_to_tt.
int novas_set_time | ( | enum novas_timescale | timescale, |
double | jd, | ||
int | leap, | ||
double | dut1, | ||
novas_timespec * | time | ||
) |
Sets an astronomical time to the fractional Julian Date value, defined in the specified timescale. The time set this way is accurate to a few μs (microseconds) due to the inherent precision of the double-precision argument. For higher precision applications you may use novas_set_split_time()
instead, which has an inherent accuracy at the picosecond level.
timescale | The astronomical time scale in which the Julian Date is given | |
jd | [day] Julian day value in the specified timescale | |
leap | [s] Leap seconds, e.g. as published by IERS Bulletin C. | |
dut1 | [s] UT1-UTC time difference, e.g. as published in IERS Bulletin A. | |
[out] | time | Pointer to the data structure that uniquely defines the astronomical time for all applications. |
References novas_set_split_time().
int novas_set_unix_time | ( | time_t | unix_time, |
long | nanos, | ||
int | leap, | ||
double | dut1, | ||
novas_timespec * | time | ||
) |
Sets an astronomical time to a UNIX time value. UNIX time is defined as UTC seconds measured since 0 UTC, 1 Jan 1970 (the start of the UNIX era). Specifying time this way supports precisions to the nanoseconds level by construct. Specifying UNIX time in split seconds and nanoseconds is a common way CLIB handles precision time, e.g. with struct timespec
and functions like clock_gettime()
(see time.h
).
unix_time | [s] UNIX time (UTC) seconds | |
nanos | [ns] UTC sub-second component | |
leap | [s] Leap seconds, e.g. as published by IERS Bulletin C. | |
dut1 | [s] UT1-UTC time difference, e.g. as published in IERS Bulletin A. | |
[out] | time | Pointer to the data structure that uniquely defines the astronomical time for all applications. |
References novas_set_split_time(), and NOVAS_UTC.
int novas_sky_pos | ( | const object * | object, |
const novas_frame * | frame, | ||
enum novas_reference_system | sys, | ||
sky_pos * | out | ||
) |
Calculates an apparent location on sky for the source. The position takes into account the proper motion (for sidereal soure), or is antedated for light-travel time (for Solar-System bodies). It also applies an appropriate aberration correction and gravitational deflection of the light.
To calculate corresponding local horizontal coordinates, you can pass the output RA/Dec coordinates to novas_app_to_hor(). Or to calculate apparent coordinates in other systems, you may pass the result to novas_transform_sy_pos() after.
And if you want geometric positions instead (not corrected for aberration or gravitational deflection), you may want to use novas_geom_posvel() instead.
The approximate 'inverse' of this function is novas_app_to_geom().
This function implements the same aberration and gravitational deflection corrections as place()
, but at reduced computational cost. See place()
for references. Unlike place()
, however, the output always reports the distance calculated from the parallax for sidereal sources. Note also, that while place()
does not apply aberration and gravitational deflection corrections when sys
is NOVAS_ICRS (3), this routine will apply those corrections consistently for all coordinate systems (and you can use novas_geom_posvel() instead to get positions without aberration or deflection in any system).
object | Pointer to a celestial object data structure that is observed | |
frame | The observer frame, defining the location and time of observation | |
sys | The coordinate system in which to return the apparent sky location | |
[out] | out | Pointer to the data structure which is populated with the calculated apparent location in the designated coordinate system. |
References novas_frame::accuracy, sky_pos::dis, novas_frame::earth_pos, grav_planets(), NOVAS_CATALOG_OBJECT, NOVAS_FULL_ACCURACY, novas_geom_posvel(), novas_geom_to_app(), NOVAS_ICRS, NOVAS_REDUCED_ACCURACY, novas_frame::obs_pos, novas_frame::obs_vel, novas_frame::planets, rad_vel2(), sky_pos::rv, novas_frame::sun_pos, and object::type.
double novas_standard_refraction | ( | double | jd_tt, |
const on_surface * | loc, | ||
enum novas_refraction_type | type, | ||
double | el | ||
) |
Returns an optical refraction correction for a standard atmosphere.
jd_tt | [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) |
loc | Pointer to structure defining the observer's location on earth, and local weather |
type | Whether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or REFRACT_ASTROMETRIC (0). |
el | [deg] Astrometric (unrefracted) source elevation |
References NOVAS_STANDARD_ATMOSPHERE.
int novas_transform_sky_pos | ( | const sky_pos * | in, |
const novas_transform * | transform, | ||
sky_pos * | out | ||
) |
Transforms a position or velocity 3-vector from one coordinate reference system to another.
in | Input apparent position on sky in the original coordinate reference system | |
transform | Pointer to a coordinate transformation matrix | |
[out] | out | Output apparent position on sky in the new coordinate reference system. It may be the same as the input. |
References sky_pos::dec, novas_transform::matrix, sky_pos::r_hat, sky_pos::ra, and vector2radec().
int novas_transform_vector | ( | const double * | in, |
const novas_transform * | transform, | ||
double * | out | ||
) |
Transforms a position or velocity 3-vector from one coordinate reference system to another.
in | Input 3-vector in the original coordinate reference system | |
transform | Pointer to a coordinate transformation matrix | |
[out] | out | Output 3-vector in the new coordinate reference system. It may be the same as the input. |
References novas_transform::matrix.
double novas_v2z | ( | double | vel | ) |
Converts a radial recession velocity to a redshift value (z = δf / frest). It is based on the relativistic formula:
1 + z = sqrt((1 + β) / (1 - β))
where β = v / c.
vel | [km/s] velocity (i.e. rate) of recession. |
References C.
double novas_z2v | ( | double | z | ) |
Converts a redshift value (z = δf / frest) to a radial velocity (i.e. rate) of recession. It is based on the relativistic formula:
1 + z = sqrt((1 + β) / (1 - β))
where β = v / c.
z | the redshift value (δλ / λrest). |
References C.
double novas_z_add | ( | double | z1, |
double | z2 | ||
) |
Compounds two redshift corrections, e.g. to apply (or undo) a series gravitational redshift corrections and/or corrections for a moving observer. It's effectively using (1 + z) = (1 + z1) * (1 + z2).
z1 | One of the redshift values |
z2 | The other redshift value |
double novas_z_inv | ( | double | z | ) |
Returns the inverse of a redshift value, that is the redshift for a body moving with the same velocity as the original but in the opposite direction.
z | A redhift value |
int nutation | ( | double | jd_tdb, |
enum novas_nutation_direction | direction, | ||
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Nutates equatorial rectangular coordinates from mean equator and equinox of epoch to true equator and equinox of epoch. Inverse transformation may be applied by setting flag 'direction'.
This is the old (pre IAU 2006) method of nutation calculation. If you follow the now standard IAU 2000/2006 methodology you will want to use nutation_angles() instead.
REFERENCES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date | |
direction | NUTATE_MEAN_TO_TRUE (0) or NUTATE_TRUE_TO_MEAN (-1; or non-zero) | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | Position 3-vector, geocentric equatorial rectangular coordinates, referred to mean equator and equinox of epoch. | |
[out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to true equator and equinox of epoch. It can be the same as the input position. |
References e_tilt(), and NUTATE_MEAN_TO_TRUE.
int nutation_angles | ( | double | t, |
enum novas_accuracy | accuracy, | ||
double * | dpsi, | ||
double * | deps | ||
) |
Returns the values for nutation in longitude and nutation in obliquity for a given TDB Julian date. The nutation model selected depends upon the input value of 'accuracy'. See notes below for important details.
This function selects the nutation model depending first upon the input value of 'accuracy'. If 'accuracy' is NOVAS_FULL_ACCURACY (0), the IAU 2000A nutation model is used. Otherwise the model set by set_nutation_lp_provider() is used, or else the default nu2000k().
See the prologs of the nutation functions in file 'nutation.c' for details concerning the models.
REFERENCES:
t | [cy] TDB time in Julian centuries since J2000.0 | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | dpsi | [arcsec] Nutation in longitude in arcseconds. |
[out] | deps | [arcsec] Nutation in obliquity in arcseconds. |
References iau2000a(), and NOVAS_FULL_ACCURACY.
int obs_planets | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
const double * | pos_obs, | ||
int | pl_mask, | ||
novas_planet_bundle * | planets | ||
) |
Calculates the positions and velocities for the Solar-system bodies, e.g. for use for graviational deflection calculations. The planet positions are calculated relative to the observer location, while velocities are w.r.t. the SSB. Both positions and velocities are antedated for light travel time, so they accurately reflect the apparent position (and barycentric motion) of the bodies from the observer's perspective.
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
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_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. | |
pl_mask | Bitwise (1 << planet-number) mask indicating which planets to request data for. See enum novas_planet for the enumeration of planet numbers. | |
[out] | planets | Pointer to apparent planet data to populate. have positions and velocities calculated successfully. See enum novas_planet for the enumeration of planet numbers. |
References light_time2(), make_planet(), novas_planet_bundle::mask, novas_debug(), NOVAS_DEBUG_EXTRA, NOVAS_DEBUG_OFF, novas_get_debug_mode(), NOVAS_PLANETS, NOVAS_SUN, novas_planet_bundle::pos, and novas_planet_bundle::vel.
int obs_posvel | ( | double | jd_tdb, |
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
const observer * | obs, | ||
const double * | geo_pos, | ||
const double * | geo_vel, | ||
double * | pos, | ||
double * | vel | ||
) |
Calculates the ICRS position and velocity of the observer relative to the Solar System Barycenter (SSB).
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date. | |
ut1_to_tt | [s] TT - UT1 time difference. Used only when 'location->where' is NOVAS_OBSERVER_ON_EARTH (1) or NOVAS_OBSERVER_IN_EARTH_ORBIT (2). | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
obs | The observer location, relative to which the output positions and velocities are to be calculated | |
geo_pos | [AU] ICRS position vector of the geocenter w.r.t. the Solar System Barycenter (SSB). If either geo_pos or geo_vel is NULL, it will be calculated when needed. | |
geo_vel | [AU/day] ICRS velocity vector of the geocenter w.r.t. the Solar System Barycenter (SSB). If either geo_pos or geo_vel is NULL, it will be calculated when needed. | |
[out] | pos | [AU] Position 3-vector of the observer w.r.t. the Solar System Barycenter (SSB). It may be NULL if not required. |
[out] | vel | [AU/day] Velocity 3-vector of the observer w.r.t. the Solar System Barycenter (SSB). It must be distinct from the pos output vector, and may be NULL if not required. |
References CAT_ENTRY_INIT, ephemeris(), geo_posvel(), observer::near_earth, NOVAS_AIRBORNE_OBSERVER, NOVAS_BARYCENTER, NOVAS_EARTH, NOVAS_OBSERVER_IN_EARTH_ORBIT, NOVAS_OBSERVER_ON_EARTH, NOVAS_OBSERVER_PLACES, NOVAS_PLANET, NOVAS_SOLAR_SYSTEM_OBSERVER, in_space::sc_pos, in_space::sc_vel, and observer::where.
short place | ( | double | jd_tt, |
const object * | source, | ||
const observer * | location, | ||
double | ut1_to_tt, | ||
enum novas_reference_system | coord_sys, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | output | ||
) |
Computes the apparent direction of a celestial object at a specified time and in a specified coordinate system and a specific near-Earth origin.
While coord_sys
defines the celestial pole (i.e. equator) orientation of the coordinate system, location->where
sets the origin of the reference place relative to which positions and velocities are reported.
For all but ICRS coordinate outputs, the calculated positions and velocities include aberration corrections for the moving frame of the observer as well as gravitational deflection due to the Sun and Earth and other major gravitating bodies in the Solar system, provided planet positions are available via a novas_planet_provider function.
In case of a dynamical equatorial system (such as CIRS or TOD) and an Earth-based observer, the polar wobble parameters set via a prior call to cel_pole() together with he ut1_to_tt argument decide whether the resulting 'topocentric' output frame is Pseudo Earth Fixed (PEF; if cel_pole() was not set and DUT1 is 0) or ITRS (actual rotating Earth; if cel_pole() was set and ut1_to_tt includes the DUT1 component).
NOTES:
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
source | Pointer to a celestrial object data structure | |
location | The observer location, relative to which the output positions and velocities are to be calculated | |
ut1_to_tt | [s] TT - UT1 time difference. Used only when 'location->where' is NOVAS_OBSERVER_ON_EARTH (1) or NOVAS_OBSERVER_IN_EARTH_ORBIT (2). | |
coord_sys | The coordinate system that defines the orientation of the celestial pole. If it is NOVAS_ICRS (3), a geometric position and radial velocity is returned. For all other systems, the returned position is the apparent position including aberration and gravitational deflection corrections, and the radial velocity is in the direction the eflected light was emitted from the source. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | output | Data structure to populate with the result. |
References aberration(), bary2obs(), C_AUDAY, d_light(), sky_pos::dec, sky_pos::dis, ephemeris(), gcrs_to_cirs(), gcrs_to_j2000(), grav_bodies_full_accuracy, grav_bodies_reduced_accuracy, grav_planets(), light_time2(), make_observer_at_geocenter(), make_planet(), NOVAS_BARYCENTER, NOVAS_CATALOG_OBJECT, NOVAS_CIRS, NOVAS_EARTH, NOVAS_FULL_ACCURACY, NOVAS_ICRS, NOVAS_J2000, NOVAS_JD_J2000, NOVAS_MOD, NOVAS_REDUCED_ACCURACY, NOVAS_REFERENCE_SYSTEMS, NOVAS_SUN, NOVAS_TOD, obs_planets(), obs_posvel(), precession(), proper_motion(), sky_pos::r_hat, sky_pos::ra, rad_vel2(), sky_pos::rv, object::star, starvectors(), tt2tdb(), object::type, and vector2radec().
int place_cirs | ( | double | jd_tt, |
const object * | source, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the Celestial Intermediate Reference System (CIRS) dynamical position position of a source as 'seen' from the geocenter at the given time of observation. See place()
for more information.
jd_tt | [day] Terrestrial Time (TT) based Julian date of observation. | |
source | Catalog source or solar_system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | Structure to populate with the calculated CIRS position data |
References NOVAS_CIRS, and place().
int place_gcrs | ( | double | jd_tt, |
const object * | source, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the Geocentric Celestial Reference System (GCRS) position of a source (as 'seen' from the geocenter) at the given time of observation. Unlike place_icrs()
, this includes aberration for the moving frame of the geocenter as well as gravitational deflections calculated for a virtual observer located at the geocenter. See place()
for more information.
jd_tt | [day] Terrestrial Time (TT) based Julian date of observation. | |
source | Catalog source or solar_system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | Structure to populate with the calculated GCRS position data |
References NOVAS_GCRS, and place().
int place_icrs | ( | double | jd_tt, |
const object * | source, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the International Celestial Reference System (ICRS) position of a source. (from the geocenter). Unlike place_gcrs()
, this version does not include aberration or gravitational deflection corrections.
jd_tt | [day] Terrestrial Time (TT) based Julian date of observation. | |
source | Catalog source or solar_system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | Structure to populate with the calculated geocentric ICRS position data (Unlike place_gcrs(), the calculated coordinates do not account for aberration or gravitational deflection). |
References NOVAS_ICRS, and place().
int place_j2000 | ( | double | jd_tt, |
const object * | source, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the J2000 dynamical position position of a source as 'seen' from the geocenter at the given time of observation. See place()
for more information.
jd_tt | [day] Terrestrial Time (TT) based Julian date of observation. | |
source | Catalog source or solar_system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | Structure to populate with the calculated CIRS position data |
References NOVAS_J2000, and place().
int place_mod | ( | double | jd_tt, |
const object * | source, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the Mean of Date (MOD) dynamical position position of a source as 'seen' from the geocenter at the given time of observation. See place()
for more information.
jd_tt | [day] Terrestrial Time (TT) based Julian date of observation. | |
source | Catalog source or solar_system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | Structure to populate with the calculated CIRS position data |
int place_star | ( | double | jd_tt, |
const cat_entry * | star, | ||
const observer * | obs, | ||
double | ut1_to_tt, | ||
enum novas_reference_system | system, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the apparent place of a star, referenced to dynamical equator at date 'jd_tt', given its catalog mean place, proper motion, parallax, and radial velocity. See place()
for more information.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
obs | Observer location (can be NULL if not relevant) | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
system | The type of coordinate reference system in which coordinates are to be returned. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | The position and radial velocity of of the catalog source in the specified coordinate system and relative to the specified observer location (if applicable) |
References NOVAS_CATALOG_OBJECT, place(), object::star, and object::type.
int place_tod | ( | double | jd_tt, |
const object * | source, | ||
enum novas_accuracy | accuracy, | ||
sky_pos * | pos | ||
) |
Computes the True of Date (TOD) dynamical position position of a source as 'seen' from the geocenter at the given time of observation. See place()
for more information.
jd_tt | [day] Terrestrial Time (TT) based Julian date of observation. | |
source | Catalog source or solar_system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | pos | Structure to populate with the calculated CIRS position data |
double planet_lon | ( | double | t, |
enum novas_planet | planet | ||
) |
Returns the planetary longitude, for Mercury through Neptune, w.r.t. mean dynamical ecliptic and equinox of J2000, with high order terms omitted (Simon et al. 1994, 5.8.1-5.8.8).
t | [cy] Julian centuries since J2000 |
planet | Novas planet id, e.g. NOVAS_MARS. |
planet
id is out of range.References NOVAS_EARTH, NOVAS_JUPITER, NOVAS_MARS, NOVAS_MERCURY, NOVAS_NEPTUNE, NOVAS_SATURN, NOVAS_URANUS, NOVAS_VENUS, and TWOPI.
short precession | ( | double | jd_tdb_in, |
const double * | in, | ||
double | jd_tdb_out, | ||
double * | out | ||
) |
Precesses equatorial rectangular coordinates from one epoch to another. Unlike the original NOVAS routine, this routine works for any pairing of the time arguments.
This function calculates precession for the old (pre IAU 2000) methodology. Its main use for NOVAS users is to allow converting older catalog coordinates e.g. to J2000 coordinates, which then can be converted to the now standard ICRS system via frame_tie().
NOTE:
REFERENCES:
jd_tdb_in | [day] Barycentric Dynamic Time (TDB) based Julian date of the input epoch | |
in | Position 3-vector, geocentric equatorial rectangular coordinates, referred to mean dynamical equator and equinox of the initial epoch. | |
jd_tdb_out | [day] Barycentric Dynamic Time (TDB) based Julian date of the output epoch | |
[out] | out | Position 3-vector, geocentric equatorial rectangular coordinates, referred to mean dynamical equator and equinox of the final epoch. It can be the same vector as the input. |
References precession().
int proper_motion | ( | double | jd_tdb_in, |
const double * | pos, | ||
const double * | vel, | ||
double | jd_tdb_out, | ||
double * | out | ||
) |
Applies proper motion, including foreshortening effects, to a star's position.
REFERENCES:
jd_tdb_in | [day] Barycentric Dynamical Time (TDB) based Julian date of the first epoch. | |
pos | [AU] Position vector at first epoch. | |
vel | [AU/day] Velocity vector at first epoch. | |
jd_tdb_out | [day] Barycentric Dynamical Time (TDB) based Julian date of the second epoch. | |
[out] | out | Position vector at second epoch. It can be the same vector as the input. |
int rad_vel | ( | const object * | source, |
const double * | pos_src, | ||
const double * | vel_src, | ||
const double * | vel_obs, | ||
double | d_obs_geo, | ||
double | d_obs_sun, | ||
double | d_src_sun, | ||
double * | rv | ||
) |
Predicts the radial velocity of the observed object as it would be measured by spectroscopic means. Radial velocity is here defined as the radial velocity measure (z) times the speed of light. For major planets (and Sun and Moon), it includes gravitational corrections for light originating at the surface and observed from near Earth or else from a large distance away. For other solar system bodies, it applies to a fictitious emitter at the center of the observed object, assumed massless (no gravitational red shift). The corrections do not in general apply to reflected light. For stars, it includes all effects, such as gravitational redshift, contained in the catalog barycentric radial velocity measure, a scalar derived from spectroscopy. Nearby stars with a known kinematic velocity vector (obtained independently of spectroscopy) can be treated like solar system objects.
Gravitational blueshift corrections for the Solar and Earth potential for observers are included. However, the result does not include a blueshift correction for observers (e.g. spacecraft) orbiting other major Solar-system bodies. You may adjust the amount of gravitational redshift correction applied to the radial velocity via redshift_vrad()
, unredshift_vrad()
and grav_redshift()
if necessary.
All the input arguments are BCRS quantities, expressed with respect to the ICRS axes. 'vel_src' and 'vel_obs' are kinematic velocities - derived from geometry or dynamics, not spectroscopy.
If the object is outside the solar system, the algorithm used will be consistent with the IAU definition of stellar radial velocity, specifically, the barycentric radial velocity measure, which is derived from spectroscopy. In that case, the vector 'vel_src' can be very approximate – or, for distant stars or galaxies, zero – as it will be used only for a small geometric correction that is proportional to proper motion.
Any of the distances (last three input arguments) can be set to zero (0.0) or negative if the corresponding general relativistic gravitational potential term is not to be evaluated. These terms generally are important at the meter/second level only. If 'd_obs_geo' and 'd_obs_sun' are both zero, an average value will be used for the relativistic term for the observer, appropriate for an observer on the surface of the Earth. 'd_src_sun', if given, is used only for solar system objects.
NOTES:
d_obs_geo
and d_obs_sun
were zero. As of SuperNOVAS v1.1, the relatistic corrections for a moving observer will be included in the radial velocity measure always. REFERENCES:
source | Celestial object observed | |
pos_src | [AU|*] Geometric position vector of object with respect to observer. For solar system sources it should be corrected for light-time. For non-solar-system objects, the position vector defines a direction only, with arbitrary magnitude. | |
vel_src | [AU/day] Velocity vector of object with respect to solar system barycenter. | |
vel_obs | [AU/day] Velocity vector of observer with respect to solar system barycenter. | |
d_obs_geo | [AU] Distance from observer to geocenter, or <=0.0 if gravitational blueshifting due to Earth potential around observer can be ignored. | |
d_obs_sun | [AU] Distance from observer to Sun, or <=0.0 if gravitational bluehifting due to Solar potential around observer can be ignored. | |
d_src_sun | [AU] Distance from object to Sun, or <=0.0 if gravitational redshifting due to Solar potential around source can be ignored. | |
[out] | rv | [km/s] The observed radial velocity measure times the speed of light, or NAN if there was an error. |
References rad_vel2().
double rad_vel2 | ( | const object * | source, |
const double * | pos_emit, | ||
const double * | vel_src, | ||
const double * | pos_det, | ||
const double * | vel_obs, | ||
double | d_obs_geo, | ||
double | d_obs_sun, | ||
double | d_src_sun | ||
) |
Predicts the radial velocity of the observed object as it would be measured by spectroscopic means. This is a modified version of the original NOVAS C 3.1 rad_vel(), to account for the different directions in which light is emitted vs in which it detected, e.g. when it is gravitationally deflected.
Radial velocity is here defined as the radial velocity measure (z) times the speed of light. For major planets (and Sun and Moon), it includes gravitational corrections for light originating at the surface and observed from near Earth or else from a large distance away. For other solar system bodies, it applies to a fictitious emitter at the center of the observed object, assumed massless (no gravitational red shift). The corrections do not in general apply to reflected light. For stars, it includes all effects, such as gravitational redshift, contained in the catalog barycentric radial velocity measure, a scalar derived from spectroscopy. Nearby stars with a known kinematic velocity vector (obtained independently of spectroscopy) can be treated like solar system objects.
Gravitational blueshift corrections for the Solar and Earth potential for observers are included. However, the result does not include a blueshift correction for observers (e.g. spacecraft) orbiting other major Solar-system bodies. You may adjust the amount of gravitational redshift correction applied to the radial velocity via redshift_vrad()
, unredshift_vrad()
and grav_redshift()
if necessary.
All the input arguments are BCRS quantities, expressed with respect to the ICRS axes. 'vel_src' and 'vel_obs' are kinematic velocities - derived from geometry or dynamics, not spectroscopy.
If the object is outside the solar system, the algorithm used will be consistent with the IAU definition of stellar radial velocity, specifically, the barycentric radial velocity measure, which is derived from spectroscopy. In that case, the vector 'vel_src' can be very approximate – or, for distant stars or galaxies, zero – as it will be used only for a small geometric and relativistic (time dilation) correction, including the proper motion.
Any of the distances (last three input arguments) can be set to a negative value if the corresponding general relativistic gravitational potential term is not to be evaluated. These terms generally are important only at the meter/second level. If 'd_obs_geo' and 'd_obs_sun' are both zero, an average value will be used for the relativistic term for the observer, appropriate for an observer on the surface of the Earth. 'd_src_sun', if given, is used only for solar system objects.
NOTES:
REFERENCES:
source | Celestial object observed |
pos_emit | [AU|*] position vector of object with respect to observer in the direction that light was emitted from the source. For solar system sources it should be corrected for light-time. For non-solar-system objects, the position vector defines a direction only, with arbitrary magnitude. |
vel_src | [AU/day] Velocity vector of object with respect to solar system barycenter. |
pos_det | [AU|*] apparent position vector of source, as seen by the observer. It may be the same vector as pos_emit , in which case the routine behaves like the original NOVAS_C rad_vel(). |
vel_obs | [AU/day] Velocity vector of observer with respect to solar system barycenter. |
d_obs_geo | [AU] Distance from observer to geocenter, or <=0.0 if gravitational blueshifting due to Earth potential around observer can be ignored. |
d_obs_sun | [AU] Distance from observer to Sun, or <=0.0 if gravitational bluehifting due to Solar potential around observer can be ignored. |
d_src_sun | [AU] Distance from object to Sun, or <=0.0 if gravitational redshifting due to Solar potential around source can be ignored. Additionally, a value <0 will also skip corrections for light originating at the surface of the observed major solar-system body. |
References AU, C, C_AUDAY, cat_entry::dec, GE, GS, NOVAS_CATALOG_OBJECT, NOVAS_EARTH_RADIUS, NOVAS_EPHEM_OBJECT, NOVAS_PLANET, NOVAS_PLANET_GRAV_Z_INIT, NOVAS_PLANETS, NOVAS_SOLAR_RADIUS, novas_z2v(), object::number, cat_entry::parallax, cat_entry::ra, cat_entry::radialvelocity, object::star, and object::type.
int radec2vector | ( | double | ra, |
double | dec, | ||
double | dist, | ||
double * | pos | ||
) |
Converts equatorial spherical coordinates to a vector (equatorial rectangular coordinates).
ra | [h] Right ascension (hours). | |
dec | [deg] Declination (degrees). | |
dist | [AU] Distance (AU) | |
[out] | pos | [AU] Position 3-vector, equatorial rectangular coordinates (AU). |
int radec_planet | ( | double | jd_tt, |
const object * | ss_body, | ||
const observer * | obs, | ||
double | ut1_to_tt, | ||
enum novas_reference_system | sys, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | dis, | ||
double * | rv | ||
) |
Computes the place of a solar system body at the specified time for an observer in the specified coordinate system. This is the same as calling place() with the same arguments, except the different set of return values used.
REFERENCES:
jd_tt | [day] Terretrial Time (TT) based Julian date. | |
ss_body | Pointer to structure containing the body designation for the solar system body. | |
obs | Observer location. It may be NULL if not relevant. | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
sys | Coordinate reference system in which to produce output values | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Topocentric apparent right ascension in hours, referred to the true equator and equinox of date, or NAN when returning with an error code. (It may be NULL if not required) |
[out] | dec | [deg] Topocentric apparent declination in degrees referred to the true equator and equinox of date, or NAN when returning with an error code. (It may be NULL if not required) |
[out] | dis | [AU] True distance from Earth to the body at 'jd_tt' in AU, or NAN when returning with an error code. (It may be NULL if not needed). |
[out] | rv | [AU/day] radial velocity relative ot observer, or NAN when returning with an error code. (It may be NULL if not required) |
References sky_pos::dec, sky_pos::dis, NOVAS_EPHEM_OBJECT, NOVAS_PLANET, place(), sky_pos::ra, sky_pos::rv, SKY_POS_INIT, and object::type.
int radec_star | ( | double | jd_tt, |
const cat_entry * | star, | ||
const observer * | obs, | ||
double | ut1_to_tt, | ||
enum novas_reference_system | sys, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | rv | ||
) |
Computes the place of a star at date 'jd_tt', for an observer in the specified coordinate system, given the star's ICRS catalog place, proper motion, parallax, and radial velocity.
Notwithstanding the different set of return values, this is the same as calling place_star() with the same arguments.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
obs | Observer location. It may be NULL if not relevant. | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
sys | Coordinate reference system in which to produce output values | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Topocentric right ascension in hours, referred to true equator and equinox of date 'jd_tt' or NAN when returning with an error code. (It may be NULL if not required) |
[out] | dec | [deg] Topocentric declination in degrees, referred to true equator and equinox of date 'jd_tt' or NAN when returning with an error code. (It may be NULL if not required) |
[out] | rv | [AU/day] radial velocity relative ot observer, or NAN when returning with an error code. (It may be NULL if not required) |
References sky_pos::dec, place_star(), sky_pos::ra, sky_pos::rv, and SKY_POS_INIT.
double redshift_vrad | ( | double | vrad, |
double | z | ||
) |
Applies an incremental redshift correction to a radial velocity. For example, you may use this function to correct a radial velocity calculated by rad_vel()
or rad_vel2()
for a Solar-system body to account for the gravitational redshift for light originating at a specific distance away from the body. For the Sun, you may want to undo the redshift correction applied for the photosphere using unredshift_vrad()
first.
vrad | [km/s] Radial velocity |
z | Redshift correction to apply |
References novas_v2z(), and novas_z2v().
double refract | ( | const on_surface * | location, |
enum novas_refraction_model | option, | ||
double | zd_obs | ||
) |
Computes atmospheric optical refraction for an observed (already refracted!) zenith distance through the atmosphere. In other words this is suitable to convert refracted zenith angles to astrometric (unrefracted) zenith angles. For the reverse, see refract_astro().
The returned value is the approximate refraction for optical wavelengths. This function can be used for planning observations or telescope pointing, but should not be used for precise positioning.
NOTES:
REFERENCES:
location | Pointer to structure containing observer's location. It may also contains weather data (optional) for the observer's location. |
option | NOVAS_STANDARD_ATMOSPHERE (1), or NOVAS_WEATHER_AT_LOCATION (2) if to use the weather values contained in the 'location' data structure. |
zd_obs | [deg] Observed (already refracted!) zenith distance through the atmosphere. |
References on_surface::height, on_surface::latitude, NOVAS_NO_ATMOSPHERE, NOVAS_STANDARD_ATMOSPHERE, NOVAS_WEATHER_AT_LOCATION, on_surface::pressure, and on_surface::temperature.
double refract_astro | ( | const on_surface * | location, |
enum novas_refraction_model | option, | ||
double | zd_astro | ||
) |
Computes atmospheric optical refraction for a source at an astrometric zenith distance (e.g. calculated without accounting for an atmosphere). This is suitable for converting astrometric (unrefracted) zenith angles to observed (refracted) zenith angles. See refract() for the reverse correction.
The returned value is the approximate refraction for optical wavelengths. This function can be used for planning observations or telescope pointing, but should not be used for precise positioning.
REFERENCES:
location | Pointer to structure containing observer's location. It may also contains weather data (optional) for the observer's location. |
option | NOVAS_STANDARD_ATMOSPHERE (1), or NOVAS_WEATHER_AT_LOCATION (2) if to use the weather values contained in the 'location' data structure. |
zd_astro | [deg] Astrometric (unrefracted) zenith distance angle of the source. |
References novas_inv_max_iter, and refract().
int set_cio_locator_file | ( | const char * | filename | ) |
Sets the CIO interpolaton data file to use to interpolate CIO locations vs the GCRS. You can specify either the original CIO_RA.TXT
file included in the distribution (preferred since v1.1), or else a platform-specific binary data file compiled from it via the cio_file
utility (the old way).
filename | Path (preferably absolute path) CIO_RA.TXT or else to the binary cio_ra.bin data. |
int set_nutation_lp_provider | ( | novas_nutation_provider | func | ) |
Set the function to use for low-precision IAU 2000 nutation calculations instead of the default nu2000k().
func | the new function to use for low-precision IAU 2000 nutation calculations |
short sidereal_time | ( | double | jd_ut1_high, |
double | jd_ut1_low, | ||
double | ut1_to_tt, | ||
enum novas_equinox_type | gst_type, | ||
enum novas_earth_rotation_measure | erot, | ||
enum novas_accuracy | accuracy, | ||
double * | gst | ||
) |
Computes the Greenwich sidereal time, either mean or apparent, at the specified Julian date. The Julian date can be broken into two parts if convenient, but for the highest precision, set 'jd_high' to be the integral part of the Julian date, and set 'jd_low' to be the fractional part.
NOTES:
REFERENCES:
jd_ut1_high | [day] High-order part of UT1 Julian date. | |
jd_ut1_low | [day] Low-order part of UT1 Julian date. (You can leave it at zero if 'jd_high' specified the date with sufficient precision) | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
gst_type | NOVAS_MEAN_EQUINOX (0) or NOVAS_TRUE_EQUINOX (1), depending on whether wanting mean or apparent GST, respectively. | |
erot | EROT_ERA (0) or EROT_GST (1), depending on whether to use GST relative to equinox of date (pre IAU 2006) or ERA relative to the CIO (IAU 2006 standard). | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | gst | [h] Greenwich (mean or apparent) sidereal time, in hours [0:24]. (In case the returned error code is >1 the gst value will be set to NAN.) |
References cio_basis(), cio_location(), e_tilt(), era(), EROT_ERA, EROT_GST, frame_tie(), J2000_TO_ICRS, NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUINOX, NUTATE_TRUE_TO_MEAN, nutation(), precession(), and tt2tdb().
int spin | ( | double | angle, |
const double * | in, | ||
double * | out | ||
) |
Transforms a vector from one coordinate system to another with same origin and axes rotated about the z-axis.
REFERENCES:
angle | [deg] Angle of coordinate system rotation, positive counterclockwise when viewed from +z, in degrees. | |
in | Input position vector. | |
[out] | out | Position vector expressed in new coordinate system rotated about z by 'angle'. It can be the same vector as the input. |
References TWOPI.
int starvectors | ( | const cat_entry * | star, |
double * | pos, | ||
double * | vel | ||
) |
Converts angular quantities for stars to vectors.
REFERENCES:
star | Pointer to catalog entry structure containing ICRS catalog | |
[out] | pos | [AU] Position vector, equatorial rectangular coordinates, components in AU. It may be NULL if not required. |
[out] | vel | [AU/day] Velocity vector, equatorial rectangular coordinates, components in AU/Day. It must be distinct from the pos output vector, and may be NULL if not required. |
References AU, C, cat_entry::dec, cat_entry::parallax, cat_entry::promodec, cat_entry::promora, cat_entry::ra, and cat_entry::radialvelocity.
int tdb2tt | ( | double | jd_tdb, |
double * | jd_tt, | ||
double * | secdiff | ||
) |
Computes the Terrestrial Time (TT) or Terrestrial Dynamical Time (TDT) Julian date corresponding to a Barycentric Dynamical Time (TDB) Julian date.
Expression used in this function is a truncated form of a longer and more precise series given in the first reference. The result is good to about 10 microseconds.
REFERENCES:
jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date | |
[out] | jd_tt | [day] Terrestrial Time (TT) based Julian date. (It may be NULL if not required) |
[out] | secdiff | [s] Difference 'tdb_jd'-'tt_jd', in seconds. (It may be NULL if not required) |
short ter2cel | ( | double | jd_ut1_high, |
double | jd_ut1_low, | ||
double | ut1_to_tt, | ||
enum novas_earth_rotation_measure | erot, | ||
enum novas_accuracy | accuracy, | ||
enum novas_equatorial_class | class, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Rotates a vector from the terrestrial to the celestial system. Specifically, it transforms a vector in the ITRS (rotating earth-fixed system) to the True of Date (TOD), CIRS, or GCRS (a local space-fixed system) by applying rotations for polar motion, Earth rotation (for TOD); and nutation, precession, and the dynamical-to-GCRS frame tie (for GCRS).
If 'system' is NOVAS_CIRS then method EROT_ERA must be used. Similarly, if 'system' is NOVAS_TOD then method must be EROT_ERA. Otherwise an error 3 is returned.
If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.
REFERENCES:
jd_ut1_high | [day] High-order part of UT1 Julian date. | |
jd_ut1_low | [day] Low-order part of UT1 Julian date. | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds | |
erot | EROT_ERA (0) or EROT_GST (1), depending on whether to use GST relative to equinox of date (pre IAU 2006) or ERA relative to the CIO (IAU 2006 standard) as the Earth rotation measure. The main effect of this option is that it selects the output coordinate system as CIRS or TOD if the output coordinate class is NOVAS_DYNAMICAL_CLASS. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
class | Output coordinate class NOVAS_REFERENCE_CLASS (0, or any value other than 1) or NOVAS_DYNAMICAL_CLASS (1). Use the former if the output coordinates are to be in the GCRS, and the latter if they are to be in CIRS or TOD (the 'erot' parameter selects which dynamical system to use for the output.) | |
xp | [arcsec] Conventionally-defined X coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
in | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system) in the normal case where 'option' is NOVAS_GCRS (0). | |
[out] | out | Position vector, equatorial rectangular coordinates in the specified output system (GCRS if 'class' is NOVAS_REFERENCE_CLASS; or else either CIRS if 'erot' is EROT_ERA, or TOD if 'erot' is EROT_GST). It may be the same vector as the input. |
References cirs_to_gcrs(), era(), EROT_ERA, EROT_GST, NOVAS_DYNAMICAL_CLASS, NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUINOX, sidereal_time(), spin(), tt2tdb(), wobble(), and WOBBLE_ITRS_TO_PEF.
int terra | ( | const on_surface * | location, |
double | lst, | ||
double * | pos, | ||
double * | vel | ||
) |
Computes the position and velocity vectors of a terrestrial observer with respect to the center of the Earth.
This function ignores polar motion, unless the observer's longitude and latitude have been corrected for it, and variation in the length of day (angular velocity of earth).
The true equator and equinox of date do not form an inertial system. Therefore, with respect to an inertial system, the very small velocity component (several meters/day) due to the precession and nutation of the Earth's axis is not accounted for here.
REFERENCES:
location | Location of observer in Earth's rotating frame | |
lst | [h] Local apparent sidereal time at reference meridian in hours. | |
[out] | pos | [AU] Position vector of observer with respect to center of Earth, equatorial rectangular coordinates, referred to true equator and equinox of date, components in AU. If reference meridian is Greenwich and 'lst' = 0, 'pos' is effectively referred to equator and Greenwich. (It may be NULL if no position data is required). |
[out] | vel | [AU/day] Velocity vector of observer with respect to center of Earth, equatorial rectangular coordinates, referred to true equator and equinox of date, components in AU/day. (It must be distinct from the pos output vector, and may be NULL if no velocity data is required). |
References ANGVEL, AU_KM, ERAD, on_surface::height, on_surface::latitude, and on_surface::longitude.
int tod_to_cirs | ( | double | jd_tt, |
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Transforms a rectangular equatorial (x, y, z) vector from the True of Date (TOD) reference system to the Celestial Intermediate Reference System (CIRS) at the given epoch to the .
jd_tt | [day] Terrestrial Time (TT) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | CIRS Input (x, y, z) position or velocity vector | |
[out] | out | Output position or velocity 3-vector in the True of Date (TOD) frame. It can be the same vector as the input. |
int tod_to_itrs | ( | double | jd_tt_high, |
double | jd_tt_low, | ||
double | ut1_to_tt, | ||
enum novas_accuracy | accuracy, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Rotates a position vector from the dynamical True of Date (TOD) frame of date the Earth-fixed ITRS frame (pre IAU 2000 method).
If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.
If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.
REFERENCES:
jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date. | |
jd_tt_low | [day] Low-order part of Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] TT - UT1 Time difference in seconds. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
xp | [arcsec] Conventionally-defined X coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds. | |
in | Position vector, geocentric equatorial rectangular coordinates, referred to True of Date (TOD) axes (celestial system). | |
[out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system). |
References cel2ter(), EROT_GST, and NOVAS_DYNAMICAL_CLASS.
int tod_to_j2000 | ( | double | jd_tdb, |
enum novas_accuracy | accuracy, | ||
const double * | in, | ||
double * | out | ||
) |
Transforms a rectangular equatorial (x, y, z) vector from True of Date (TOD) reference frame at the given epoch to the J2000 coordinates.
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the input epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
in | Input (x, y, z) position or velocity 3-vector in the True equinox of Date coordinate frame. | |
[out] | out | Output position or velocity vector in rectangular equatorial coordinates at J2000. It can be the same vector as the input. |
References NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NUTATE_TRUE_TO_MEAN, nutation(), and precession().
short topo_planet | ( | double | jd_tt, |
const object * | ss_body, | ||
double | ut1_to_tt, | ||
const on_surface * | position, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | dis | ||
) |
Computes the topocentric apparent place of a solar system body at the specified time. This is the same as calling place() for the body for the same observer location and NOVAS_TOD as the reference system, except the different set of return values used.
REFERENCES:
jd_tt | [day] Terretrial Time (TT) based Julian date. | |
ss_body | Pointer to structure containing the body designation for the solar system body. | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
position | Position of the observer | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Topocentric apparent right ascension in hours, referred to the true equator and equinox of date. (It may be NULL if not required) |
[out] | dec | [deg] Topocentric apparent declination in degrees referred to the true equator and equinox of date. (It may be NULL if not required) |
[out] | dis | [AU] True distance from Earth to the body at 'jd_tt' in AU (may be NULL if not needed). |
References make_observer(), NOVAS_OBSERVER_ON_EARTH, NOVAS_TOD, and radec_planet().
short topo_star | ( | double | jd_tt, |
double | ut1_to_tt, | ||
const cat_entry * | star, | ||
const on_surface * | position, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec | ||
) |
Computes the topocentric (True of Date; TOD) apparent place of a star at date 'jd_tt', given its ICRS catalog place, proper motion, parallax, and radial velocity.
Notwithstanding the different set of return values, this is the same as calling place_star() with the same observer location and NOVAS_TOD for an object that specifies the star.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
ut1_to_tt | [s] Difference TT-UT1 at 'jd_tt', in seconds of time. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
position | Position of the observer | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Topocentric right ascension in hours, referred to true equator and equinox of date 'jd_tt'. (It may be NULL if not required) |
[out] | dec | [deg] Topocentric declination in degrees, referred to true equator and equinox of date 'jd_tt'. (It may be NULL if not required) |
References make_observer(), NOVAS_OBSERVER_ON_EARTH, NOVAS_TOD, and radec_star().
short transform_cat | ( | enum novas_transform_type | option, |
double | jd_tt_in, | ||
const cat_entry * | in, | ||
double | jd_tt_out, | ||
const char * | out_id, | ||
cat_entry * | out | ||
) |
Transform a star's catalog quantities for a change the coordinate system and/or the date for which the positions are calculated. Also used to rotate catalog quantities on the dynamical equator and equinox of J2000.0 to the ICRS or vice versa.
'date_incat' and 'date_newcat' may be specified either as a Julian date (e.g., 2433282.5 or NOVAS_JD_B1950) or a fractional Julian year and fraction (e.g., 1950.0). Values less than 10000 are assumed to be years. You can also use the supplied constants NOVAS_JD_J2000 or NOVAS_JD_B1950. The date arguments are ignored for the ICRS frame conversion options.
If 'option' is PROPER_MOTION (1), input data can be in any reference system. If 'option' is PRECESSION (2) or CHANGE_EPOCH (3), input data is assume to be in the dynamical system of 'date_incat' and produces output in the dynamical system of 'date_outcat'. If 'option' is CHANGE_J2000_TO_ICRS (4), the input data should be in the J2000.0 dynamical frame. And if 'option' is CHANGE_ICRS_TO_J2000 (5), the input data must be in the ICRS, and the output will be in the J2000 dynamical frame.
This function cannot be properly used to bring data from old star catalogs into the modern system, because old catalogs were compiled using a set of constants that are incompatible with modern values. In particular, it should not be used for catalogs whose positions and proper motions were derived by assuming a precession constant significantly different from the value implicit in function precession().
option | Type of transformation | |
jd_tt_in | [day|yr] Terrestrial Time (TT) based Julian date, or year, of input catalog data. Not used if option is CHANGE_J2000_TO_ICRS (4) or CHANGE_ICRS_TO_J2000 (5). | |
in | An entry from the input catalog, with units as given in the struct definition | |
jd_tt_out | [day|yr] Terrestrial Time (TT) based Julian date, or year, of output catalog data. Not used if option is CHANGE_J2000_TO_ICRS (4) or CHANGE_ICRS_TO_J2000 (5). | |
out_id | Catalog identifier (0 terminated). It may also be NULL in which case the catalog name is inherited from the input. | |
[out] | out | The transformed catalog entry, with units as given in the struct definition |
References AU_KM, C, cat_entry::catalog, CHANGE_EPOCH, CHANGE_ICRS_TO_J2000, CHANGE_J2000_TO_ICRS, cat_entry::dec, frame_tie(), ICRS_TO_J2000, J2000_TO_ICRS, NOVAS_JD_J2000, cat_entry::parallax, PRECESSION, precession(), cat_entry::promodec, cat_entry::promora, PROPER_MOTION, cat_entry::ra, cat_entry::radialvelocity, cat_entry::starname, and cat_entry::starnumber.
Convert Hipparcos catalog data at epoch J1991.25 to epoch J2000.0, for use within NOVAS. To be used only for Hipparcos or Tycho stars with linear space motion. Both input and output data is in the ICRS.
hipparcos | An entry from the Hipparcos catalog, at epoch J1991.25, with 'ra' in degrees(!) as per Hipparcos catalog units. | |
[out] | hip_2000 | The transformed input entry, at epoch J2000.0, with 'ra' in hours(!) as per the NOVAS convention. |
References cat_entry::catalog, NOVAS_JD_HIP, cat_entry::ra, and transform_cat().
double tt2tdb | ( | double | jd_tt | ) |
Returns the TDB - TT time difference in seconds for a given TT date.
Note, as of version 1.1, it uses the same calculation as the more precise original tdb2tt(). It thus has an acuracy of about 10 μs vs around 30 μs with the simpler formula from the references below.
REFERENCES
jd_tt | [day] Terrestrial Time (TT) based Julian date |
References tdb2tt().
double unredshift_vrad | ( | double | vrad, |
double | z | ||
) |
Undoes an incremental redshift correction that was applied to radial velocity.
vrad | [km/s] Radial velocity |
z | Redshift correction to apply |
References novas_v2z(), and novas_z2v().
short vector2radec | ( | const double * | pos, |
double * | ra, | ||
double * | dec | ||
) |
Converts an vector in equatorial rectangular coordinates to equatorial spherical coordinates.
REFERENCES:
pos | Position 3-vector, equatorial rectangular coordinates. | |
[out] | ra | [h] Right ascension in hours [0:24] or NAN if the position vector is NULL or a null-vector. It may be NULL if notrequired. |
[out] | dec | [deg] Declination in degrees [-90:90] or NAN if the position vector is NULL or a null-vector. It may be NULL if not required. |
short virtual_planet | ( | double | jd_tt, |
const object * | ss_body, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec, | ||
double * | dis | ||
) |
Computes the virtual place of a solar system body, referenced to the GCRS. This is the same as calling place_gcrs() for the body, except the different set of return values used.
REFERENCES:
jd_tt | [day] Terretrial Time (TT) based Julian date. | |
ss_body | Pointer to structure containing the body designation for the solar system body. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Virtual right ascension in hours, referred to the GCRS (it may be NULL if not required). |
[out] | dec | [deg] Virtual declination in degrees, referred to the GCRS (it may be NULL if not required). |
[out] | dis | [AU] True distance from Earth to the body at 'jd_tt' in AU (can be NULL if not needed). |
References NOVAS_GCRS, and radec_planet().
short virtual_star | ( | double | jd_tt, |
const cat_entry * | star, | ||
enum novas_accuracy | accuracy, | ||
double * | ra, | ||
double * | dec | ||
) |
Computes the virtual place of a star, referenced to GCRS, at date 'jd_tt', given its catalog mean place, proper motion, parallax, and radial velocity.
Notwithstanding the different set of return values, this is the same as calling place_star() with a NULL observer location and NOVAS_GCRS as the system, or place_gcrs() for an object that specifies the star.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
star | Pointer to catalog entry structure containing catalog data for the object in the ICRS. | |
accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) | |
[out] | ra | [h] Virtual right ascension in hours, referred to the GCRS (it may be NULL if not required). |
[out] | dec | [deg] Virtual declination in degrees, referred to the GCRS (it may be NULL if not required). |
References NOVAS_GCRS, and radec_star().
int wobble | ( | double | jd_tt, |
enum novas_wobble_direction | direction, | ||
double | xp, | ||
double | yp, | ||
const double * | in, | ||
double * | out | ||
) |
Corrects a vector in the ITRS (rotating Earth-fixed system) for polar motion, and also corrects the longitude origin (by a tiny amount) to the Terrestrial Intermediate Origin (TIO). The ITRS vector is thereby transformed to the terrestrial intermediate system, based on the true (rotational) equator and TIO. Because the true equator is the plane orthogonal to the direction of the Celestial Intermediate Pole (CIP), the components of the output vector are referred to z and x axes toward the CIP and TIO, respectively.
REFERENCES:
jd_tt | [day] Terrestrial Time (TT) based Julian date. | |
direction | WOBBLE_ITRS_TO_PEF (0) or WOBBLE_PEF_TO_ITRS (1; or nonzero) | |
xp | [arcsec] Conventionally-defined X coordinate of Celestial Intermediate Pole with respect to ITRS pole, in arcseconds. | |
yp | [arcsec] Conventionally-defined Y coordinate of Celestial Intermediate Pole with respect to ITRS pole, in arcseconds. | |
in | Input position vector, geocentric equatorial rectangular coordinates, in the original system defined by 'direction' | |
[out] | out | Output Position vector, geocentric equatorial rectangular coordinates, in the final system defined by 'direction'. It can be the same vector as the input. |
References WOBBLE_ITRS_TO_PEF.
|
extern |
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.
|
extern |
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.