slight modifications to precess.c/astro.h

. fixed typo in TWOPI definition

. radarcsec and arcsecrad changed from constants to macros
This commit is contained in:
francois.meyer 2021-12-18 13:09:05 +00:00
parent dbbcd2b3bc
commit 77207c8a4d
2 changed files with 6 additions and 6 deletions

View File

@ -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))

View File

@ -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 */