diff options
author | Xin LI <delphij@FreeBSD.org> | 2006-08-18 18:15:16 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2006-08-18 18:15:16 +0000 |
commit | d1385d97b195df1ad9cf4c48846e3bbd418124f6 (patch) | |
tree | 1ad621d108264b6a7c86a560bf25ad726dd9744f /astro/libnova/files | |
parent | f030a858def7259541e9ff40bd3859a813ac622d (diff) |
Notes
Diffstat (limited to 'astro/libnova/files')
-rw-r--r-- | astro/libnova/files/patch-src_precession.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/astro/libnova/files/patch-src_precession.c b/astro/libnova/files/patch-src_precession.c new file mode 100644 index 000000000000..0f7784f12cef --- /dev/null +++ b/astro/libnova/files/patch-src_precession.c @@ -0,0 +1,58 @@ +--- src/precession.c.orig Tue Jan 10 23:35:08 2006 ++++ src/precession.c Tue Aug 15 18:03:50 2006 +@@ -56,21 +56,21 @@ + theta = ln_deg_to_rad (theta); + + /* calc A,B,C equ 20.4 */ +- A = cosl (mean_dec) * sinl (mean_ra + zeta); +- B = cosl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) - sinl (theta) * sinl (mean_dec); +- C = sinl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) + cosl (theta) * sinl (mean_dec); ++ A = cos (mean_dec) * sin (mean_ra + zeta); ++ B = cos (theta) * cos (mean_dec) * cos (mean_ra + zeta) - sin (theta) * sin (mean_dec); ++ C = sin (theta) * cos (mean_dec) * cos (mean_ra + zeta) + cos (theta) * sin (mean_dec); + +- ra = atan2l (A,B) + eta; ++ ra = atan2 (A,B) + eta; + + /* check for object near celestial pole */ + if (mean_dec > (0.4 * M_PI) || mean_dec < (-0.4 * M_PI)) { + /* close to pole */ +- dec = acosl (sqrt(A * A + B * B)); ++ dec = acos (sqrt(A * A + B * B)); + if (mean_dec < 0.) + dec *= -1; /* 0 <= acos() <= PI */ + } else { + /* not close to pole */ +- dec = asinl (C); ++ dec = asin (C); + } + + /* change to degrees */ +@@ -114,21 +114,21 @@ + theta = ln_deg_to_rad (theta); + + /* calc A,B,C equ 20.4 */ +- A = cosl (mean_dec) * sinl (mean_ra + zeta); +- B = cosl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) - sinl (theta) * sinl (mean_dec); +- C = sinl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) + cosl (theta) * sinl (mean_dec); ++ A = cos (mean_dec) * sin (mean_ra + zeta); ++ B = cos (theta) * cos (mean_dec) * cos (mean_ra + zeta) - sin (theta) * sin (mean_dec); ++ C = sin (theta) * cos (mean_dec) * cos (mean_ra + zeta) + cos (theta) * sin (mean_dec); + +- ra = atan2l (A,B) + eta; ++ ra = atan2 (A,B) + eta; + + /* check for object near celestial pole */ + if (mean_dec > (0.4 * M_PI) || mean_dec < (-0.4 * M_PI)) { + /* close to pole */ +- dec = acosl (sqrt(A * A + B * B)); ++ dec = acos (sqrt(A * A + B * B)); + if (mean_dec < 0.) + dec *= -1; /* 0 <= acos() <= PI */ + } else { + /* not close to pole */ +- dec = asinl (C); ++ dec = asin (C); + } + + /* change to degrees */ |