palmac.h | palmac.h | |||
---|---|---|---|---|
skipping to change at line 23 | skipping to change at line 23 | |||
* Starlink ANSI C | * Starlink ANSI C | |||
* Type of Module: | * Type of Module: | |||
* Include file | * Include file | |||
* Description: | * Description: | |||
* A collection of useful macros provided and used by the PAL library | * A collection of useful macros provided and used by the PAL library | |||
* Authors: | * Authors: | |||
* TIMJ: Tim Jenness (JAC, Hawaii) | * TIMJ: Tim Jenness (JAC, Hawaii) | |||
* DSB: David Berry (JAC, Hawaii) | ||||
* {enter_new_authors_here} | * {enter_new_authors_here} | |||
* Notes: | * Notes: | |||
* | * | |||
* History: | * History: | |||
* 2012-02-08 (TIMJ): | * 2012-02-08 (TIMJ): | |||
* Initial version. | * Initial version. | |||
* 2012-04-13 (DSB): | ||||
* Added PAL__DR2H and PAL__DR2S | ||||
* {enter_further_changes_here} | * {enter_further_changes_here} | |||
* Copyright: | * Copyright: | |||
* Copyright (C) 2012 Science and Technology Facilities Council. | * Copyright (C) 2012 Science and Technology Facilities Council. | |||
* All Rights Reserved. | * All Rights Reserved. | |||
* Licence: | * Licence: | |||
* This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | |||
* published by the Free Software Foundation; either version 3 of | * published by the Free Software Foundation; either version 3 of | |||
skipping to change at line 73 | skipping to change at line 76 | |||
/* pi/180: degrees to radians */ | /* pi/180: degrees to radians */ | |||
static const double PAL__DD2R = 0.0174532925199432957692369076848861271344 28718885417; | static const double PAL__DD2R = 0.0174532925199432957692369076848861271344 28718885417; | |||
/* Radians to arcseconds */ | /* Radians to arcseconds */ | |||
static const double PAL__DR2AS = 2.0626480624709635515647335733077861319665 970087963e5; | static const double PAL__DR2AS = 2.0626480624709635515647335733077861319665 970087963e5; | |||
/* Arcseconds to radians */ | /* Arcseconds to radians */ | |||
static const double PAL__DAS2R = 4.8481368110953599358991410235794797595635 330237270e-6; | static const double PAL__DAS2R = 4.8481368110953599358991410235794797595635 330237270e-6; | |||
/* Radians to hours */ | ||||
static const double PAL__DR2H = 3.81971863420548805845321032094034468882703 | ||||
14977709; | ||||
/* Radians to seconds of time */ | ||||
static const double PAL__DR2S = 1.37509870831397570104315571553852408797773 | ||||
13391975e4; | ||||
/* Start of SLA modified Julian date epoch */ | /* Start of SLA modified Julian date epoch */ | |||
static const double PAL__MJD0 = 2400000.5; | static const double PAL__MJD0 = 2400000.5; | |||
/* Light time for 1 AU (sec) */ | /* Light time for 1 AU (sec) */ | |||
static const double PAL__CR = 499.004782; | 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 | /* Km per sec to AU per tropical century | |||
= 86400 * 36524.2198782 / 149597870 */ | = 86400 * 36524.2198782 / 149597870 */ | |||
static const double PAL__VF = 21.095; | static const double PAL__VF = 21.095; | |||
/* Radians per year to arcsec per century. Note - must be a macro since | /* Radians per year to arcsec per century. This needs to be a macro since | |||
its value is not a literal constant (i.e. it refers to PAL__D2PI). */ | it | |||
#define PAL__PMF (100.0*60.0*60.0*360.0/PAL__D2PI) | 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 | /* Mean sidereal rate - the rotational angular velocity of Earth | |||
in radians/sec from IERS Conventions (2003). */ | in radians/sec from IERS Conventions (2003). */ | |||
static const double PAL__SR = 7.2921150e-5; | static const double PAL__SR = 7.2921150e-5; | |||
/* Gaussian gravitational constant (exact) */ | ||||
static const double PAL__GCON = 0.01720209895; | ||||
/* DNINT(A) - round to nearest whole number (double) */ | /* DNINT(A) - round to nearest whole number (double) */ | |||
#define DNINT(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5)) | #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 ) | ||||
/* We actually prefer to use C99 copysign() but we define this here as a ba | ||||
ckup | ||||
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 | #endif | |||
End of changes. 7 change blocks. | ||||
3 lines changed or deleted | 30 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |