Path: blob/main/astro/libnova/files/patch-src_precession.c
16147 views
--- src/precession.c.orig 2011-07-28 11:02:50 UTC1+++ src/precession.c2@@ -82,21 +82,21 @@ void ln_get_equ_prec (struct ln_equ_posn3theta = ln_deg_to_rad (theta);45/* calc A,B,C equ 20.4 */6- A = cosl (mean_dec) * sinl (mean_ra + zeta);7- B = cosl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) - sinl (theta) * sinl (mean_dec);8- C = sinl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) + cosl (theta) * sinl (mean_dec);9+ A = cos (mean_dec) * sin (mean_ra + zeta);10+ B = cos (theta) * cos (mean_dec) * cos (mean_ra + zeta) - sin (theta) * sin (mean_dec);11+ C = sin (theta) * cos (mean_dec) * cos (mean_ra + zeta) + cos (theta) * sin (mean_dec);1213- ra = atan2l (A,B) + eta;14+ ra = atan2 (A,B) + eta;1516/* check for object near celestial pole */17if (mean_dec > (0.4 * M_PI) || mean_dec < (-0.4 * M_PI)) {18/* close to pole */19- dec = acosl (sqrt(A * A + B * B));20+ dec = acos (sqrt(A * A + B * B));21if (mean_dec < 0.)22dec *= -1; /* 0 <= acos() <= PI */23} else {24/* not close to pole */25- dec = asinl (C);26+ dec = asin (C);27}2829/* change to degrees */30@@ -140,21 +140,21 @@ void ln_get_equ_prec2 (struct ln_equ_pos31theta = ln_deg_to_rad (theta);3233/* calc A,B,C equ 20.4 */34- A = cosl (mean_dec) * sinl (mean_ra + zeta);35- B = cosl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) - sinl (theta) * sinl (mean_dec);36- C = sinl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) + cosl (theta) * sinl (mean_dec);37+ A = cos (mean_dec) * sin (mean_ra + zeta);38+ B = cos (theta) * cos (mean_dec) * cos (mean_ra + zeta) - sin (theta) * sin (mean_dec);39+ C = sin (theta) * cos (mean_dec) * cos (mean_ra + zeta) + cos (theta) * sin (mean_dec);4041- ra = atan2l (A,B) + eta;42+ ra = atan2 (A,B) + eta;4344/* check for object near celestial pole */45if (mean_dec > (0.4 * M_PI) || mean_dec < (-0.4 * M_PI)) {46/* close to pole */47- dec = acosl (sqrt(A * A + B * B));48+ dec = acos (sqrt(A * A + B * B));49if (mean_dec < 0.)50dec *= -1; /* 0 <= acos() <= PI */51} else {52/* not close to pole */53- dec = asinl (C);54+ dec = asin (C);55}5657/* change to degrees */585960