27#include <lal/LALConstants.h>
28#include <lal/LALAtomicDatatypes.h>
29#include <lal/LALDatatypes.h>
30#include <lal/LALStdio.h>
32#include <lal/DetectorSite.h>
39#define XLAL_BILLION_INT4 1000000000
40#define XLAL_BILLION_INT8 LAL_INT8_C( 1000000000 )
41#define XLAL_BILLION_REAL8 1e9
82#define XLAL_EPOCH_UNIX_GPS 315964800
84#define XLAL_EPOCH_J2000_0_JD 2451545.0
85#define XLAL_EPOCH_J2000_0_TAI_UTC 32
86#define XLAL_EPOCH_J2000_0_GPS 630763213
87#define XLAL_EPOCH_GPS_JD 2444244.5
88#define XLAL_EPOCH_GPS_TAI_UTC 19
89#define XLAL_MJD_REF 2400000.5
90#define XLAL_JD_TO_MJD(jd) ((jd) - XLAL_MJD_REF)
98SWIGLAL(IMMUTABLE_MEMBERS(tagLALPlaceAndGPS, p_detector));
119#define LAL_GPS_FORMAT LAL_INT8_FORMAT ".%09" LAL_INT4_FORMAT
120#define LAL_GPS_PRINT(gps) (INT8)(XLALGPSToINT8NS(&(gps)) / XLAL_BILLION_INT8), (INT4)labs(XLALGPSToINT8NS(&(gps)) % XLAL_BILLION_INT8)
190SWIGLAL_CLEAR(NEW_EMPTY_ARGUMENT(
LIGOTimeGPS*, gpstime));
212SWIGLAL(EMPTY_ARGUMENT(
struct tm*, utc));
220SWIGLAL_CLEAR(EMPTY_ARGUMENT(
struct tm*, utc));
238 REAL8 equation_of_equinoxes
255 REAL8 equation_of_equinoxes,
int XLALStrToGPS(LIGOTimeGPS *t, const char *nptr, char **endptr)
Parse an ASCII string into a LIGOTimeGPS structure.
char * XLALGPSToStr(char *, const LIGOTimeGPS *t)
Return a string containing the ASCII base 10 representation of a LIGOTimeGPS.
LIGOTimeGPS * XLALGPSTimeNow(LIGOTimeGPS *gpstime)
Populate the LIGOTimeGPS argument with the current system time as returned by time(2) converted to GP...
double REAL8
Double precision real floating-point number (8 bytes).
int64_t INT8
Eight-byte signed integer; on some platforms this is equivalent to long int instead.
int32_t INT4
Four-byte signed integer.
REAL8 XLALConvertCivilTimeToJD(const struct tm *civil)
Returns the Julian Day (JD) corresponding to the civil date and time given in a broken down time stru...
int XLALGPSLeapSeconds(INT4 gpssec)
Returns the leap seconds GPS-UTC at a given GPS second.
REAL8 XLALJulianDay(const struct tm *utc)
INT4 XLALUTCToGPS(const struct tm *utc)
Returns the GPS seconds since the GPS epoch for a specified UTC time structure.
int XLALLeapSeconds(INT4 gpssec)
Returns the leap seconds TAI-UTC at a given GPS second.
time_t XLALSecondsSinceUnixEpoch(const struct tm *utc)
Compute Unix epoch time: seconds since 1970 January 1 0h UTC (POSIX:2001 definition of Unix Epoch).
struct tm * XLALFillUTC(struct tm *utc)
Fill in derived fields, e.g.
int XLALLeapSecondsUTC(const struct tm *utc)
Returns the leap seconds TAI-UTC for a given UTC broken down time.
struct tm * XLALGPSToUTC(struct tm *utc, INT4 gpssec)
Returns a pointer to a tm structure representing the time specified in seconds since the GPS epoch.
REAL8 XLALConvertCivilTimeToMJD(const struct tm *civil)
Returns the Modified Julian Day MJD corresponding to the civil date and time given in a broken down t...
INT4 XLALModifiedJulianDay(const struct tm *utc)
REAL8 XLALGreenwichSiderealTime(const LIGOTimeGPS *gpstime, REAL8 equation_of_equinoxes)
Returns the Greenwich Sidereal Time IN RADIANS corresponding to a specified GPS time.
LIGOTimeGPS * XLALGreenwichSiderealTimeToGPS(REAL8 gmst, REAL8 equation_of_equinoxes, LIGOTimeGPS *gps)
Convenience wrapper of XLALGreenwichMeanSiderealTimeToGPS(), adjusting the input by the equation of e...
REAL8 XLALGreenwichMeanSiderealTime(const LIGOTimeGPS *gpstime)
Convenience wrapper, calling XLALGreenwichSiderealTime() with the equation of equinoxes set to 0.
LIGOTimeGPS * XLALGreenwichMeanSiderealTimeToGPS(REAL8 gmst, LIGOTimeGPS *gps)
Inverse of XLALGreenwichMeanSiderealTime().
LIGOTimeGPS * XLALGPSDivide(LIGOTimeGPS *gps, REAL8 x)
Divide a GPS time by a number.
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
Sets GPS time given GPS seconds as a REAL8.
LIGOTimeGPS * XLALGPSSet(LIGOTimeGPS *epoch, INT4 gpssec, INT8 gpsnan)
Sets GPS time given GPS integer seconds and residual nanoseconds.
REAL8 XLALGPSModf(REAL8 *iptr, const LIGOTimeGPS *epoch)
Breaks the GPS time into REAL8 integral and fractional parts, each of which has the same sign as the ...
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
Adds a double to a GPS time.
LIGOTimeGPS * XLALGPSSubGPS(LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
Difference between two GPS times.
int XLALGPSCmp(const LIGOTimeGPS *t0, const LIGOTimeGPS *t1)
Compares two GPS times.
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
Returns the GPS time as a REAL8.
LIGOTimeGPS * XLALGPSAddGPS(LIGOTimeGPS *epoch, const LIGOTimeGPS *dt)
Adds two GPS times.
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
Difference between two GPS times as double.
LIGOTimeGPS * XLALGPSMultiply(LIGOTimeGPS *gps, REAL8 x)
Multiply a GPS time by a number.
LIGOTimeGPS * XLALINT8NSToGPS(LIGOTimeGPS *epoch, INT8 ns)
Converts nano seconds stored as an INT8 to GPS time.
INT8 XLALGPSToINT8NS(const LIGOTimeGPS *epoch)
Converts GPS time to nano seconds stored as an INT8.
This structure stores pointers to a LALDetector and a LIGOTimeGPS.
LIGOTimeGPS * p_gps
Pointer to a GPS time structure.
const LALDetector * p_detector
pointer to a detector
Epoch relative to GPS epoch, see LIGOTimeGPS type for more details.