Astro-PAL
view release on metacpan or search on metacpan
erfasrc/src/erfam.h view on Meta::CPAN
#ifndef ERFAMHDEF
#define ERFAMHDEF
/*
** - - - - - - - -
** e r f a m . h
** - - - - - - - -
**
** Macros used by ERFA library.
**
** Copyright (C) 2013-2020, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
/* Star-independent astrometry parameters */
typedef struct {
double pmt; /* PM time interval (SSB, Julian years) */
double eb[3]; /* SSB to observer (vector, au) */
double eh[3]; /* Sun to observer (unit vector) */
double em; /* distance from Sun to observer (au) */
double v[3]; /* barycentric observer velocity (vector, c) */
double bm1; /* sqrt(1-|v|^2): reciprocal of Lorenz factor */
double bpn[3][3]; /* bias-precession-nutation matrix */
double along; /* longitude + s' + dERA(DUT) (radians) */
double phi; /* geodetic latitude (radians) */
double xpl; /* polar motion xp wrt local meridian (radians) */
double ypl; /* polar motion yp wrt local meridian (radians) */
double sphi; /* sine of geodetic latitude */
double cphi; /* cosine of geodetic latitude */
double diurab; /* magnitude of diurnal aberration vector */
double eral; /* "local" Earth rotation angle (radians) */
double refa; /* refraction constant A (radians) */
double refb; /* refraction constant B (radians) */
} eraASTROM;
/* (Vectors eb, eh, em and v are all with respect to BCRS axes.) */
/* Body parameters for light deflection */
typedef struct {
double bm; /* mass of the body (solar masses) */
double dl; /* deflection limiter (radians^2/2) */
double pv[2][3]; /* barycentric PV of the body (au, au/day) */
} eraLDBODY;
/* Leap second definition */
typedef struct {
int iyear, month;
double delat;
} eraLEAPSECOND;
/* Pi */
#define ERFA_DPI (3.141592653589793238462643)
/* 2Pi */
#define ERFA_D2PI (6.283185307179586476925287)
/* Radians to degrees */
#define ERFA_DR2D (57.29577951308232087679815)
/* Degrees to radians */
#define ERFA_DD2R (1.745329251994329576923691e-2)
/* Radians to arcseconds */
#define ERFA_DR2AS (206264.8062470963551564734)
/* Arcseconds to radians */
#define ERFA_DAS2R (4.848136811095359935899141e-6)
/* Seconds of time to radians */
#define ERFA_DS2R (7.272205216643039903848712e-5)
( run in 2.788 seconds using v1.01-cache-2.11-cpan-f56aa216473 )