SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
Loading...
Searching...
No Matches
Time of observation and astronomical timescales

Defining the precise time of observation, and support for all relevant astronomical timescales, such as UT1, UTC, TAI, GPS, TT, TDB, TCG, TCB. More...

Classes

class  supernovas::Calendar
 Type of calendar used for representing dates, such as Gregorian, Roman, or astronomical. More...
class  supernovas::CalendarDate
 A time specified in a specific type of calendar (Gregorian, Roman, or astronomical). More...
class  supernovas::Time
 Precise astronomical time specification, supporting all relevant astronomical timescales (UT1, UTC, TAI, GPS, TT, TDB, TCG, and TCB). More...

Macros

#define NOVAS_GPS_TO_TAI   19.0
 [s] TAI - GPS time offset
#define NOVAS_JD_MJD0   2400000.5
 [day] Julian date at which the Modified Julian Date (MJD) is zero
#define NOVAS_JD_START_GREGORIAN   2299160.5
 [day] The Julian day the Gregorian calendar was introduced in 15 October 1582.
#define NOVAS_TAI_TO_TT   32.184
 [s] TT - TAI time offset

Enumerations

enum  novas_timescale {
  NOVAS_TCB = 0 , NOVAS_TDB , NOVAS_TCG , NOVAS_TT ,
  NOVAS_TAI , NOVAS_GPS , NOVAS_UTC , NOVAS_UT1
}
 Constants to reference various astronomical timescales used. More...

Functions

const Timesupernovas::AstrometricPosition::emit_time () const
 Returns the time at which the observed light was emitted from this position, that is antedated from the time of observation by the time it takes for light to travel to the observer.
enum novas_timescale novas_timescale_for_string (const char *restrict str)
 Returns the timescale constant for a string that denotes the timescale in with a standard abbreviation (case insensitive).
Time supernovas::AstrometricPosition::obs_time () const
 Returns the reference time at which this position was observed by an observer at the reference location.
Time supernovas::Source::rises_above (const Angle &el, const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const
 Returns the time when the source rises above the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface.
Time supernovas::Source::sets_below (const Angle &el, const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const
 Returns the time when the source sets below the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface.
Time supernovas::Source::transits_in (const Frame &frame) const
 Returns the time when the source transits for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface.
double tt2tdb_fp (double jd_tt, double limit)
 Returns the TDB-TT time difference with flexible precision.

Detailed Description

Defining the precise time of observation, and support for all relevant astronomical timescales, such as UT1, UTC, TAI, GPS, TT, TDB, TCG, TCB.

Macro Definition Documentation

◆ NOVAS_GPS_TO_TAI

#define NOVAS_GPS_TO_TAI   19.0

[s] TAI - GPS time offset

◆ NOVAS_JD_MJD0

#define NOVAS_JD_MJD0   2400000.5

[day] Julian date at which the Modified Julian Date (MJD) is zero

Referenced by supernovas::Time::from_mjd(), supernovas::CalendarDate::mjd(), supernovas::Ecliptic::mjd(), supernovas::Equinox::mjd(), and supernovas::Time::mjd().

◆ NOVAS_JD_START_GREGORIAN

#define NOVAS_JD_START_GREGORIAN   2299160.5

[day] The Julian day the Gregorian calendar was introduced in 15 October 1582.

The day prior to that was 4 October 1582 in the Julian Calendar.

Referenced by novas_day_of_year(), novas_jd_from_date(), and novas_jd_to_date().

◆ NOVAS_TAI_TO_TT

#define NOVAS_TAI_TO_TT   32.184

[s] TT - TAI time offset

Referenced by get_utc_to_tt().

Enumeration Type Documentation

◆ novas_timescale

Constants to reference various astronomical timescales used.

Since
1.1
See also
novas_set_time(), novas_get_time(), novas_diff_time(), novas_clock_skew(), NOVAS_TIMESCALES
timescale.c
Enumerator
NOVAS_TCB 

Barycentric Coordinate Time (TCB).

NOVAS_TDB 

Barycentric Dynamical Time (TDB).

NOVAS_TCG 

Geocentric Coordinate Time (TCG).

NOVAS_TT 

Terrestrial Time (TT).

NOVAS_TAI 

Innternational Atomic Time (TAI).

NOVAS_GPS 

GPS Time.

NOVAS_UTC 

Universal Coordinated Time (UTC).

NOVAS_UT1 

UT1 earth rotation time, based on the measured Earth orientation parameters published in IERS Bulletin A.

Function Documentation

◆ emit_time()

const Time & supernovas::AstrometricPosition::emit_time ( ) const

Returns the time at which the observed light was emitted from this position, that is antedated from the time of observation by the time it takes for light to travel to the observer.

Returns
the time at which observed light was emitted from this position.
See also
obs_time()

◆ novas_timescale_for_string()

enum novas_timescale novas_timescale_for_string ( const char *restrict str)

Returns the timescale constant for a string that denotes the timescale in with a standard abbreviation (case insensitive).

The following values are recognised: "UTC", "UT", "UT0", "UT1", "GMT", "TAI", "GPS", "TT", "ET", "TCG", "TCB", and "TDB".

Parameters
strString specifying an astronomical timescale
Returns
The SuperNOVAS timescale constant (<=0), or else -1 if the string was NULL, empty, or could not be matched to a timescale value (errno will be set to EINVAL also).
Since
1.3
Author
Attila Kovacs
See also
novas_parse_timescale(), novas_set_str_time(), novas_print_timescale()

References NOVAS_GPS, NOVAS_TAI, NOVAS_TCB, NOVAS_TCG, NOVAS_TDB, NOVAS_TT, NOVAS_UT1, and NOVAS_UTC.

Referenced by novas_parse_timescale().

◆ obs_time()

Time supernovas::AstrometricPosition::obs_time ( ) const

Returns the reference time at which this position was observed by an observer at the reference location.

Returns
the time at which this position is defined.
See also
emit_time(), reference()

References supernovas::Constant::c, supernovas::Position::distance(), supernovas::Validating::is_valid(), and supernovas::Coordinate::m().

Referenced by as_equatorial(), and referenced_to().

◆ rises_above()

Time supernovas::Source::rises_above ( const Angle & el,
const Frame & frame,
RefractionModel ref = NULL,
const Weather & weather = Weather::standard() ) const

Returns the time when the source rises above the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface.

The returned value may also be NAN if the source does not cross the specified elevation theshold within a day of the specified time of observation.

Parameters
elelevation threshold angle
Observing framesobserving frame (observer location and the lower bound for the returned time).
refatmospheric refraction model to assume
weatherlocal weather parameters for the refraction calculation
Returns
the next time the source rises above the specified elevation after the frame's observing time. It may be NAN if the source does not cross (rises above or sets below) the elevation threshold within a day of the specified time of observation. For observers non near Earth's surface, Time::undefined() will be returned.
See also
sets_below(), transits_in()

References supernovas::Frame::_novas_frame(), _object, supernovas::Angle::deg(), supernovas::Frame::eop(), supernovas::Validating::is_valid(), and novas_rises_above().

◆ sets_below()

Time supernovas::Source::sets_below ( const Angle & el,
const Frame & frame,
RefractionModel ref = NULL,
const Weather & weather = Weather::standard() ) const

Returns the time when the source sets below the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface.

The returned value may also be NAN if the source does not cross the specified elevation theshold within a day of the specified time of observation.

Parameters
elelevation threshold angle
Observing framesobserving frame (observer location and the lower bound for the returned time).
refatmospheric refraction model to assume
weatherlocal weather parameters for the refraction calculation
Returns
the next time the source sets the specified elevation after the frame's observing time. It may be NAN if the source does not cross (rises above or sets below) the elevation threshold within a day of the specified time of observation. For observers not near Earth's surface, Time::undefined() will be returned.
See also
rises_above(), transits_in()

References supernovas::Frame::_novas_frame(), _object, supernovas::Angle::deg(), supernovas::Frame::eop(), supernovas::Validating::is_valid(), and novas_sets_below().

◆ transits_in()

Time supernovas::Source::transits_in ( const Frame & frame) const

Returns the time when the source transits for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface.

Parameters
Observing framesobserving frame (observer location and the lower bound for the returned time).
Returns
the next time the source transits after the frame's observing time, or else Time::undefined() if the observer is not near Earth's surface .
See also
sets_below(), transits_in()

References supernovas::Frame::_novas_frame(), _object, supernovas::Frame::eop(), supernovas::Validating::is_valid(), and novas_transit_time().

◆ tt2tdb_fp()

double tt2tdb_fp ( double jd_tt,
double limit )

Returns the TDB-TT time difference with flexible precision.

This implementation uses the series expansion by Fairhead & Bretagnon 1990, terminating the terms at or below the specified limiting amplitude.

REFERENCES:

  1. Fairhead, L., & Bretagnon, P. (1990) A&A, 229, 240
Parameters
jd_tt[day] Terrestrial Time (TT) based Julian date, but Barycentric Dynamical Time (TDB)
limit[us] Amplitude of limiting term to include in series. 0 or negative values will include all terms, producing the same result as tt2tdb_hp().
Returns
[s] TDB - TT time difference.
Since
1.4
Author
Attila Kovacs
See also
tt2tdb_hp(), tt2tdb()

References NOVAS_JD_J2000.

Referenced by tt2tdb_hp().