From 5317eae6eb1501a9ff2959395b71bf715a15d1ff Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Mon, 24 Jan 2022 16:08:40 -0500 Subject: [PATCH] Add quick test showing Pluto jump in year 2247 --- tests/output.expected | 4 ++++ tests/test.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/tests/output.expected b/tests/output.expected index c459432..9193548 100644 --- a/tests/output.expected +++ b/tests/output.expected @@ -13,3 +13,7 @@ RA +5.0000000000000000 -> +4.9986250865903390 Dec -5.0000000000000000 -> +1.2835978054231891 RA +6.0000000000000000 -> +6.0032362075042789 Dec -6.0000000000000000 -> +0.2845854258344847 + +Pluto discontinuity when Chapront (1995) ends on 2247/10/1 +RA = 16:52:53.80 +RA = 11:52:36.32 diff --git a/tests/test.c b/tests/test.c index 39c1871..64ffb70 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1,6 +1,8 @@ #include "astro.h" int main() { + char out[1024]; + printf("Precession J2000 -> J2015\n"); double ra, pra; double dec, pdec; @@ -11,5 +13,36 @@ int main() { printf("RA %+.16f -> %+.16f\n", ra, pra); printf("Dec %+.16f -> %+.16f\n", dec, pdec); } + + printf("\nPluto discontinuity when Chapront (1995) ends on 2247/10/1\n"); + double mjd0, mjd1; + cal_mjd(5, 16, 2247, &mjd0); + cal_mjd(9, 27, 2248, &mjd1); + Now n; + n.n_lat = n.n_lng = n.n_tz = n.n_temp = n.n_pressure = n.n_elev + = n.n_dip = 0.0; + n.n_epoch = J2000; + Obj o; + o.o_type = PLANET; + o.pl_code = PLUTO; + o.pl_moon = X_PLANET; + + n.n_mjd = mjd0; + obj_cir(&n, &o); + fs_sexa(out, radhr(o.s_gaera), 2, 360000); + printf("RA = %s\n", out); + + n.n_mjd = mjd1; + obj_cir(&n, &o); + fs_sexa(out, radhr(o.s_gaera), 2, 360000); + printf("RA = %s\n", out); + +/* From Elwood's email: +5/16/2247 00:00 UTC 4.1.0 RA 16:52:53.90 Dec -10:36:26.5 + 3.6.7 RA 16:52:53.90 Dec -10:36:26.5 +9/27/2248 00:00 UTC 4.1.0 RA 11:52:36.30 Dec 16:13:59.6 + 3.6.7 RA 16:46:16.01 Dec -11:05:43.7 +*/ + return 0; }