![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
Macros | |
| #define | _GNU_SOURCE |
| fmemopen (before glibc 2.10) | |
Functions | |
| int | novas_fetch_eop (double jd, long timeout_millis, novas_eop *eop) |
| Obtains interpolated Earth Orientation Parameter data from the International Earth Rotation and Reference Systems Service (IERS). | |
| int | novas_fetch_eop_unix (time_t t, long timeout_millis, novas_eop *eop) |
| Obtains interpolated Earth Orientation Parameter data from the International Earth Rotation and Reference Systems Service (IERS) around the current system time, using the rapid service data (finals.all). | |
| int | novas_get_eop_itrf_year (enum novas_eop_series series) |
| Returns the ITRF realization year for a given IERS Earth Orientation Parameter (EOP) series. | |
| const char * | novas_get_eop_url (enum novas_eop_series series) |
| Returns the URL currently configured for a given IERS Earth Orientation Parameter (EOP) series. | |
| int | novas_is_auto_fetch_eop () |
| Checks if automatic fetching of Earth Orientation Parameter values from IERS is allowed. | |
| int | novas_lookup_leap (time_t t) |
| Returns the leap seconds for the given UNIX timestamp, based either on a locally supplied leap seconds list (see novas_set_leap_list()), or else from data obtained as needed from IERS (provided that fetching it is allowed). | |
| void | novas_reset_eop () |
| Releases resources used by URL handles used for obtaining Earth Orientation Parameter (EOP) data from the International Earth Rotation and Reference Systems Service (IERS), including the leap seconds list supplied earlier or obtained from IERS. | |
| int | novas_set_auto_fetch_eop (int enabled) |
| Disable or Re-enabled the automatic fetching of Earth Orientation Parameter values from IERS, when these are left undefined (NAN) when initializing astrometric time or observing frame instances. | |
| int | novas_set_eop_url (enum novas_eop_series series, int itrf_year, const char *url) |
| Specify a URL to use for a given IERS Earth Orientation Parameter (EOP) series. | |
| int | novas_set_leap_list (const char *filename) |
| Specifies a local file containing the official leap seconds list, i.e. | |
Functions to obtain and manage Earth Orientation data from the International Earth Rotation and Reference Systems Service (IERS) via HTTPS, or using other (remote or local) URLs.
The functions in this module are generally thread-safe. That is, you may call all functions from concurrent threads without data corruption. However, note that the EOP resources (URLs and/or local files), and the setting that enables/disables automatic fetching, are global settings. Thus, changing these in one thread will effect subsequent EOP fetch calls in other threads also.
| #define _GNU_SOURCE |
fmemopen (before glibc 2.10)
| int novas_fetch_eop | ( | double | jd, |
| long | timeout_millis, | ||
| novas_eop * | eop ) |
Obtains interpolated Earth Orientation Parameter data from the International Earth Rotation and Reference Systems Service (IERS).
For dates since 1972 or for prediction for up to a year ahead, the rapid service data is used (finals.all), otherwise for dates after 1962 the C04 series is used, and for dates all the way back to 1846, the C01 series is used. All of the mentioned data are retrieved relative to the IAU2000 precession-nutation model.
You should always check the return status when using this function, since the fetching of EOP values may fail for a host of different reasons.
NOTES:
| jd | Julian Date (in any timescale, with a preference for UTC) | |
| timeout_millis | [ms] HTTP connection timeout, or <=0 to leave unchanged. | |
| [out] | eop | Output EOP data structure to populate |
Referenced by supernovas::GeodeticObserver::eop_at(), supernovas::EOP::fetch_for_jd(), novas_fetch_eop_unix(), novas_make_frame(), and novas_set_split_time().
| int novas_fetch_eop_unix | ( | time_t | t, |
| long | timeout_millis, | ||
| novas_eop * | eop ) |
Obtains interpolated Earth Orientation Parameter data from the International Earth Rotation and Reference Systems Service (IERS) around the current system time, using the rapid service data (finals.all).
You should always check the return status when using this function, since the fetching of EOP values may fail for a host of different reasons.
NOTES:
| t | [s] UNIX time (seconds since 0 UTC 1 Jan 1970). | |
| timeout_millis | [ms] HTTP connection timeout, or <=0 to leave unchanged. | |
| [out] | eop | Output EOP data structure to populate |
References novas_fetch_eop(), NOVAS_JD_J2000, and UNIX_SECONDS_0UTC_1JAN2000.
| void novas_reset_eop | ( | ) |
Releases resources used by URL handles used for obtaining Earth Orientation Parameter (EOP) data from the International Earth Rotation and Reference Systems Service (IERS), including the leap seconds list supplied earlier or obtained from IERS.
It also discards any custom URLs that may have been set previously, and restores the default IERS URLs for obtaining leap seconds and EOP from IERS. The cleanup performed by this function is automatic at normal program exit, but users may call it explicitly restore the initial state at any point.
NOTES: