Astro-PAL

 view release on metacpan or  search on metacpan

palsrc/palmac.h  view on Meta::CPAN

/* pi/180:  degrees to radians */
static const double PAL__DD2R = 0.017453292519943295769236907684886127134428718885417;

/* Radians to arcseconds */
static const double PAL__DR2AS = 2.0626480624709635515647335733077861319665970087963e5;

/* Arcseconds to radians */
static const double PAL__DAS2R = 4.8481368110953599358991410235794797595635330237270e-6;

/* Radians to degrees */
static const double PAL__DR2D = 57.295779513082320876798154814105170332405472466564;

/* Hours to radians */
static const double PAL__DH2R = 0.26179938779914943653855361527329190701643078328126;

/* Radians to hours */
static const double PAL__DR2H = 3.8197186342054880584532103209403446888270314977709;

/* Radians to seconds of time */
static const double PAL__DR2S = 1.3750987083139757010431557155385240879777313391975e4;

/* Seconds of time to radians */
static const double PAL__DS2R = 7.272205216643039903848712e-5;

/* Start of SLA modified Julian date epoch */
static const double PAL__MJD0 = 2400000.5;

/* Light time for 1 AU (sec) */
static const double PAL__CR = 499.004782;

/* Seconds per day */
static const double PAL__SPD = 86400.0;

/* Km per sec to AU per tropical century
   = 86400 * 36524.2198782 / 149597870 */
static const double PAL__VF = 21.095;

/*  Radians per year to arcsec per century. This needs to be a macro since it
    is an expression including other constants. */
#define PAL__PMF (100.0*60.0*60.0*360.0/PAL__D2PI);

/* Mean sidereal rate - the rotational angular velocity of Earth
   in radians/sec from IERS Conventions (2003). */
static const double PAL__SR = 7.2921150e-5;

/*  Gaussian gravitational constant (exact) */
static const double PAL__GCON = 0.01720209895;

/* DINT(A) - truncate to nearest whole number towards zero (double) */
#define DINT(A) ((A)<0.0?ceil(A):floor(A))

/* DNINT(A) - round to nearest whole number (double) */
#define DNINT(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5))

/* DMAX(A,B) - return maximum value - evaluates arguments multiple times */
#define DMAX(A,B) ((A) > (B) ? (A) : (B) )

/* DMIN(A,B) - return minimum value - evaluates arguments multiple times */
#define DMIN(A,B) ((A) < (B) ? (A) : (B) )

/* We actually prefer to use C99 copysign() but we define this here as a backup
   but it will not detect -0.0 so is not useful for palDfltin. */
/* DSIGN(A,B) - magnitude of A with sign of B (double) */
#define DSIGN(A,B) ((B)<0.0?-fabs(A):fabs(A))

#endif



( run in 3.402 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )