From 77207c8a4d7da3dd7ae890f857112f0c691fce0c Mon Sep 17 00:00:00 2001 From: "francois.meyer" Date: Sat, 18 Dec 2021 13:09:05 +0000 Subject: [PATCH] slight modifications to precess.c/astro.h . fixed typo in TWOPI definition . radarcsec and arcsecrad changed from constants to macros --- libastro/astro.h | 6 +++--- libastro/precess.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libastro/astro.h b/libastro/astro.h index b435e04..6557fad 100644 --- a/libastro/astro.h +++ b/libastro/astro.h @@ -8,14 +8,14 @@ #endif #ifndef TWOPI -#define TWOPI 6.283185307179586577 +#define TWOPI 6.283185307179586477 #endif /* conversions among hours (of ra), degrees and radians. */ #define degrad(x) ((x)*PI/180.) #define raddeg(x) ((x)*180./PI) -#define radarcsec (2.06264806247096355e5) -#define arcsecrad (4.84813681109535994e-6) +#define radarcsec(x) ((x)*2.06264806247096355e5) +#define arcsecrad(x) ((x)*4.84813681109535993e-6) #define hrdeg(x) ((x)*15.) #define deghr(x) ((x)/15.) #define hrrad(x) degrad(hrdeg(x)) diff --git a/libastro/precess.c b/libastro/precess.c index 65c4b79..38f38ce 100644 --- a/libastro/precess.c +++ b/libastro/precess.c @@ -30,9 +30,9 @@ double equinox, double *alpha, double *delta, int dir /* Astronomical Ephemeris 2020, p. B25 */ /* and convert them to radians */ - zeta_A= (2.650545 + T*(2306.083227+T*(0.2988499 + T*(0.01801828 +T*(-5.971e-6-3.173e-7*T)))))*arcsecrad; - z_A= (-2.650545+T*(2306.077181+T*(1.0927348+T*(0.01826837 +T*(-28.596e-6-2.904e-7*T)))))*arcsecrad; - theta_A=(T*(2004.191903-T*(0.4294934+T*(0.04182264+T*(7.089e-6+1.274e-7*T)))))*arcsecrad; + zeta_A= arcsecrad(2.650545 + T*(2306.083227+T*(0.2988499 + T*(0.01801828 +T*(-5.971e-6-3.173e-7*T))))); + z_A= arcsecrad(-2.650545+T*(2306.077181+T*(1.0927348+T*(0.01826837 +T*(-28.596e-6-2.904e-7*T))))); + theta_A=arcsecrad(T*(2004.191903-T*(0.4294934+T*(0.04182264+T*(7.089e-6+1.274e-7*T))))); if (dir<0){ /* If dir is negative, go from equinox to 2000.0 */