#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "LeapSeconds.h"
Go to the source code of this file.
Defines | |
#define | EPOCH_GPS_TAI_UTC 19 |
Leap seconds (TAI-UTC) on the GPS epoch (1980 JAN 6 0h UTC). | |
#define | EPOCH_J2000_0_JD 2451545.0 |
Julian Day of the J2000.0 epoch (2000 JAN 1 12h UTC). | |
#define | EPOCH_UNIX_GPS 315964800 |
#define | M_PI 3.14159265358979323846 |
Functions | |
struct tm * | GPSToUTC (struct tm *utc, int gpssec) |
double | GreenwichMeanSiderealTime (const double gpstime) |
Convenience wrapper, calling GreenwichSiderealTime() with the equation of equinoxes set to 0. | |
double | GreenwichSiderealTime (const double gpstime, double equation_of_equinoxes) |
Returns the Greenwich Sidereal Time IN RADIANS corresponding to a specified GPS time. | |
double | JulianDay (const struct tm *utc) |
Returns the Julian Day (JD) corresponding to the date given in a broken down time structure. | |
int | LeapSeconds (int gpssec) |
Returns the leap seconds TAI-UTC at a given GPS second. | |
int | LeapSecondsUTC (const struct tm *utc) |
int | UTCToGPS (const struct tm *utc) |
#define EPOCH_GPS_TAI_UTC 19 |
Leap seconds (TAI-UTC) on the GPS epoch (1980 JAN 6 0h UTC).
#define EPOCH_J2000_0_JD 2451545.0 |
Julian Day of the J2000.0 epoch (2000 JAN 1 12h UTC).
#define EPOCH_UNIX_GPS 315964800 |
#define M_PI 3.14159265358979323846 |
struct tm* GPSToUTC | ( | struct tm * | utc, | |
int | gpssec | |||
) | [read] |
double GreenwichMeanSiderealTime | ( | const double | gpstime | ) |
Convenience wrapper, calling GreenwichSiderealTime() with the equation of equinoxes set to 0.
double GreenwichSiderealTime | ( | const double | gpstime, | |
double | equation_of_equinoxes | |||
) |
Returns the Greenwich Sidereal Time IN RADIANS corresponding to a specified GPS time.
Aparent sidereal time is computed by providing the equation of equinoxes in units of seconds. For mean sidereal time, set this parameter to 0.
This function returns the sidereal time in radians measured from the Julian epoch (current J2000). The result is NOT modulo 2 pi.
Inspired by the function sidereal_time() in the NOVAS-C library, version 2.0.1, which is dated December 10th, 1999, and carries the following references:
Aoki, et al. (1982) Astronomy and Astrophysics 105, 359-361. Kaplan, G. H. "NOVAS: Naval Observatory Vector Astrometry Subroutines"; USNO internal document dated 20 Oct 1988; revised 15 Mar 1990.
See http://aa.usno.navy.mil/software/novas for more information.
double JulianDay | ( | const struct tm * | utc | ) |
Returns the Julian Day (JD) corresponding to the date given in a broken down time structure.
[in] | utc | UTC time in a broken down time structure. |
int LeapSeconds | ( | int | gpssec | ) |
Returns the leap seconds TAI-UTC at a given GPS second.
[in] | gpssec | Seconds relative to GPS epoch. |
int LeapSecondsUTC | ( | const struct tm * | utc | ) |
int UTCToGPS | ( | const struct tm * | utc | ) |