From 819e59745d495ccdbd215a1d9e3591ea6f3c993c Mon Sep 17 00:00:00 2001 From: Don Cross Date: Sun, 5 Jan 2020 20:44:29 -0500 Subject: [PATCH] Decreased Neptune apsis prediction errors from 49.25 days to 15.45 days. Include an extra 4 terms in the radial component of the VSOP model for Neptune. The code automatically picks the 4 terms that maximize the time derivative's highest possible contribution. --- generate/dotnet/csharp_test/csharp_test.cs | 4 +- generate/generate.c | 134 ++++++++++++++++++++- generate/output/vsop_7.txt | 7 +- generate/vsop/vsop.c | 2 +- generate/vsop/vsop.h | 2 +- source/c/astronomy.c | 9 +- source/csharp/astronomy.cs | 7 +- source/js/astronomy.js | 7 +- source/js/astronomy.min.js | 119 +++++++++--------- source/python/astronomy.py | 7 +- 10 files changed, 227 insertions(+), 71 deletions(-) diff --git a/generate/dotnet/csharp_test/csharp_test.cs b/generate/dotnet/csharp_test/csharp_test.cs index 8dc88e4f..39b69f8d 100644 --- a/generate/dotnet/csharp_test/csharp_test.cs +++ b/generate/dotnet/csharp_test/csharp_test.cs @@ -977,14 +977,14 @@ namespace csharp_test double mag_diff = Math.Abs(illum.mag - data.mag); if (mag_diff > 1.0e-8) { - Console.WriteLine("ERROR: Excessive magnitude error {0}", mag_diff); + Console.WriteLine("CheckSaturn ERROR: Excessive magnitude error {0}", mag_diff); return 1; } double tilt_diff = Math.Abs(illum.ring_tilt - data.tilt); if (tilt_diff > 1.0e-8) { - Console.WriteLine("ERROR: Excessive ring tilt error {0}", tilt_diff); + Console.WriteLine("CheckSaturn ERROR: Excessive ring tilt error {0}", tilt_diff); return 1; } } diff --git a/generate/generate.c b/generate/generate.c index 2bafa490..f67d5a81 100644 --- a/generate/generate.c +++ b/generate/generate.c @@ -86,6 +86,7 @@ static vsop_body_t LookupBody(const char *name); static int CheckSkyPos(observer *location, const char *filename, int lnum, const char *line, double *arcmin_equ, double *arcmin_hor, vsop_body_t *body); static int UnitTestChebyshev(void); static int DistancePlot(const char *name, double tt1, double tt2); +static int ImproveVsopApsides(vsop_model_t *model); #define MOON_PERIGEE 0.00238 #define MERCURY_APHELION 0.466697 @@ -313,7 +314,9 @@ static int SearchVsop(int body) winner_terms = trunc_terms; winner_arcmin = max_arcmin; winner_threshold = threshold; - + error = ImproveVsopApsides(&model); + if (error) goto fail; + VsopTrim(&model); /* shave off all trailing empty series right before saving */ error = SaveVsopFile(&model); if (error) goto fail; } @@ -367,7 +370,6 @@ static int TestVsopModel(vsop_model_t *model, int body, double threshold, double error = VsopTruncate(model, jdStart, jdStop, threshold); if (error) goto fail; - VsopTrim(model); *trunc_terms = VsopTermCount(model); for (jd = jdStart; jd <= jdStop; jd += jdDelta) @@ -389,6 +391,134 @@ fail: return error; } +#if 0 +static void ExpandAllSeries(vsop_formula_t *formula, int nterms) +{ + int s; + + for (s=0; s < formula->nseries_calc; ++s) + { + vsop_series_t *series = &formula->series[s]; + series->nterms_calc += nterms; + if (series->nterms_calc > series->nterms_total) + series->nterms_calc = series->nterms_total; + } +} +#endif + +static int TermContribution(const vsop_term_t *term, int sindex, double *contrib) +{ + switch (sindex) + { + case 0: + /* t^0 term has derivative proprotional to amplitude*frequency */ + *contrib = fabs(term->amplitude * term->frequency); + return 0; + + default: + fprintf(stderr, "TermContribution: t^%d derivative rule not yet implemented.\n", sindex); + *contrib = NAN; + return 1; + } +} + +static int ExpandSeries(vsop_formula_t *formula, int sindex, int n_top_terms) +{ + int error; + vsop_series_t *series; + int t, t_best, n; + double contrib, max_contrib; + + /* + Examine the specified truncated series in the given formula. + Calculate an estimate of the contribution of every term's + first derivative. Pick n_top_terms of the most important ones. + */ + + if (sindex < 0 || sindex >= formula->nseries_calc) + { + fprintf(stderr, "ExpandSeries: Invalid series index %d\n", sindex); + return 1; + } + + series = &formula->series[sindex]; + if (series->nterms_calc + n_top_terms >= series->nterms_total) + { + fprintf(stderr, "ExpandSeries: series calc=%d, total=%d; cannot expand by %d\n", + series->nterms_calc, series->nterms_total, n_top_terms); + return 1; + } + + for (n=0; n < n_top_terms; ++n) + { + /* Iterate through the truncated terms at the end of this series. */ + /* Pick the one whose contribution is greatest and append it next. */ + t_best = -1; + max_contrib = 0.0; + for (t = series->nterms_calc; t < series->nterms_total; ++t) + { + CHECK(TermContribution(&series->term[t], sindex, &contrib)); + if (contrib > max_contrib) + { + t_best = t; + max_contrib = contrib; + } + } + if (t_best < 0) + { + fprintf(stderr, "ExpandSeries: Found only %d of %d top terms\n", n, n_top_terms); + return 1; + } + /* Like bubble sort: swap best with whatever is already just beyond the truncation. */ + if (t_best != series->nterms_calc) + { + vsop_term_t swap = series->term[series->nterms_calc]; + series->term[series->nterms_calc] = series->term[t_best]; + series->term[t_best] = swap; + } + ++(series->nterms_calc); + } + + error = 0; +fail: + return error; +} + +static int ImproveVsopApsides(vsop_model_t *model) +{ + int error; + vsop_formula_t *radform; /* formula for calculating radial distance */ + + if (model->version != VSOP_HELIO_SPHER_DATE && model->version != VSOP_HELIO_SPHER_J2000) + { + fprintf(stderr, "ImproveVsopApsides: Cannot optimize VSOP version %d\n", model->version); + error = 1; + goto fail; + } + + if (model->ncoords != 3) + { + fprintf(stderr, "ImproveVsopApsides: INTERNAL ERROR: model has incorrect number of coordinates: %d\n", model->ncoords); + error = 1; + goto fail; + } + + radform = &model->formula[2]; + + switch (model->body) + { + case BODY_NEPTUNE: + CHECK(ExpandSeries(radform, 0, 5)); + break; + default: + break; + } + + error = 0; +fail: + return error; +} + static int BuildVsopData(void) { int body; diff --git a/generate/output/vsop_7.txt b/generate/output/vsop_7.txt index 0965f0a6..597cc623 100644 --- a/generate/output/vsop_7.txt +++ b/generate/output/vsop_7.txt @@ -23,7 +23,7 @@ TRUNC_VSOP87 version=2 body=7 ncoords=3 3 0.00015355489 2.52123799551 36.64856292950 4 0.00015448133 3.50877079215 39.61750834610 coord=2, nseries=1 - series=0, nterms=7 + series=0, nterms=12 0 30.07013205828 0.00000000000 0.00000000000 1 0.27062259632 1.32999459377 38.13303563780 2 0.01691764014 3.25186135653 36.64856292950 @@ -31,3 +31,8 @@ TRUNC_VSOP87 version=2 body=7 ncoords=3 4 0.00537760510 4.52113935896 35.16409022120 5 0.00495725141 1.57105641650 491.55792945680 6 0.00274571975 1.84552258866 175.16605980020 + 7 0.00012012320 1.92059384991 1021.24889455140 + 8 0.00121801746 5.79754470298 76.26607127560 + 9 0.00100896068 0.37702724930 73.29712585900 + 10 0.00135134092 3.37220609835 39.61750834610 + 11 0.00007571796 1.07149207335 388.46515523820 diff --git a/generate/vsop/vsop.c b/generate/vsop/vsop.c index 46531242..6b95986e 100644 --- a/generate/vsop/vsop.c +++ b/generate/vsop/vsop.c @@ -155,7 +155,7 @@ int VsopLoadModel(vsop_model_t *model, const char *inFileName) if (length < 131 || 3 != sscanf(&line[79], "%lf %lf %lf", &A, &B, &C)) { - fprintf(stderr, "VsopLoadModel: bad data record: line %d, flie '%s'\n", lnum, inFileName); + fprintf(stderr, "VsopLoadModel: bad data record: line %d, file '%s'\n", lnum, inFileName); goto fail; } series->term[termcount].amplitude = A; diff --git a/generate/vsop/vsop.h b/generate/vsop/vsop.h index e3faf315..6d9af10d 100644 --- a/generate/vsop/vsop.h +++ b/generate/vsop/vsop.h @@ -59,7 +59,7 @@ typedef enum /* values created for compatibility with NOVAS; these are *NOT* VSOP_SATURN = 5, VSOP_URANUS = 6, VSOP_NEPTUNE = 7, - // NOTE: VSOP does not provide Pluto or Moon. + /* NOTE: VSOP does not provide Pluto or Moon. */ VSOP_SUN = 10, VSOP_EARTH = 11, /* weird value so as not to conflict with NOVAS body values */ } diff --git a/source/c/astronomy.c b/source/c/astronomy.c index 32d2c6cd..dfb3b66d 100644 --- a/source/c/astronomy.c +++ b/source/c/astronomy.c @@ -2414,12 +2414,17 @@ static const vsop_term_t vsop_rad_Neptune_0[] = { 0.00807830553, 5.18592878704, 1.48447270830 }, { 0.00537760510, 4.52113935896, 35.16409022120 }, { 0.00495725141, 1.57105641650, 491.55792945680 }, - { 0.00274571975, 1.84552258866, 175.16605980020 } + { 0.00274571975, 1.84552258866, 175.16605980020 }, + { 0.00012012320, 1.92059384991, 1021.24889455140 }, + { 0.00121801746, 5.79754470298, 76.26607127560 }, + { 0.00100896068, 0.37702724930, 73.29712585900 }, + { 0.00135134092, 3.37220609835, 39.61750834610 }, + { 0.00007571796, 1.07149207335, 388.46515523820 } }; static const vsop_series_t vsop_rad_Neptune[] = { - { 7, vsop_rad_Neptune_0 } + { 12, vsop_rad_Neptune_0 } }; ; diff --git a/source/csharp/astronomy.cs b/source/csharp/astronomy.cs index a7a08f4f..1217d59b 100644 --- a/source/csharp/astronomy.cs +++ b/source/csharp/astronomy.cs @@ -2326,7 +2326,12 @@ namespace CosineKitty new vsop_term_t(0.00807830553, 5.18592878704, 1.48447270830), new vsop_term_t(0.00537760510, 4.52113935896, 35.16409022120), new vsop_term_t(0.00495725141, 1.57105641650, 491.55792945680), - new vsop_term_t(0.00274571975, 1.84552258866, 175.16605980020) + new vsop_term_t(0.00274571975, 1.84552258866, 175.16605980020), + new vsop_term_t(0.00012012320, 1.92059384991, 1021.24889455140), + new vsop_term_t(0.00121801746, 5.79754470298, 76.26607127560), + new vsop_term_t(0.00100896068, 0.37702724930, 73.29712585900), + new vsop_term_t(0.00135134092, 3.37220609835, 39.61750834610), + new vsop_term_t(0.00007571796, 1.07149207335, 388.46515523820) }; private static readonly vsop_series_t[] vsop_rad_Neptune = new vsop_series_t[] diff --git a/source/js/astronomy.js b/source/js/astronomy.js index 2b39fb3c..6c655767 100644 --- a/source/js/astronomy.js +++ b/source/js/astronomy.js @@ -834,7 +834,12 @@ const vsop = { [0.00807830553, 5.18592878704, 1.48447270830], [0.00537760510, 4.52113935896, 35.16409022120], [0.00495725141, 1.57105641650, 491.55792945680], - [0.00274571975, 1.84552258866, 175.16605980020] + [0.00274571975, 1.84552258866, 175.16605980020], + [0.00012012320, 1.92059384991, 1021.24889455140], + [0.00121801746, 5.79754470298, 76.26607127560], + [0.00100896068, 0.37702724930, 73.29712585900], + [0.00135134092, 3.37220609835, 39.61750834610], + [0.00007571796, 1.07149207335, 388.46515523820] ] ] ] diff --git a/source/js/astronomy.min.js b/source/js/astronomy.min.js index 6c3537cc..eb44d8c9 100644 --- a/source/js/astronomy.min.js +++ b/source/js/astronomy.min.js @@ -91,62 +91,63 @@ A={Mercury:[[[[4.40250710144,0,0],[.40989414977,1.48302034195,26087.9031415742], 1.99809394714,1.4844727083],[.00161858838,2.79137786799,148.0787244263],[.00143706183,1.38368544947,11.0457002639],[9.3192405E-4,.17437220467,36.6485629295],[7.1424548E-4,4.24509236074,224.3447957019],[8.9806014E-4,3.66105364565,109.9456887885],[3.9009723E-4,1.66971401684,70.8494453042],[4.6677296E-4,1.39976401694,35.1640902212],[3.9025624E-4,3.36234773834,277.0349937414],[3.6755274E-4,3.88649278513,146.594251718],[3.0348723E-4,.70100838798,151.0476698429],[2.9156413E-4,3.180563367,77.7505439839]], [[.01479896629,3.67205697578,74.7815985673]]]],Neptune:[[[[5.31188633046,0,0],[.0179847553,2.9010127389,38.1330356378],[.01019727652,.48580922867,1.4844727083],[.00124531845,4.83008090676,36.6485629295],[4.2064466E-4,5.41054993053,2.9689454166],[3.7714584E-4,6.09221808686,35.1640902212],[3.3784738E-4,1.24488874087,76.2660712756],[1.6482741E-4,7.727998E-5,491.5579294568],[9.198584E-5,4.93747051954,39.6175083461],[8.99425E-5,.27462171806,175.1660598002]],[[38.13303563957,0,0],[1.6604172E-4,4.86323329249, 1.4844727083],[1.5744045E-4,2.27887427527,38.1330356378]]],[[[.03088622933,1.44104372644,38.1330356378],[2.7780087E-4,5.91271884599,76.2660712756],[2.7623609E-4,0,0],[1.5355489E-4,2.52123799551,36.6485629295],[1.5448133E-4,3.50877079215,39.6175083461]]],[[[30.07013205828,0,0],[.27062259632,1.32999459377,38.1330356378],[.01691764014,3.25186135653,36.6485629295],[.00807830553,5.18592878704,1.4844727083],[.0053776051,4.52113935896,35.1640902212],[.00495725141,1.5710564165,491.5579294568],[.00274571975, -1.84552258866,175.1660598002]]]]},ja={Pluto:[{tt:-109573.5,ndays:26141,coeff:[[-30.303124711144,-18.980368465705,3.206649343866],[20.092745278347,-27.533908687219,-14.64112196599],[9.137264744925,6.513103657467,-.720732357468],[-1.201554708717,2.149917852301,1.032022293526],[-.566068170022,-.285737361191,.081379987808],[.041678527795,-.14336310504,-.057534475984],[.041087908142,.00791132158,-.010270655537],[.001611769878,.011409821837,.003679980733],[-.002536458296,-1.45632543E-4,9.4992403E-4],[.001167651969, --4.991268E-5,1.1586771E-4],[-1.96953286E-4,4.2040627E-4,1.10147171E-4],[.001073825784,4.42658285E-4,1.46985332E-4],[-9.06160087E-4,.001702360394,7.58987924E-4],[-.001467464335,-6.22191266E-4,-2.31866243E-4],[-8.986691E-6,4.086384E-6,1.442956E-6],[-.001099078039,-5.44633529E-4,-2.05534708E-4],[.001259974751,-.002178533187,-9.65315934E-4],[.001695288316,7.68480768E-4,2.87916141E-4],[-.001428026702,.002707551594,.001195955756]]},{tt:-83432.5,ndays:26141,coeff:[[67.049456204563,-9.279626603192,-23.091941092128], -[14.860676672314,26.594121136143,3.819668867047],[-6.25440904412,1.408757903538,2.323726101433],[.114416381092,-.942273228585,-.328566335886],[.074973631246,.106749156044,.010806547171],[-.018627741964,-.009983491157,.002589955906],[.006167206174,-.001042430439,-.001521881831],[-4.71293617E-4,.002337935239,.001060879763],[-2.40627462E-4,-.001380351742,-5.4604259E-4],[.001872140444,6.7987662E-4,2.40384842E-4],[-3.34705177E-4,6.9352833E-4,3.01138309E-4],[7.96124758E-4,6.53183163E-4,2.59527079E-4],[-.001276116664, -.001393959948,6.29574865E-4],[-.001235158458,-8.89985319E-4,-3.51392687E-4],[-1.9881944E-5,4.8339979E-5,2.1342186E-5],[-9.87113745E-4,-7.48420747E-4,-2.96503569E-4],[.001721891782,-.001893675502,-8.54270937E-4],[.001505145187,.001081653337,4.2672364E-4],[-.002019479384,.002375617497,.001068258925]]},{tt:-57291.5,ndays:26141,coeff:[[46.038290912405,73.773759757856,9.148670950706],[-22.354364534703,10.217143138926,9.921247676076],[-2.696282001399,-4.440843715929,-.57237303784],[.3854758188,-.287872688575, --.205914693555],[.020994433095,.004256602589,-.004817361041],[.003212255378,5.74875698E-4,-7.6446437E-4],[-1.58619286E-4,-.001035559544,-5.35612316E-4],[9.67952107E-4,-6.53111849E-4,-2.9201975E-4],[.001763494906,-3.70815938E-4,-2.24698363E-4],[.00115799033,.001849810828,7.59641577E-4],[-8.83535516E-4,3.84038162E-4,1.91242192E-4],[7.09486562E-4,6.55810827E-4,2.65431131E-4],[-.001525810419,.001126870468,5.20202001E-4],[-9.8321086E-4,-.001116073455,-4.56026382E-4],[-1.565545E-5,6.9184008E-5,2.9796623E-5], -[-8.15102021E-4,-9.0059701E-4,-3.65274209E-4],[.002090300438,-.001536778673,-7.09827438E-4],[.001234661297,.001342978436,5.45313112E-4],[-.002517963678,.001941826791,8.9385986E-4]]},{tt:-31150.5,ndays:26141,coeff:[[-39.074661990988,30.963513412373,21.431709298065],[-12.033639281924,-31.69367913231,-6.263961539568],[7.233936758611,-3.979157072767,-3.421027935569],[1.383182539917,1.0907297934,-.076771771448],[-.009894394996,.313614402007,.101180677344],[-.055459383449,.031782406403,.026374448864],[-.011074105991, --.007176759494,.001896208351],[-2.63363398E-4,-.001145329444,2.15471838E-4],[4.05700185E-4,-8.39229891E-4,-4.18571366E-4],[.001004921401,.001135118493,4.06734549E-4],[-4.73938695E-4,2.82751002E-4,1.14911593E-4],[5.28685886E-4,9.66635293E-4,4.01955197E-4],[-.001838869845,8.06432189E-4,3.94594478E-4],[-7.13122169E-4,-.001334810971,-5.54511235E-4],[6.449359E-6,6.073E-5,2.451323E-5],[-5.96025142E-4,-9.9949277E-4,-4.13930406E-4],[.002364904429,-.001099236865,-5.28480902E-4],[9.07458104E-4,.001537243912, -6.37001965E-4],[-.002909908764,.001413648354,6.77030924E-4]]},{tt:-5009.5,ndays:26141,coeff:[[23.380075041204,-38.969338804442,-19.204762094135],[33.437140696536,8.735194448531,-7.348352917314],[-3.127251304544,8.324311848708,3.540122328502],[-1.491354030154,-1.350371407475,.028214278544],[.361398480996,-.118420687058,-.14537560548],[-.011771350229,.085880588309,.030665997197],[-.015839541688,-.014165128211,5.23465951E-4],[.004213218926,-.001426373728,-.001906412496],[.001465150002,4.51513538E-4, -8.1936194E-5],[6.40069511E-4,.001886692235,8.84675556E-4],[-8.8355494E-4,3.01907356E-4,1.27310183E-4],[2.45524038E-4,9.10362686E-4,3.85555148E-4],[-.001942010476,4.3868228E-4,2.37124027E-4],[-4.2545566E-4,-.001442138768,-6.0775139E-4],[4.168433E-6,3.3856562E-5,1.3881811E-5],[-3.37920193E-4,-.001074290356,-4.52503056E-4],[.002544755354,-6.20356219E-4,-3.27246228E-4],[5.3453411E-4,.001670320887,7.02775941E-4],[-.00316938027,8.16186705E-4,4.27213817E-4]]},{tt:21131.5,ndays:26141,coeff:[[74.130449310804, -43.372111541004,-8.799489207171],[-8.705941488523,23.344631690845,9.908006472122],[-4.614752911564,-2.587334376729,.583321715294],[.316219286624,-.395448970181,-.219217574801],[.004593734664,.027528474371,.00773619728],[-.001192268851,-.004987723997,-.001599399192],[.003051998429,-.001287028653,-7.80744058E-4],[.001482572043,.001613554244,6.35747068E-4],[5.81965277E-4,7.88286674E-4,3.15285159E-4],[-3.1183073E-4,.00162236993,7.14817617E-4],[-7.11275723E-4,-1.60014561E-4,-5.0445901E-5],[1.77159088E-4, -.001032713853,4.35835541E-4],[-.00203228082,1.44281331E-4,1.11910344E-4],[-1.48463759E-4,-.001495212309,-6.35892081E-4],[-9.629403E-6,-1.3678407E-5,-6.187457E-6],[-6.1196084E-5,-.00111978352,-4.79221572E-4],[.002630993795,-1.13042927E-4,-1.12115452E-4],[1.32867113E-4,.001741417484,7.4322463E-4],[-.003293498893,1.82437998E-4,1.58073228E-4]]},{tt:47272.5,ndays:26141,coeff:[[-5.727994625506,71.194823351703,23.946198176031],[-26.767323214686,-12.26494930278,4.238297122007],[.89059620425,-5.970227904551, --2.131444078785],[.808383708156,-.143104108476,-.288102517987],[.089303327519,.049290470655,-.010970501667],[.010197195705,.0128797214,.00131758674],[.001795282629,.00448240378,.001563326157],[-.001974716105,.001278073933,6.52735133E-4],[9.06544715E-4,-8.05502229E-4,-3.36200833E-4],[2.83816745E-4,.001799099064,7.56827653E-4],[-7.84971304E-4,1.2308122E-4,6.8812133E-5],[-2.37033406E-4,9.80100466E-4,4.27758498E-4],[-.001976846386,-2.80421081E-4,-7.2417045E-5],[1.95628511E-4,-.001446079585,-6.24011074E-4], -[-4.4622337E-5,-3.5865046E-5,-1.3581236E-5],[2.04397832E-4,-.001127474894,-4.88668673E-4],[.002625373003,3.89300123E-4,1.02756139E-4],[-2.77321614E-4,.001732818354,7.49576471E-4],[-.003280537764,-4.57571669E-4,-1.16383655E-4]]}]},r=[{mjd:-72638,dt:38},{mjd:-65333,dt:26},{mjd:-58028,dt:21},{mjd:-50724,dt:21.1},{mjd:-43419,dt:13.5},{mjd:-39766,dt:13.7},{mjd:-36114,dt:14.8},{mjd:-32461,dt:15.7},{mjd:-28809,dt:15.6},{mjd:-25156,dt:13.3},{mjd:-21504,dt:12.6},{mjd:-17852,dt:11.2},{mjd:-14200,dt:11.13}, -{mjd:-10547,dt:7.95},{mjd:-6895,dt:6.22},{mjd:-3242,dt:6.55},{mjd:-1416,dt:7.26},{mjd:410,dt:7.35},{mjd:2237,dt:5.92},{mjd:4063,dt:1.04},{mjd:5889,dt:-3.19},{mjd:7715,dt:-5.36},{mjd:9542,dt:-5.74},{mjd:11368,dt:-5.86},{mjd:13194,dt:-6.41},{mjd:15020,dt:-2.7},{mjd:16846,dt:3.92},{mjd:18672,dt:10.38},{mjd:20498,dt:17.19},{mjd:22324,dt:21.41},{mjd:24151,dt:23.63},{mjd:25977,dt:24.02},{mjd:27803,dt:23.91},{mjd:29629,dt:24.35},{mjd:31456,dt:26.76},{mjd:33282,dt:29.15},{mjd:35108,dt:31.07},{mjd:36934,dt:33.15}, -{mjd:38761,dt:35.738},{mjd:40587,dt:40.182},{mjd:42413,dt:45.477},{mjd:44239,dt:50.54},{mjd:44605,dt:51.3808},{mjd:44970,dt:52.1668},{mjd:45335,dt:52.9565},{mjd:45700,dt:53.7882},{mjd:46066,dt:54.3427},{mjd:46431,dt:54.8712},{mjd:46796,dt:55.3222},{mjd:47161,dt:55.8197},{mjd:47527,dt:56.3},{mjd:47892,dt:56.8553},{mjd:48257,dt:57.5653},{mjd:48622,dt:58.3092},{mjd:48988,dt:59.1218},{mjd:49353,dt:59.9845},{mjd:49718,dt:60.7853},{mjd:50083,dt:61.6287},{mjd:50449,dt:62.295},{mjd:50814,dt:62.9659},{mjd:51179, -dt:63.4673},{mjd:51544,dt:63.8285},{mjd:51910,dt:64.0908},{mjd:52275,dt:64.2998},{mjd:52640,dt:64.4734},{mjd:53005,dt:64.5736},{mjd:53371,dt:64.6876},{mjd:53736,dt:64.8452},{mjd:54101,dt:65.1464},{mjd:54466,dt:65.4573},{mjd:54832,dt:65.7768},{mjd:55197,dt:66.0699},{mjd:55562,dt:66.3246},{mjd:55927,dt:66.603},{mjd:56293,dt:66.9069},{mjd:56658,dt:67.281},{mjd:57023,dt:67.6439},{mjd:57388,dt:68.1024},{mjd:57754,dt:68.5927},{mjd:58119,dt:68.9676},{mjd:58484,dt:69.2201},{mjd:58849,dt:69.87},{mjd:59214, -dt:70.39},{mjd:59580,dt:70.91},{mjd:59945,dt:71.4},{mjd:60310,dt:71.88},{mjd:60675,dt:72.36},{mjd:61041,dt:72.83},{mjd:61406,dt:73.32},{mjd:61680,dt:73.66}],L=function(a){if(a instanceof Date)this.date=a,this.ut=(a-aa)/864E5,this.tt=z(this.ut);else if("number"===typeof a)this.date=new Date(aa-864E5*-a),this.ut=a,this.tt=z(this.ut);else throw"Argument must be a Date object, an AstroTime object, or a numeric UTC Julian date.";};L.prototype.toString=function(){return this.date.toISOString()};L.prototype.AddDays= -function(a){return new L(this.ut+a)};d.MakeTime=function(a){return a instanceof L?a:new L(a)};var ba=[{nals:[0,0,0,0,1],cls:[-172064161,-174666,33386,92052331,9086,15377]},{nals:[0,0,2,-2,2],cls:[-13170906,-1675,-13696,5730336,-3015,-4587]},{nals:[0,0,2,0,2],cls:[-2276413,-234,2796,978459,-485,1374]},{nals:[0,0,0,0,2],cls:[2074554,207,-698,-897492,470,-291]},{nals:[0,1,0,0,0],cls:[1475877,-3633,11817,73871,-184,-1924]},{nals:[0,1,2,-2,2],cls:[-516821,1226,-524,224386,-677,-174]},{nals:[1,0,0,0,0], -cls:[711159,73,-872,-6750,0,358]},{nals:[0,0,2,0,1],cls:[-387298,-367,380,200728,18,318]},{nals:[1,0,2,0,2],cls:[-301461,-36,816,129025,-63,367]},{nals:[0,-1,2,-2,2],cls:[215829,-494,111,-95929,299,132]},{nals:[0,0,2,-2,1],cls:[128227,137,181,-68982,-9,39]},{nals:[-1,0,2,0,2],cls:[123457,11,19,-53311,32,-4]},{nals:[-1,0,0,2,0],cls:[156994,10,-168,-1235,0,82]},{nals:[1,0,0,0,1],cls:[63110,63,27,-33228,0,-9]},{nals:[-1,0,0,0,1],cls:[-57976,-63,-189,31429,0,-75]},{nals:[-1,0,2,2,2],cls:[-59641,-11,149, -25543,-11,66]},{nals:[1,0,2,0,1],cls:[-51613,-42,129,26366,0,78]},{nals:[-2,0,2,0,1],cls:[45893,50,31,-24236,-10,20]},{nals:[0,0,0,2,0],cls:[63384,11,-150,-1220,0,29]},{nals:[0,0,2,2,2],cls:[-38571,-1,158,16452,-11,68]},{nals:[0,-2,2,-2,2],cls:[32481,0,0,-13870,0,0]},{nals:[-2,0,0,2,0],cls:[-47722,0,-18,477,0,-25]},{nals:[2,0,2,0,2],cls:[-31046,-1,131,13238,-11,59]},{nals:[1,0,2,-2,2],cls:[28593,0,-1,-12338,10,-3]},{nals:[-1,0,2,0,1],cls:[20441,21,10,-10758,0,-3]},{nals:[2,0,0,0,0],cls:[29243,0,-74, --609,0,13]},{nals:[0,0,2,0,0],cls:[25887,0,-66,-550,0,11]},{nals:[0,1,0,0,1],cls:[-14053,-25,79,8551,-2,-45]},{nals:[-1,0,0,2,1],cls:[15164,10,11,-8001,0,-1]},{nals:[0,2,2,-2,2],cls:[-15794,72,-16,6850,-42,-5]},{nals:[0,0,-2,2,0],cls:[21783,0,13,-167,0,13]},{nals:[1,0,0,-2,1],cls:[-12873,-10,-37,6953,0,-14]},{nals:[0,-1,0,0,1],cls:[-12654,11,63,6415,0,26]},{nals:[-1,0,2,2,1],cls:[-10204,0,25,5222,0,15]},{nals:[0,2,0,0,0],cls:[16707,-85,-10,168,-1,10]},{nals:[1,0,2,2,2],cls:[-7691,0,44,3268,0,19]}, -{nals:[-2,0,2,0,0],cls:[-11024,0,-14,104,0,2]},{nals:[0,1,2,0,2],cls:[7566,-21,-11,-3250,0,-5]},{nals:[0,0,2,2,1],cls:[-6637,-11,25,3353,0,14]},{nals:[0,-1,2,0,2],cls:[-7141,21,8,3070,0,4]},{nals:[0,0,0,2,1],cls:[-6302,-11,2,3272,0,4]},{nals:[1,0,2,-2,1],cls:[5800,10,2,-3045,0,-1]},{nals:[2,0,2,-2,2],cls:[6443,0,-7,-2768,0,-4]},{nals:[-2,0,0,2,1],cls:[-5774,-11,-15,3041,0,-5]},{nals:[2,0,2,0,1],cls:[-5350,0,21,2695,0,12]},{nals:[0,-1,2,-2,1],cls:[-4752,-11,-3,2719,0,-3]},{nals:[0,0,0,-2,1],cls:[-4940, --11,-21,2720,0,-9]},{nals:[-1,-1,0,2,0],cls:[7350,0,-8,-51,0,4]},{nals:[2,0,0,-2,1],cls:[4065,0,6,-2206,0,1]},{nals:[1,0,0,2,0],cls:[6579,0,-24,-199,0,2]},{nals:[0,1,2,-2,1],cls:[3579,0,5,-1900,0,1]},{nals:[1,-1,0,0,0],cls:[4725,0,-6,-41,0,3]},{nals:[-2,0,2,0,2],cls:[-3075,0,-2,1313,0,-1]},{nals:[3,0,2,0,2],cls:[-2904,0,15,1233,0,7]},{nals:[0,-1,0,2,0],cls:[4348,0,-10,-81,0,2]},{nals:[1,-1,2,0,2],cls:[-2878,0,8,1232,0,4]},{nals:[0,0,0,1,0],cls:[-4230,0,5,-20,0,-2]},{nals:[-1,-1,2,2,2],cls:[-2819, -0,7,1207,0,3]},{nals:[-1,0,2,0,0],cls:[-4056,0,5,40,0,-2]},{nals:[0,-1,2,2,2],cls:[-2647,0,11,1129,0,5]},{nals:[-2,0,0,0,1],cls:[-2294,0,-10,1266,0,-4]},{nals:[1,1,2,0,2],cls:[2481,0,-7,-1062,0,-3]},{nals:[2,0,0,0,1],cls:[2179,0,-2,-1129,0,-2]},{nals:[-1,1,0,1,0],cls:[3276,0,1,-9,0,0]},{nals:[1,1,0,0,0],cls:[-3389,0,5,35,0,-2]},{nals:[1,0,2,0,0],cls:[3339,0,-13,-107,0,1]},{nals:[-1,0,2,-2,1],cls:[-1987,0,-6,1073,0,-2]},{nals:[1,0,0,0,2],cls:[-1981,0,0,854,0,0]},{nals:[-1,0,0,1,0],cls:[4026,0,-353, --553,0,-139]},{nals:[0,0,2,1,2],cls:[1660,0,-5,-710,0,-2]},{nals:[-1,0,2,4,2],cls:[-1521,0,9,647,0,4]},{nals:[-1,1,0,1,1],cls:[1314,0,0,-700,0,0]},{nals:[0,-2,2,-2,1],cls:[-1283,0,0,672,0,0]},{nals:[1,0,2,2,1],cls:[-1331,0,8,663,0,4]},{nals:[-2,0,2,2,2],cls:[1383,0,-2,-594,0,-2]},{nals:[-1,0,0,0,2],cls:[1405,0,4,-610,0,2]},{nals:[1,1,2,-2,2],cls:[1290,0,0,-556,0,0]}],Q,t=function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.t=d};t.prototype.Length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+ -this.z*this.z)};var W=function(a,b,c){this.lat=a;this.lon=b;this.dist=c};d.MakeSpherical=function(a,b,c){return new W(a,b,c)};var da=function(a,b,c){this.ra=a;this.dec=b;this.dist=c},w=function(a){this.rot=a};d.MakeRotation=function(a){if(!la(a))throw"Argument must be a [3][3] array of numbers";return new w(a)};var qa=function(a,b,c,d){this.azimuth=a;this.altitude=b;this.ra=c;this.dec=d},ma=function(a,b,c,d,g){this.ex=a;this.ey=b;this.ez=c;this.elat=d;this.elon=g};d.Horizon=function(a,b,c,e,g){a= -d.MakeTime(a);var h=Math.sin(.017453292519943295*b.latitude),l=Math.cos(.017453292519943295*b.latitude),k=Math.sin(.017453292519943295*b.longitude),m=Math.cos(.017453292519943295*b.longitude);b=Math.sin(.017453292519943295*e);var f=Math.cos(.017453292519943295*e),n=Math.sin(.2617993877991494*c),p=Math.cos(.2617993877991494*c),q=[l*m,l*k,h];h=[-h*m,-h*k,l];k=[k,-m,0];l=-15*S(a);a=E(l,q);q=E(l,h);k=E(l,k);b=[f*p,f*n,b];n=b[0]*a[0]+b[1]*a[1]+b[2]*a[2];q=b[0]*q[0]+b[1]*q[1]+b[2]*q[2];k=b[0]*k[0]+b[1]* -k[1]+b[2]*k[2];p=Math.sqrt(q*q+k*k);f=0;0f&&(f+=360),360<=f&&(f-=360));n=57.29577951308232*Math.atan2(p,n);p=e;if(g&&(e=n,g=d.Refraction(g,90-n),n-=g,0k;++k)g.push((b[k]-e*a[k])/q*c+a[k]*p);p=Math.sqrt(g[0]*g[0]+g[1]*g[1]);0c&&(c+=24),24<=c&& -(c-=24)):c=0;p=57.29577951308232*Math.atan2(g[2],p)}return new qa(f,90-n,c,p)};var ra=function(a,b,c){this.latitude=a;this.longitude=b;this.height=c};d.MakeObserver=function(a,b,c){return new ra(a,b,c||0)};d.SunPosition=function(a){a=d.MakeTime(a).AddDays(-.005775518331089121);var b=B(A.Earth,a);b=R(0,[-b.x,-b.y,-b.z],a.tt);b=Y(a,0,b);a=.017453292519943295*P(a).tobl;return ea(b[0],b[1],b[2],Math.cos(a),Math.sin(a))};d.Equator=function(a,b,c,e,g){b=d.MakeTime(b);var h=S(b),l=.017453292519943295*c.latitude, -k=Math.sin(l);l=Math.cos(l);var m=1/Math.sqrt(l*l+.9933056020041345*k*k),f=c.height/1E3,n=6378.1366*m+f;c=.017453292519943295*(15*h+c.longitude);c=Y(b,-1,[n*l*Math.cos(c)/1.4959787069098932E8,n*l*Math.sin(c)/1.4959787069098932E8,(6335.438815127603*m+f)*k/1.4959787069098932E8]);c=R(b.tt,c,0);a=d.GeoVector(a,b,g);a=[a.x-c[0],a.y-c[1],a.z-c[2]];if(!e)return ca(a);e=R(0,a,b.tt);e=Y(b,0,e);return ca(e)};d.Ecliptic=function(a,b,c){void 0===U&&(U=.017453292519943295*P(d.MakeTime(aa)).mobl,ha=Math.cos(U), -ia=Math.sin(U));return ea(a,b,c,ha,ia)};d.GeoMoon=function(a){a=d.MakeTime(a);var b=D(a),c=b.distance_au*Math.cos(b.geo_eclip_lat);b=[c*Math.cos(b.geo_eclip_lon),c*Math.sin(b.geo_eclip_lon),b.distance_au*Math.sin(b.geo_eclip_lat)];var e=.017453292519943295*C(a);c=Math.cos(e);e=Math.sin(e);b=R(a.tt,[b[0],b[1]*c-b[2]*e,b[1]*e+b[2]*c],0);return new t(b[0],b[1],b[2],a)};d.HelioVector=function(a,b){b=d.MakeTime(b);if(a in A)return B(A[a],b);if(a in ja){a:{var c=$jscomp.makeIterator(ja[a]);for(a=c.next();!a.done;a= -c.next()){a=a.value;var e=a.tt;var g=a.tt+a.ndays;e=(2*b.tt-(g+e))/(g-e);if(-1<=e&&1>=e){var h=[];for(g=0;3>g;++g){var l=1;var k=a.coeff[0][g];var m=e;k+=a.coeff[1][g]*m;for(c=2;ck;++k){g=d.HelioVector(a,l);c&&(e=B(A.Earth,l));h=new t(g.x-e.x,g.y-e.y,g.z-e.z,b);if("Sun"===a)return h;var m=b.AddDays(-h.Length()/173.1446326846693);g=Math.abs(m.tt-l.tt);if(1E-9>g)return h;l=m}throw"Light-travel time solver did not converge: dt="+g;};d.Search=function(a,b,c,e){function g(b){++H.search_func; -return a(b)}var h=Math.abs((e&&e.dt_tolerance_seconds||1)/86400);++H.search;var l=e&&e.init_f1||g(b),k=e&&e.init_f2||g(c),m,f=0;e=e&&e.iter_limit||20;for(var n=!0;;){if(++f>e)throw"Excessive iteration in Search()";var p=new L(b.ut+.5*(c.ut-b.ut)),q=p.ut-b.ut;if(Math.abs(q)(q.ut-b.ut)*(q.ut- -c.ut)&&0>(r.ut-b.ut)*(r.ut-c.ut))){v=g(q);var u=g(r);if(0>v&&0<=u){l=v;k=u;b=q;c=r;m=t;n=!1;continue}}}}if(0>l&&0<=m)c=p,k=m;else if(0>m&&0<=k)b=p,l=m;else return null}};d.SearchSunLongitude=function(a,b,c){b=d.MakeTime(b);c=b.AddDays(c);return d.Search(function(b){b=d.SunPosition(b);return I(b.elon-a)},b,c)};d.LongitudeFromSun=function(a,b){if("Earth"===a)throw"The Earth does not have a longitude as seen from itself.";b=d.MakeTime(b);a=d.GeoVector(a,b,!0);a=d.Ecliptic(a.x,a.y,a.z);b=d.GeoVector("Sun", -b,!0);b=d.Ecliptic(b.x,b.y,b.z);for(b=a.elon-b.elon;0>b;)b+=360;for(;360<=b;)b-=360;return b};d.AngleFromSun=function(a,b){if("Earth"==a)throw"The Earth does not have an angle as seen from itself.";var c=d.GeoVector("Sun",b,!0);a=d.GeoVector(a,b,!0);return y(c,a)};d.EclipticLongitude=function(a,b){if("Sun"===a)throw"Cannot calculate heliocentric longitude of the Sun.";a=d.HelioVector(a,b);return d.Ecliptic(a.x,a.y,a.z).elon};var sa=function(a,b,c,d,g,h,l,k){this.time=a;this.mag=b;this.phase_angle= -c;this.phase_fraction=(1+Math.cos(.017453292519943295*c))/2;this.helio_dist=d;this.geo_dist=g;this.gc=h;this.hc=l;this.ring_tilt=k};d.Illumination=function(a,b){if("Earth"===a)throw"The illumination of the Earth is not defined.";var c=d.MakeTime(b),e=B(A.Earth,c);if("Sun"===a){var g=new t(-e.x,-e.y,-e.z,c);b=new t(0,0,0,c);e=0}else"Moon"===a?(g=d.GeoMoon(c),b=new t(e.x+g.x,e.y+g.y,e.z+g.z,c)):(b=d.HelioVector(a,b),g=new t(b.x-e.x,b.y-e.y,b.z-e.z,c)),e=y(g,b);var h=g.Length(),l=b.Length(),k=null;if("Sun"=== -a)a=oa+5*Math.log10(h);else if("Moon"===a){a=.017453292519943295*e;var m=a*a;a=-12.717+1.49*Math.abs(a)+.0431*m*m;a+=5*Math.log10(h/.002573570052980638*l)}else if("Saturn"===a)a=e,k=d.Ecliptic(g.x,g.y,g.z),m=.017453292519943295*k.elat,k=Math.asin(Math.sin(m)*Math.cos(.4897393881096089)-Math.cos(m)*Math.sin(.4897393881096089)*Math.sin(.017453292519943295*k.elon-.017453292519943295*(169.51+3.82E-5*c.tt))),m=Math.sin(Math.abs(k)),a=-9+.044*a+m*(-2.6+1.2*m)+5*Math.log10(l*h),k*=57.29577951308232;else{var f= -m=0,n=0;switch(a){case "Mercury":a=-.6;m=4.98;f=-4.88;n=3.02;break;case "Venus":163.6>e?(a=-4.47,m=1.03,f=.57,n=.13):(a=.98,m=-1.02);break;case "Mars":a=-1.52;m=1.6;break;case "Jupiter":a=-9.4;m=.5;break;case "Uranus":a=-7.19;m=.25;break;case "Neptune":a=-6.87;break;case "Pluto":a=-1;m=4;break;default:throw"VisualMagnitude: unsupported body "+a;}var p=e/100;a=a+p*(m+p*(f+p*n))+5*Math.log10(l*h)}return new sa(c,a,e,l,h,g,b,k)};d.SearchRelativeLongitude=function(a,b,c){function e(c){var e=d.EclipticLongitude(a, -c);c=d.EclipticLongitude("Earth",c);return I(h*(c-e)-b)}var g=T[a];if(!g)throw"Cannot search relative longitude because body is not a planet: "+a;if("Earth"===a)throw"Cannot search relative longitude for the Earth (it is always 0)";var h=g.OrbitalPeriod>T.Earth.OrbitalPeriod?1:-1;g=F(a);c=d.MakeTime(c);var l=e(c);0k;++k){++H.longitude_iter;var m=-l/360*g;c=c.AddDays(m);if(1>86400*Math.abs(m))return c;m=l;l=e(c);30>Math.abs(m)&&m!==l&&(m/=m-l,.5m&&(g*=m))}throw"Relative longitude search failed to converge for "+a+" near "+c.toString()+" (error_angle = "+l+").";};d.MoonPhase=function(a){return d.LongitudeFromSun("Moon",a)};d.SearchMoonPhase=function(a,b,c){function e(b){b=d.MoonPhase(b);return I(b-a)}b=d.MakeTime(b);var g=e(b);0c)return null;c=Math.min(c,h+.9);g=b.AddDays(g);b=b.AddDays(c);return d.Search(e,g,b)};var ta=function(a,b){this.quarter=a;this.time=b};d.SearchMoonQuarter=function(a){var b= -d.MoonPhase(a);b=(Math.floor(b/90)+1)%4;return(a=d.SearchMoonPhase(90*b,a,10))&&new ta(b,a)};d.NextMoonQuarter=function(a){a=new Date(a.time.date.getTime()+5184E5);return d.SearchMoonQuarter(a)};d.SearchRiseSet=function(a,b,c,e,g){function h(e){var f=d.Equator(a,e,b,!0,!0);e=d.Horizon(e,b,f.ra,f.dec).altitude+l/f.dist*57.29577951308232+pa;return c*e}var l={Sun:.0046505,Moon:1.15717E-5}[a]||0;if("Earth"===a)throw"Cannot find rise or set time of the Earth.";if(1===c){var k=12;var m=0}else if(-1===c)k= -0,m=12;else throw"Astronomy.SearchRiseSet: Invalid direction parameter "+c+" -- must be +1 or -1";e=d.MakeTime(e);var f=h(e);var n;if(0=f&&0=e.ut+g)return null;p=f.time;f=h(f.time);n=h(q.time)}};var ua=function(a,b){this.time=a;this.hor=b};d.SearchHourAngle= -function(a,b,c,e){e=d.MakeTime(e);var g=0;if("Earth"===a)throw"Cannot search for hour angle of the Earth.";if(0>c||24<=c)throw"Invalid hour angle "+c;for(;;){++g;var h=S(e),l=d.Equator(a,e,b,!0,!0);h=(c+l.ra-b.longitude/15-h)%24;1===g?0>h&&(h+=24):-12>h?h+=24:123600*Math.abs(h))return a=d.Horizon(e,b,l.ra,l.dec,"normal"),new ua(e,a);e=e.AddDays(h/24*.9972695717592592)}};var va=function(a,b,c,d){this.mar_equinox=a;this.jun_solstice=b;this.sep_equinox=c;this.dec_solstice=d};d.Seasons= -function(a){function b(b,c,e){c=new Date(Date.UTC(a,c-1,e));b=d.SearchSunLongitude(b,c,4);if(!b)throw"Cannot find season change near "+c.toISOString();return b}a instanceof Date&&(a=a.getUTCFullYear());var c=b(0,3,19),e=b(90,6,19),g=b(180,9,21),h=b(270,12,20);return new va(c,e,g,h)};var wa=function(a,b,c,d){this.time=a;this.visibility=b;this.elongation=c;this.ecliptic_separation=d};d.Elongation=function(a,b){b=d.MakeTime(b);var c=d.LongitudeFromSun(a,b);if(180=++g;){var h=d.EclipticLongitude(a,b),l=d.EclipticLongitude("Earth",b);l=I(h-l);var k=h=void 0,m=k=h=void 0;l>=-e.s1&&l<+e.s1?(m=0,h=+e.s1,k=+e.s2):l>=+e.s2|| -l<-e.s2?(m=0,h=-e.s2,k=-e.s1):0<=l?(m=-F(a)/4,h=+e.s1,k=+e.s2):(m=-F(a)/4,h=-e.s2,k=-e.s1);l=b.AddDays(m);h=d.SearchRelativeLongitude(a,h,l);k=d.SearchRelativeLongitude(a,k,h);l=c(h);if(0<=l)throw"SearchMaxElongation: internal error: m1 = "+l;m=c(k);if(0>=m)throw"SearchMaxElongation: internal error: m2 = "+m;l=d.Search(c,h,k,{init_f1:l,init_f2:m,dt_tolerance_seconds:10});if(!l)throw"SearchMaxElongation: failed search iter "+g+" (t1="+h.toString()+", t2="+k.toString()+")";if(l.tt>=b.tt)return d.Elongation(a, -l);b=k.AddDays(1)}throw"SearchMaxElongation: failed to find event after 2 tries.";};d.SearchPeakMagnitude=function(a,b){function c(b){var c=b.AddDays(-.005);b=b.AddDays(.005);c=d.Illumination(a,c).mag;return(d.Illumination(a,b).mag-c)/.01}if("Venus"!==a)throw"SearchPeakMagnitude currently works for Venus only.";b=d.MakeTime(b);for(var e=0;2>=++e;){var g=d.EclipticLongitude(a,b),h=d.EclipticLongitude("Earth",b);h=I(g-h);var l=g=void 0,k=l=g=void 0;-10<=h&&10>h?(k=0,g=10,l=30):30<=h||-30>h?(k=0,g=-30, -l=-10):0<=h?(k=-F(a)/4,g=10,l=30):(k=-F(a)/4,g=-30,l=-10);h=b.AddDays(k);g=d.SearchRelativeLongitude(a,g,h);l=d.SearchRelativeLongitude(a,l,g);h=c(g);if(0<=h)throw"SearchPeakMagnitude: internal error: m1 = "+h;k=c(l);if(0>=k)throw"SearchPeakMagnitude: internal error: m2 = "+k;h=d.Search(c,g,l,{init_f1:h,init_f2:k,dt_tolerance_seconds:10});if(!h)throw"SearchPeakMagnitude: failed search iter "+e+" (t1="+g.toString()+", t2="+l.toString()+")";if(h.tt>=b.tt)return d.Illumination(a,h);b=l.AddDays(1)}throw"SearchPeakMagnitude: failed to find event after 2 tries."; -};var ka=function(a,b,c){this.time=a;this.kind=b;this.dist_au=c;this.dist_km=1.4959787069098932E8*c};d.SearchLunarApsis=function(a){function b(a){var b=a.AddDays(-5E-4);a=a.AddDays(5E-4);b=D(b).distance_au;return(D(a).distance_au-b)/.001}function c(a){return-b(a)}a=d.MakeTime(a);var e=b(a);++H.lunar_apsis_calls;for(var g=0;59.061176>5*g;++g){++H.lunar_apsis_iter;var h=a.AddDays(5),l=b(h);if(0>=e*l){if(0>e||0l){a=d.Search(c,a,h,{init_f1:-e,init_f2:-l});if(null==a)throw"SearchLunarApsis INTERNAL ERROR: apogee search failed!";e=D(a).distance_au;return new ka(a,1,e)}throw"SearchLunarApsis INTERNAL ERROR: cannot classify apsis event!";}a=h;e=l}throw"SearchLunarApsis INTERNAL ERROR: could not find apsis within 2 synodic months of start date.";};d.NextLunarApsis=function(a){var b=d.SearchLunarApsis(a.time.AddDays(11));if(1!==b.kind+a.kind)throw"NextLunarApsis INTERNAL ERROR: did not find alternating apogee/perigee: prev="+ -a.kind+" @ "+a.time.toString()+", next="+b.kind+" @ "+b.time.toString();return b};d.InverseRotation=function(a){return new w([[a.rot[0][0],a.rot[1][0],a.rot[2][0]],[a.rot[0][1],a.rot[1][1],a.rot[2][1]],[a.rot[0][2],a.rot[1][2],a.rot[2][2]]])};d.CombineRotation=function(a,b){return new w([[b.rot[0][0]*a.rot[0][0]+b.rot[1][0]*a.rot[0][1]+b.rot[2][0]*a.rot[0][2],b.rot[0][1]*a.rot[0][0]+b.rot[1][1]*a.rot[0][1]+b.rot[2][1]*a.rot[0][2],b.rot[0][2]*a.rot[0][0]+b.rot[1][2]*a.rot[0][1]+b.rot[2][2]*a.rot[0][2]], -[b.rot[0][0]*a.rot[1][0]+b.rot[1][0]*a.rot[1][1]+b.rot[2][0]*a.rot[1][2],b.rot[0][1]*a.rot[1][0]+b.rot[1][1]*a.rot[1][1]+b.rot[2][1]*a.rot[1][2],b.rot[0][2]*a.rot[1][0]+b.rot[1][2]*a.rot[1][1]+b.rot[2][2]*a.rot[1][2]],[b.rot[0][0]*a.rot[2][0]+b.rot[1][0]*a.rot[2][1]+b.rot[2][0]*a.rot[2][2],b.rot[0][1]*a.rot[2][0]+b.rot[1][1]*a.rot[2][1]+b.rot[2][1]*a.rot[2][2],b.rot[0][2]*a.rot[2][0]+b.rot[1][2]*a.rot[2][1]+b.rot[2][2]*a.rot[2][2]]])};d.VectorFromSphere=function(a,b){var c=.017453292519943295*a.lat, -d=.017453292519943295*a.lon,g=a.dist*Math.cos(c);return new t(g*Math.cos(d),g*Math.sin(d),a.dist*Math.sin(c),b)};d.VectorFromEquator=function(a,b){return d.VectorFromSphere(new W(a.dec,15*a.ra,a.dist),b)};d.EquatorFromVector=function(a){a=d.SphereFromVector(a);return new da(a.lon/15,a.lat,a.dist)};d.SphereFromVector=function(a){var b=a.x*a.x+a.y*a.y,c=Math.sqrt(b+a.z*a.z);if(0===b){if(0===a.z)throw"Zero-length vector not allowed.";var d=0;a=0>a.z?-90:90}else d=57.29577951308232*Math.atan2(a.y,a.x), -0>d&&(d+=360),a=57.29577951308232*Math.atan2(a.z,Math.sqrt(b));return new W(a,d,c)};d.HorizonFromVector=function(a,b){a=d.SphereFromVector(a);a.lon=fa(a.lon);a.lat+=d.Refraction(b,a.lat);return a};d.VectorFromHorizon=function(a,b,c){var e=fa(a.lon);c=a.lat+d.InverseRefraction(c,a.lat);a=new W(c,e,a.dist);return d.VectorFromSphere(a,b)};d.Refraction=function(a,b){if(-90>b||90c&&(c=-1);c=1.02/Math.tan(.017453292519943295*(c+10.3/(c+5.11)))/60;"normal"=== -a&&-1>b&&(c*=(b+90)/89)}else c=0;return c};d.InverseRefraction=function(a,b){if(-90>b||90Math.abs(e))return c-b;c-=e}};d.RotateVector=function(a,b){return new t(a.rot[0][0]*b.x+a.rot[1][0]*b.y+a.rot[2][0]*b.z,a.rot[0][1]*b.x+a.rot[1][1]*b.y+a.rot[2][1]*b.z,a.rot[0][2]*b.x+a.rot[1][2]*b.y+a.rot[2][2]*b.z,b.t)};d.Rotation_EQJ_ECL=function(){return new w([[1,0,0],[0,.9174821430670688,-.3977769691083922],[0,.3977769691083922, -.9174821430670688]])};d.Rotation_ECL_EQJ=function(){return new w([[1,0,0],[0,.9174821430670688,.3977769691083922],[0,-.3977769691083922,.9174821430670688]])};d.Rotation_EQJ_EQD=function(a){var b=X(0,a.tt);a=Z(a,0);return d.CombineRotation(b,a)};d.Rotation_EQD_EQJ=function(a){var b=Z(a,1);a=X(a.tt,0);return d.CombineRotation(b,a)};d.Rotation_EQD_HOR=function(a,b){var c=Math.sin(.017453292519943295*b.latitude),d=Math.cos(.017453292519943295*b.latitude),g=Math.sin(.017453292519943295*b.longitude),h= -Math.cos(.017453292519943295*b.longitude);b=[d*h,d*g,c];c=[-c*h,-c*g,d];g=[g,-h,0];a=-15*S(a);b=E(a,b);c=E(a,c);a=E(a,g);return new w([[c[0],a[0],b[0]],[c[1],a[1],b[1]],[c[2],a[2],b[2]]])};d.Rotation_HOR_EQD=function(a,b){a=d.Rotation_EQD_HOR(a,b);return d.InverseRotation(a)};d.Rotation_HOR_EQJ=function(a,b){b=d.Rotation_HOR_EQD(a,b);a=d.Rotation_EQD_EQJ(a);return d.CombineRotation(b,a)};d.Rotation_EQJ_HOR=function(a,b){a=d.Rotation_HOR_EQJ(a,b);return d.InverseRotation(a)};d.Rotation_EQD_ECL=function(a){a= -d.Rotation_EQD_EQJ(a);var b=d.Rotation_EQJ_ECL();return d.CombineRotation(a,b)};d.Rotation_ECL_EQD=function(a){a=d.Rotation_EQD_ECL(a);return d.InverseRotation(a)};d.Rotation_ECL_HOR=function(a,b){var c=d.Rotation_ECL_EQD(a);a=d.Rotation_EQD_HOR(a,b);return d.CombineRotation(c,a)};d.Rotation_HOR_ECL=function(a,b){a=d.Rotation_ECL_HOR(a,b);return d.InverseRotation(a)}})("undefined"===typeof exports?this.Astronomy={}:exports); +1.84552258866,175.1660598002],[1.201232E-4,1.92059384991,1021.2488945514],[.00121801746,5.79754470298,76.2660712756],[.00100896068,.3770272493,73.297125859],[.00135134092,3.37220609835,39.6175083461],[7.571796E-5,1.07149207335,388.4651552382]]]]},ja={Pluto:[{tt:-109573.5,ndays:26141,coeff:[[-30.303124711144,-18.980368465705,3.206649343866],[20.092745278347,-27.533908687219,-14.64112196599],[9.137264744925,6.513103657467,-.720732357468],[-1.201554708717,2.149917852301,1.032022293526],[-.566068170022, +-.285737361191,.081379987808],[.041678527795,-.14336310504,-.057534475984],[.041087908142,.00791132158,-.010270655537],[.001611769878,.011409821837,.003679980733],[-.002536458296,-1.45632543E-4,9.4992403E-4],[.001167651969,-4.991268E-5,1.1586771E-4],[-1.96953286E-4,4.2040627E-4,1.10147171E-4],[.001073825784,4.42658285E-4,1.46985332E-4],[-9.06160087E-4,.001702360394,7.58987924E-4],[-.001467464335,-6.22191266E-4,-2.31866243E-4],[-8.986691E-6,4.086384E-6,1.442956E-6],[-.001099078039,-5.44633529E-4,-2.05534708E-4], +[.001259974751,-.002178533187,-9.65315934E-4],[.001695288316,7.68480768E-4,2.87916141E-4],[-.001428026702,.002707551594,.001195955756]]},{tt:-83432.5,ndays:26141,coeff:[[67.049456204563,-9.279626603192,-23.091941092128],[14.860676672314,26.594121136143,3.819668867047],[-6.25440904412,1.408757903538,2.323726101433],[.114416381092,-.942273228585,-.328566335886],[.074973631246,.106749156044,.010806547171],[-.018627741964,-.009983491157,.002589955906],[.006167206174,-.001042430439,-.001521881831],[-4.71293617E-4, +.002337935239,.001060879763],[-2.40627462E-4,-.001380351742,-5.4604259E-4],[.001872140444,6.7987662E-4,2.40384842E-4],[-3.34705177E-4,6.9352833E-4,3.01138309E-4],[7.96124758E-4,6.53183163E-4,2.59527079E-4],[-.001276116664,.001393959948,6.29574865E-4],[-.001235158458,-8.89985319E-4,-3.51392687E-4],[-1.9881944E-5,4.8339979E-5,2.1342186E-5],[-9.87113745E-4,-7.48420747E-4,-2.96503569E-4],[.001721891782,-.001893675502,-8.54270937E-4],[.001505145187,.001081653337,4.2672364E-4],[-.002019479384,.002375617497, +.001068258925]]},{tt:-57291.5,ndays:26141,coeff:[[46.038290912405,73.773759757856,9.148670950706],[-22.354364534703,10.217143138926,9.921247676076],[-2.696282001399,-4.440843715929,-.57237303784],[.3854758188,-.287872688575,-.205914693555],[.020994433095,.004256602589,-.004817361041],[.003212255378,5.74875698E-4,-7.6446437E-4],[-1.58619286E-4,-.001035559544,-5.35612316E-4],[9.67952107E-4,-6.53111849E-4,-2.9201975E-4],[.001763494906,-3.70815938E-4,-2.24698363E-4],[.00115799033,.001849810828,7.59641577E-4], +[-8.83535516E-4,3.84038162E-4,1.91242192E-4],[7.09486562E-4,6.55810827E-4,2.65431131E-4],[-.001525810419,.001126870468,5.20202001E-4],[-9.8321086E-4,-.001116073455,-4.56026382E-4],[-1.565545E-5,6.9184008E-5,2.9796623E-5],[-8.15102021E-4,-9.0059701E-4,-3.65274209E-4],[.002090300438,-.001536778673,-7.09827438E-4],[.001234661297,.001342978436,5.45313112E-4],[-.002517963678,.001941826791,8.9385986E-4]]},{tt:-31150.5,ndays:26141,coeff:[[-39.074661990988,30.963513412373,21.431709298065],[-12.033639281924, +-31.69367913231,-6.263961539568],[7.233936758611,-3.979157072767,-3.421027935569],[1.383182539917,1.0907297934,-.076771771448],[-.009894394996,.313614402007,.101180677344],[-.055459383449,.031782406403,.026374448864],[-.011074105991,-.007176759494,.001896208351],[-2.63363398E-4,-.001145329444,2.15471838E-4],[4.05700185E-4,-8.39229891E-4,-4.18571366E-4],[.001004921401,.001135118493,4.06734549E-4],[-4.73938695E-4,2.82751002E-4,1.14911593E-4],[5.28685886E-4,9.66635293E-4,4.01955197E-4],[-.001838869845, +8.06432189E-4,3.94594478E-4],[-7.13122169E-4,-.001334810971,-5.54511235E-4],[6.449359E-6,6.073E-5,2.451323E-5],[-5.96025142E-4,-9.9949277E-4,-4.13930406E-4],[.002364904429,-.001099236865,-5.28480902E-4],[9.07458104E-4,.001537243912,6.37001965E-4],[-.002909908764,.001413648354,6.77030924E-4]]},{tt:-5009.5,ndays:26141,coeff:[[23.380075041204,-38.969338804442,-19.204762094135],[33.437140696536,8.735194448531,-7.348352917314],[-3.127251304544,8.324311848708,3.540122328502],[-1.491354030154,-1.350371407475, +.028214278544],[.361398480996,-.118420687058,-.14537560548],[-.011771350229,.085880588309,.030665997197],[-.015839541688,-.014165128211,5.23465951E-4],[.004213218926,-.001426373728,-.001906412496],[.001465150002,4.51513538E-4,8.1936194E-5],[6.40069511E-4,.001886692235,8.84675556E-4],[-8.8355494E-4,3.01907356E-4,1.27310183E-4],[2.45524038E-4,9.10362686E-4,3.85555148E-4],[-.001942010476,4.3868228E-4,2.37124027E-4],[-4.2545566E-4,-.001442138768,-6.0775139E-4],[4.168433E-6,3.3856562E-5,1.3881811E-5], +[-3.37920193E-4,-.001074290356,-4.52503056E-4],[.002544755354,-6.20356219E-4,-3.27246228E-4],[5.3453411E-4,.001670320887,7.02775941E-4],[-.00316938027,8.16186705E-4,4.27213817E-4]]},{tt:21131.5,ndays:26141,coeff:[[74.130449310804,43.372111541004,-8.799489207171],[-8.705941488523,23.344631690845,9.908006472122],[-4.614752911564,-2.587334376729,.583321715294],[.316219286624,-.395448970181,-.219217574801],[.004593734664,.027528474371,.00773619728],[-.001192268851,-.004987723997,-.001599399192],[.003051998429, +-.001287028653,-7.80744058E-4],[.001482572043,.001613554244,6.35747068E-4],[5.81965277E-4,7.88286674E-4,3.15285159E-4],[-3.1183073E-4,.00162236993,7.14817617E-4],[-7.11275723E-4,-1.60014561E-4,-5.0445901E-5],[1.77159088E-4,.001032713853,4.35835541E-4],[-.00203228082,1.44281331E-4,1.11910344E-4],[-1.48463759E-4,-.001495212309,-6.35892081E-4],[-9.629403E-6,-1.3678407E-5,-6.187457E-6],[-6.1196084E-5,-.00111978352,-4.79221572E-4],[.002630993795,-1.13042927E-4,-1.12115452E-4],[1.32867113E-4,.001741417484, +7.4322463E-4],[-.003293498893,1.82437998E-4,1.58073228E-4]]},{tt:47272.5,ndays:26141,coeff:[[-5.727994625506,71.194823351703,23.946198176031],[-26.767323214686,-12.26494930278,4.238297122007],[.89059620425,-5.970227904551,-2.131444078785],[.808383708156,-.143104108476,-.288102517987],[.089303327519,.049290470655,-.010970501667],[.010197195705,.0128797214,.00131758674],[.001795282629,.00448240378,.001563326157],[-.001974716105,.001278073933,6.52735133E-4],[9.06544715E-4,-8.05502229E-4,-3.36200833E-4], +[2.83816745E-4,.001799099064,7.56827653E-4],[-7.84971304E-4,1.2308122E-4,6.8812133E-5],[-2.37033406E-4,9.80100466E-4,4.27758498E-4],[-.001976846386,-2.80421081E-4,-7.2417045E-5],[1.95628511E-4,-.001446079585,-6.24011074E-4],[-4.4622337E-5,-3.5865046E-5,-1.3581236E-5],[2.04397832E-4,-.001127474894,-4.88668673E-4],[.002625373003,3.89300123E-4,1.02756139E-4],[-2.77321614E-4,.001732818354,7.49576471E-4],[-.003280537764,-4.57571669E-4,-1.16383655E-4]]}]},r=[{mjd:-72638,dt:38},{mjd:-65333,dt:26},{mjd:-58028, +dt:21},{mjd:-50724,dt:21.1},{mjd:-43419,dt:13.5},{mjd:-39766,dt:13.7},{mjd:-36114,dt:14.8},{mjd:-32461,dt:15.7},{mjd:-28809,dt:15.6},{mjd:-25156,dt:13.3},{mjd:-21504,dt:12.6},{mjd:-17852,dt:11.2},{mjd:-14200,dt:11.13},{mjd:-10547,dt:7.95},{mjd:-6895,dt:6.22},{mjd:-3242,dt:6.55},{mjd:-1416,dt:7.26},{mjd:410,dt:7.35},{mjd:2237,dt:5.92},{mjd:4063,dt:1.04},{mjd:5889,dt:-3.19},{mjd:7715,dt:-5.36},{mjd:9542,dt:-5.74},{mjd:11368,dt:-5.86},{mjd:13194,dt:-6.41},{mjd:15020,dt:-2.7},{mjd:16846,dt:3.92},{mjd:18672, +dt:10.38},{mjd:20498,dt:17.19},{mjd:22324,dt:21.41},{mjd:24151,dt:23.63},{mjd:25977,dt:24.02},{mjd:27803,dt:23.91},{mjd:29629,dt:24.35},{mjd:31456,dt:26.76},{mjd:33282,dt:29.15},{mjd:35108,dt:31.07},{mjd:36934,dt:33.15},{mjd:38761,dt:35.738},{mjd:40587,dt:40.182},{mjd:42413,dt:45.477},{mjd:44239,dt:50.54},{mjd:44605,dt:51.3808},{mjd:44970,dt:52.1668},{mjd:45335,dt:52.9565},{mjd:45700,dt:53.7882},{mjd:46066,dt:54.3427},{mjd:46431,dt:54.8712},{mjd:46796,dt:55.3222},{mjd:47161,dt:55.8197},{mjd:47527, +dt:56.3},{mjd:47892,dt:56.8553},{mjd:48257,dt:57.5653},{mjd:48622,dt:58.3092},{mjd:48988,dt:59.1218},{mjd:49353,dt:59.9845},{mjd:49718,dt:60.7853},{mjd:50083,dt:61.6287},{mjd:50449,dt:62.295},{mjd:50814,dt:62.9659},{mjd:51179,dt:63.4673},{mjd:51544,dt:63.8285},{mjd:51910,dt:64.0908},{mjd:52275,dt:64.2998},{mjd:52640,dt:64.4734},{mjd:53005,dt:64.5736},{mjd:53371,dt:64.6876},{mjd:53736,dt:64.8452},{mjd:54101,dt:65.1464},{mjd:54466,dt:65.4573},{mjd:54832,dt:65.7768},{mjd:55197,dt:66.0699},{mjd:55562, +dt:66.3246},{mjd:55927,dt:66.603},{mjd:56293,dt:66.9069},{mjd:56658,dt:67.281},{mjd:57023,dt:67.6439},{mjd:57388,dt:68.1024},{mjd:57754,dt:68.5927},{mjd:58119,dt:68.9676},{mjd:58484,dt:69.2201},{mjd:58849,dt:69.87},{mjd:59214,dt:70.39},{mjd:59580,dt:70.91},{mjd:59945,dt:71.4},{mjd:60310,dt:71.88},{mjd:60675,dt:72.36},{mjd:61041,dt:72.83},{mjd:61406,dt:73.32},{mjd:61680,dt:73.66}],L=function(a){if(a instanceof Date)this.date=a,this.ut=(a-aa)/864E5,this.tt=z(this.ut);else if("number"===typeof a)this.date= +new Date(aa-864E5*-a),this.ut=a,this.tt=z(this.ut);else throw"Argument must be a Date object, an AstroTime object, or a numeric UTC Julian date.";};L.prototype.toString=function(){return this.date.toISOString()};L.prototype.AddDays=function(a){return new L(this.ut+a)};d.MakeTime=function(a){return a instanceof L?a:new L(a)};var ba=[{nals:[0,0,0,0,1],cls:[-172064161,-174666,33386,92052331,9086,15377]},{nals:[0,0,2,-2,2],cls:[-13170906,-1675,-13696,5730336,-3015,-4587]},{nals:[0,0,2,0,2],cls:[-2276413, +-234,2796,978459,-485,1374]},{nals:[0,0,0,0,2],cls:[2074554,207,-698,-897492,470,-291]},{nals:[0,1,0,0,0],cls:[1475877,-3633,11817,73871,-184,-1924]},{nals:[0,1,2,-2,2],cls:[-516821,1226,-524,224386,-677,-174]},{nals:[1,0,0,0,0],cls:[711159,73,-872,-6750,0,358]},{nals:[0,0,2,0,1],cls:[-387298,-367,380,200728,18,318]},{nals:[1,0,2,0,2],cls:[-301461,-36,816,129025,-63,367]},{nals:[0,-1,2,-2,2],cls:[215829,-494,111,-95929,299,132]},{nals:[0,0,2,-2,1],cls:[128227,137,181,-68982,-9,39]},{nals:[-1,0,2, +0,2],cls:[123457,11,19,-53311,32,-4]},{nals:[-1,0,0,2,0],cls:[156994,10,-168,-1235,0,82]},{nals:[1,0,0,0,1],cls:[63110,63,27,-33228,0,-9]},{nals:[-1,0,0,0,1],cls:[-57976,-63,-189,31429,0,-75]},{nals:[-1,0,2,2,2],cls:[-59641,-11,149,25543,-11,66]},{nals:[1,0,2,0,1],cls:[-51613,-42,129,26366,0,78]},{nals:[-2,0,2,0,1],cls:[45893,50,31,-24236,-10,20]},{nals:[0,0,0,2,0],cls:[63384,11,-150,-1220,0,29]},{nals:[0,0,2,2,2],cls:[-38571,-1,158,16452,-11,68]},{nals:[0,-2,2,-2,2],cls:[32481,0,0,-13870,0,0]},{nals:[-2, +0,0,2,0],cls:[-47722,0,-18,477,0,-25]},{nals:[2,0,2,0,2],cls:[-31046,-1,131,13238,-11,59]},{nals:[1,0,2,-2,2],cls:[28593,0,-1,-12338,10,-3]},{nals:[-1,0,2,0,1],cls:[20441,21,10,-10758,0,-3]},{nals:[2,0,0,0,0],cls:[29243,0,-74,-609,0,13]},{nals:[0,0,2,0,0],cls:[25887,0,-66,-550,0,11]},{nals:[0,1,0,0,1],cls:[-14053,-25,79,8551,-2,-45]},{nals:[-1,0,0,2,1],cls:[15164,10,11,-8001,0,-1]},{nals:[0,2,2,-2,2],cls:[-15794,72,-16,6850,-42,-5]},{nals:[0,0,-2,2,0],cls:[21783,0,13,-167,0,13]},{nals:[1,0,0,-2,1], +cls:[-12873,-10,-37,6953,0,-14]},{nals:[0,-1,0,0,1],cls:[-12654,11,63,6415,0,26]},{nals:[-1,0,2,2,1],cls:[-10204,0,25,5222,0,15]},{nals:[0,2,0,0,0],cls:[16707,-85,-10,168,-1,10]},{nals:[1,0,2,2,2],cls:[-7691,0,44,3268,0,19]},{nals:[-2,0,2,0,0],cls:[-11024,0,-14,104,0,2]},{nals:[0,1,2,0,2],cls:[7566,-21,-11,-3250,0,-5]},{nals:[0,0,2,2,1],cls:[-6637,-11,25,3353,0,14]},{nals:[0,-1,2,0,2],cls:[-7141,21,8,3070,0,4]},{nals:[0,0,0,2,1],cls:[-6302,-11,2,3272,0,4]},{nals:[1,0,2,-2,1],cls:[5800,10,2,-3045, +0,-1]},{nals:[2,0,2,-2,2],cls:[6443,0,-7,-2768,0,-4]},{nals:[-2,0,0,2,1],cls:[-5774,-11,-15,3041,0,-5]},{nals:[2,0,2,0,1],cls:[-5350,0,21,2695,0,12]},{nals:[0,-1,2,-2,1],cls:[-4752,-11,-3,2719,0,-3]},{nals:[0,0,0,-2,1],cls:[-4940,-11,-21,2720,0,-9]},{nals:[-1,-1,0,2,0],cls:[7350,0,-8,-51,0,4]},{nals:[2,0,0,-2,1],cls:[4065,0,6,-2206,0,1]},{nals:[1,0,0,2,0],cls:[6579,0,-24,-199,0,2]},{nals:[0,1,2,-2,1],cls:[3579,0,5,-1900,0,1]},{nals:[1,-1,0,0,0],cls:[4725,0,-6,-41,0,3]},{nals:[-2,0,2,0,2],cls:[-3075, +0,-2,1313,0,-1]},{nals:[3,0,2,0,2],cls:[-2904,0,15,1233,0,7]},{nals:[0,-1,0,2,0],cls:[4348,0,-10,-81,0,2]},{nals:[1,-1,2,0,2],cls:[-2878,0,8,1232,0,4]},{nals:[0,0,0,1,0],cls:[-4230,0,5,-20,0,-2]},{nals:[-1,-1,2,2,2],cls:[-2819,0,7,1207,0,3]},{nals:[-1,0,2,0,0],cls:[-4056,0,5,40,0,-2]},{nals:[0,-1,2,2,2],cls:[-2647,0,11,1129,0,5]},{nals:[-2,0,0,0,1],cls:[-2294,0,-10,1266,0,-4]},{nals:[1,1,2,0,2],cls:[2481,0,-7,-1062,0,-3]},{nals:[2,0,0,0,1],cls:[2179,0,-2,-1129,0,-2]},{nals:[-1,1,0,1,0],cls:[3276, +0,1,-9,0,0]},{nals:[1,1,0,0,0],cls:[-3389,0,5,35,0,-2]},{nals:[1,0,2,0,0],cls:[3339,0,-13,-107,0,1]},{nals:[-1,0,2,-2,1],cls:[-1987,0,-6,1073,0,-2]},{nals:[1,0,0,0,2],cls:[-1981,0,0,854,0,0]},{nals:[-1,0,0,1,0],cls:[4026,0,-353,-553,0,-139]},{nals:[0,0,2,1,2],cls:[1660,0,-5,-710,0,-2]},{nals:[-1,0,2,4,2],cls:[-1521,0,9,647,0,4]},{nals:[-1,1,0,1,1],cls:[1314,0,0,-700,0,0]},{nals:[0,-2,2,-2,1],cls:[-1283,0,0,672,0,0]},{nals:[1,0,2,2,1],cls:[-1331,0,8,663,0,4]},{nals:[-2,0,2,2,2],cls:[1383,0,-2,-594, +0,-2]},{nals:[-1,0,0,0,2],cls:[1405,0,4,-610,0,2]},{nals:[1,1,2,-2,2],cls:[1290,0,0,-556,0,0]}],Q,t=function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.t=d};t.prototype.Length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};var W=function(a,b,c){this.lat=a;this.lon=b;this.dist=c};d.MakeSpherical=function(a,b,c){return new W(a,b,c)};var da=function(a,b,c){this.ra=a;this.dec=b;this.dist=c},w=function(a){this.rot=a};d.MakeRotation=function(a){if(!la(a))throw"Argument must be a [3][3] array of numbers"; +return new w(a)};var qa=function(a,b,c,d){this.azimuth=a;this.altitude=b;this.ra=c;this.dec=d},ma=function(a,b,c,d,g){this.ex=a;this.ey=b;this.ez=c;this.elat=d;this.elon=g};d.Horizon=function(a,b,c,e,g){a=d.MakeTime(a);var h=Math.sin(.017453292519943295*b.latitude),l=Math.cos(.017453292519943295*b.latitude),k=Math.sin(.017453292519943295*b.longitude),m=Math.cos(.017453292519943295*b.longitude);b=Math.sin(.017453292519943295*e);var f=Math.cos(.017453292519943295*e),n=Math.sin(.2617993877991494*c), +p=Math.cos(.2617993877991494*c),q=[l*m,l*k,h];h=[-h*m,-h*k,l];k=[k,-m,0];l=-15*S(a);a=E(l,q);q=E(l,h);k=E(l,k);b=[f*p,f*n,b];n=b[0]*a[0]+b[1]*a[1]+b[2]*a[2];q=b[0]*q[0]+b[1]*q[1]+b[2]*q[2];k=b[0]*k[0]+b[1]*k[1]+b[2]*k[2];p=Math.sqrt(q*q+k*k);f=0;0f&&(f+=360),360<=f&&(f-=360));n=57.29577951308232*Math.atan2(p,n);p=e;if(g&&(e=n,g=d.Refraction(g,90-n),n-=g,0k;++k)g.push((b[k]-e*a[k])/q*c+a[k]*p);p=Math.sqrt(g[0]*g[0]+g[1]*g[1]);0c&&(c+=24),24<=c&&(c-=24)):c=0;p=57.29577951308232*Math.atan2(g[2],p)}return new qa(f,90-n,c,p)};var ra=function(a,b,c){this.latitude=a;this.longitude=b;this.height=c};d.MakeObserver=function(a,b,c){return new ra(a,b,c||0)};d.SunPosition=function(a){a=d.MakeTime(a).AddDays(-.005775518331089121);var b=B(A.Earth,a);b=R(0,[-b.x, +-b.y,-b.z],a.tt);b=Y(a,0,b);a=.017453292519943295*P(a).tobl;return ea(b[0],b[1],b[2],Math.cos(a),Math.sin(a))};d.Equator=function(a,b,c,e,g){b=d.MakeTime(b);var h=S(b),l=.017453292519943295*c.latitude,k=Math.sin(l);l=Math.cos(l);var m=1/Math.sqrt(l*l+.9933056020041345*k*k),f=c.height/1E3,n=6378.1366*m+f;c=.017453292519943295*(15*h+c.longitude);c=Y(b,-1,[n*l*Math.cos(c)/1.4959787069098932E8,n*l*Math.sin(c)/1.4959787069098932E8,(6335.438815127603*m+f)*k/1.4959787069098932E8]);c=R(b.tt,c,0);a=d.GeoVector(a, +b,g);a=[a.x-c[0],a.y-c[1],a.z-c[2]];if(!e)return ca(a);e=R(0,a,b.tt);e=Y(b,0,e);return ca(e)};d.Ecliptic=function(a,b,c){void 0===U&&(U=.017453292519943295*P(d.MakeTime(aa)).mobl,ha=Math.cos(U),ia=Math.sin(U));return ea(a,b,c,ha,ia)};d.GeoMoon=function(a){a=d.MakeTime(a);var b=D(a),c=b.distance_au*Math.cos(b.geo_eclip_lat);b=[c*Math.cos(b.geo_eclip_lon),c*Math.sin(b.geo_eclip_lon),b.distance_au*Math.sin(b.geo_eclip_lat)];var e=.017453292519943295*C(a);c=Math.cos(e);e=Math.sin(e);b=R(a.tt,[b[0],b[1]* +c-b[2]*e,b[1]*e+b[2]*c],0);return new t(b[0],b[1],b[2],a)};d.HelioVector=function(a,b){b=d.MakeTime(b);if(a in A)return B(A[a],b);if(a in ja){a:{var c=$jscomp.makeIterator(ja[a]);for(a=c.next();!a.done;a=c.next()){a=a.value;var e=a.tt;var g=a.tt+a.ndays;e=(2*b.tt-(g+e))/(g-e);if(-1<=e&&1>=e){var h=[];for(g=0;3>g;++g){var l=1;var k=a.coeff[0][g];var m=e;k+=a.coeff[1][g]*m;for(c=2;ck;++k){g=d.HelioVector(a,l);c&&(e=B(A.Earth,l));h=new t(g.x-e.x,g.y-e.y,g.z-e.z,b);if("Sun"===a)return h;var m=b.AddDays(-h.Length()/173.1446326846693); +g=Math.abs(m.tt-l.tt);if(1E-9>g)return h;l=m}throw"Light-travel time solver did not converge: dt="+g;};d.Search=function(a,b,c,e){function g(b){++H.search_func;return a(b)}var h=Math.abs((e&&e.dt_tolerance_seconds||1)/86400);++H.search;var l=e&&e.init_f1||g(b),k=e&&e.init_f2||g(c),m,f=0;e=e&&e.iter_limit||20;for(var n=!0;;){if(++f>e)throw"Excessive iteration in Search()";var p=new L(b.ut+.5*(c.ut-b.ut)),q=p.ut-b.ut;if(Math.abs(q)(q.ut-b.ut)*(q.ut-c.ut)&&0>(r.ut-b.ut)*(r.ut-c.ut))){v=g(q);var u=g(r);if(0>v&&0<=u){l=v;k=u;b=q;c=r;m=t;n=!1;continue}}}}if(0>l&&0<=m)c=p,k=m;else if(0>m&&0<=k)b=p,l=m;else return null}};d.SearchSunLongitude=function(a,b,c){b=d.MakeTime(b);c=b.AddDays(c);return d.Search(function(b){b=d.SunPosition(b);return I(b.elon-a)},b,c)};d.LongitudeFromSun=function(a, +b){if("Earth"===a)throw"The Earth does not have a longitude as seen from itself.";b=d.MakeTime(b);a=d.GeoVector(a,b,!0);a=d.Ecliptic(a.x,a.y,a.z);b=d.GeoVector("Sun",b,!0);b=d.Ecliptic(b.x,b.y,b.z);for(b=a.elon-b.elon;0>b;)b+=360;for(;360<=b;)b-=360;return b};d.AngleFromSun=function(a,b){if("Earth"==a)throw"The Earth does not have an angle as seen from itself.";var c=d.GeoVector("Sun",b,!0);a=d.GeoVector(a,b,!0);return y(c,a)};d.EclipticLongitude=function(a,b){if("Sun"===a)throw"Cannot calculate heliocentric longitude of the Sun."; +a=d.HelioVector(a,b);return d.Ecliptic(a.x,a.y,a.z).elon};var sa=function(a,b,c,d,g,h,l,k){this.time=a;this.mag=b;this.phase_angle=c;this.phase_fraction=(1+Math.cos(.017453292519943295*c))/2;this.helio_dist=d;this.geo_dist=g;this.gc=h;this.hc=l;this.ring_tilt=k};d.Illumination=function(a,b){if("Earth"===a)throw"The illumination of the Earth is not defined.";var c=d.MakeTime(b),e=B(A.Earth,c);if("Sun"===a){var g=new t(-e.x,-e.y,-e.z,c);b=new t(0,0,0,c);e=0}else"Moon"===a?(g=d.GeoMoon(c),b=new t(e.x+ +g.x,e.y+g.y,e.z+g.z,c)):(b=d.HelioVector(a,b),g=new t(b.x-e.x,b.y-e.y,b.z-e.z,c)),e=y(g,b);var h=g.Length(),l=b.Length(),k=null;if("Sun"===a)a=oa+5*Math.log10(h);else if("Moon"===a){a=.017453292519943295*e;var m=a*a;a=-12.717+1.49*Math.abs(a)+.0431*m*m;a+=5*Math.log10(h/.002573570052980638*l)}else if("Saturn"===a)a=e,k=d.Ecliptic(g.x,g.y,g.z),m=.017453292519943295*k.elat,k=Math.asin(Math.sin(m)*Math.cos(.4897393881096089)-Math.cos(m)*Math.sin(.4897393881096089)*Math.sin(.017453292519943295*k.elon- +.017453292519943295*(169.51+3.82E-5*c.tt))),m=Math.sin(Math.abs(k)),a=-9+.044*a+m*(-2.6+1.2*m)+5*Math.log10(l*h),k*=57.29577951308232;else{var f=m=0,n=0;switch(a){case "Mercury":a=-.6;m=4.98;f=-4.88;n=3.02;break;case "Venus":163.6>e?(a=-4.47,m=1.03,f=.57,n=.13):(a=.98,m=-1.02);break;case "Mars":a=-1.52;m=1.6;break;case "Jupiter":a=-9.4;m=.5;break;case "Uranus":a=-7.19;m=.25;break;case "Neptune":a=-6.87;break;case "Pluto":a=-1;m=4;break;default:throw"VisualMagnitude: unsupported body "+a;}var p=e/ +100;a=a+p*(m+p*(f+p*n))+5*Math.log10(l*h)}return new sa(c,a,e,l,h,g,b,k)};d.SearchRelativeLongitude=function(a,b,c){function e(c){var e=d.EclipticLongitude(a,c);c=d.EclipticLongitude("Earth",c);return I(h*(c-e)-b)}var g=T[a];if(!g)throw"Cannot search relative longitude because body is not a planet: "+a;if("Earth"===a)throw"Cannot search relative longitude for the Earth (it is always 0)";var h=g.OrbitalPeriod>T.Earth.OrbitalPeriod?1:-1;g=F(a);c=d.MakeTime(c);var l=e(c);0k;++k){++H.longitude_iter;var m=-l/360*g;c=c.AddDays(m);if(1>86400*Math.abs(m))return c;m=l;l=e(c);30>Math.abs(m)&&m!==l&&(m/=m-l,.5m&&(g*=m))}throw"Relative longitude search failed to converge for "+a+" near "+c.toString()+" (error_angle = "+l+").";};d.MoonPhase=function(a){return d.LongitudeFromSun("Moon",a)};d.SearchMoonPhase=function(a,b,c){function e(b){b=d.MoonPhase(b);return I(b-a)}b=d.MakeTime(b);var g=e(b);0c)return null; +c=Math.min(c,h+.9);g=b.AddDays(g);b=b.AddDays(c);return d.Search(e,g,b)};var ta=function(a,b){this.quarter=a;this.time=b};d.SearchMoonQuarter=function(a){var b=d.MoonPhase(a);b=(Math.floor(b/90)+1)%4;return(a=d.SearchMoonPhase(90*b,a,10))&&new ta(b,a)};d.NextMoonQuarter=function(a){a=new Date(a.time.date.getTime()+5184E5);return d.SearchMoonQuarter(a)};d.SearchRiseSet=function(a,b,c,e,g){function h(e){var f=d.Equator(a,e,b,!0,!0);e=d.Horizon(e,b,f.ra,f.dec).altitude+l/f.dist*57.29577951308232+pa; +return c*e}var l={Sun:.0046505,Moon:1.15717E-5}[a]||0;if("Earth"===a)throw"Cannot find rise or set time of the Earth.";if(1===c){var k=12;var m=0}else if(-1===c)k=0,m=12;else throw"Astronomy.SearchRiseSet: Invalid direction parameter "+c+" -- must be +1 or -1";e=d.MakeTime(e);var f=h(e);var n;if(0=f&&0=e.ut+g)return null;p=f.time;f=h(f.time);n=h(q.time)}};var ua=function(a,b){this.time=a;this.hor=b};d.SearchHourAngle=function(a,b,c,e){e=d.MakeTime(e);var g=0;if("Earth"===a)throw"Cannot search for hour angle of the Earth.";if(0>c||24<=c)throw"Invalid hour angle "+c;for(;;){++g;var h=S(e),l=d.Equator(a,e,b,!0,!0);h=(c+l.ra-b.longitude/15-h)%24;1===g?0>h&&(h+=24):-12>h?h+=24:123600*Math.abs(h))return a=d.Horizon(e,b,l.ra, +l.dec,"normal"),new ua(e,a);e=e.AddDays(h/24*.9972695717592592)}};var va=function(a,b,c,d){this.mar_equinox=a;this.jun_solstice=b;this.sep_equinox=c;this.dec_solstice=d};d.Seasons=function(a){function b(b,c,e){c=new Date(Date.UTC(a,c-1,e));b=d.SearchSunLongitude(b,c,4);if(!b)throw"Cannot find season change near "+c.toISOString();return b}a instanceof Date&&(a=a.getUTCFullYear());var c=b(0,3,19),e=b(90,6,19),g=b(180,9,21),h=b(270,12,20);return new va(c,e,g,h)};var wa=function(a,b,c,d){this.time=a; +this.visibility=b;this.elongation=c;this.ecliptic_separation=d};d.Elongation=function(a,b){b=d.MakeTime(b);var c=d.LongitudeFromSun(a,b);if(180=++g;){var h=d.EclipticLongitude(a,b),l=d.EclipticLongitude("Earth",b);l=I(h-l);var k=h=void 0,m=k=h=void 0;l>=-e.s1&&l<+e.s1?(m=0,h=+e.s1,k=+e.s2):l>=+e.s2||l<-e.s2?(m=0,h=-e.s2,k=-e.s1):0<=l?(m=-F(a)/4,h=+e.s1,k=+e.s2):(m=-F(a)/4,h=-e.s2,k=-e.s1);l=b.AddDays(m);h=d.SearchRelativeLongitude(a,h,l);k=d.SearchRelativeLongitude(a,k,h);l=c(h);if(0<=l)throw"SearchMaxElongation: internal error: m1 = "+l;m=c(k);if(0>=m)throw"SearchMaxElongation: internal error: m2 = "+m;l=d.Search(c,h,k,{init_f1:l, +init_f2:m,dt_tolerance_seconds:10});if(!l)throw"SearchMaxElongation: failed search iter "+g+" (t1="+h.toString()+", t2="+k.toString()+")";if(l.tt>=b.tt)return d.Elongation(a,l);b=k.AddDays(1)}throw"SearchMaxElongation: failed to find event after 2 tries.";};d.SearchPeakMagnitude=function(a,b){function c(b){var c=b.AddDays(-.005);b=b.AddDays(.005);c=d.Illumination(a,c).mag;return(d.Illumination(a,b).mag-c)/.01}if("Venus"!==a)throw"SearchPeakMagnitude currently works for Venus only.";b=d.MakeTime(b); +for(var e=0;2>=++e;){var g=d.EclipticLongitude(a,b),h=d.EclipticLongitude("Earth",b);h=I(g-h);var l=g=void 0,k=l=g=void 0;-10<=h&&10>h?(k=0,g=10,l=30):30<=h||-30>h?(k=0,g=-30,l=-10):0<=h?(k=-F(a)/4,g=10,l=30):(k=-F(a)/4,g=-30,l=-10);h=b.AddDays(k);g=d.SearchRelativeLongitude(a,g,h);l=d.SearchRelativeLongitude(a,l,g);h=c(g);if(0<=h)throw"SearchPeakMagnitude: internal error: m1 = "+h;k=c(l);if(0>=k)throw"SearchPeakMagnitude: internal error: m2 = "+k;h=d.Search(c,g,l,{init_f1:h,init_f2:k,dt_tolerance_seconds:10}); +if(!h)throw"SearchPeakMagnitude: failed search iter "+e+" (t1="+g.toString()+", t2="+l.toString()+")";if(h.tt>=b.tt)return d.Illumination(a,h);b=l.AddDays(1)}throw"SearchPeakMagnitude: failed to find event after 2 tries.";};var ka=function(a,b,c){this.time=a;this.kind=b;this.dist_au=c;this.dist_km=1.4959787069098932E8*c};d.SearchLunarApsis=function(a){function b(a){var b=a.AddDays(-5E-4);a=a.AddDays(5E-4);b=D(b).distance_au;return(D(a).distance_au-b)/.001}function c(a){return-b(a)}a=d.MakeTime(a); +var e=b(a);++H.lunar_apsis_calls;for(var g=0;59.061176>5*g;++g){++H.lunar_apsis_iter;var h=a.AddDays(5),l=b(h);if(0>=e*l){if(0>e||0l){a=d.Search(c,a,h,{init_f1:-e,init_f2:-l});if(null==a)throw"SearchLunarApsis INTERNAL ERROR: apogee search failed!";e=D(a).distance_au;return new ka(a,1,e)}throw"SearchLunarApsis INTERNAL ERROR: cannot classify apsis event!"; +}a=h;e=l}throw"SearchLunarApsis INTERNAL ERROR: could not find apsis within 2 synodic months of start date.";};d.NextLunarApsis=function(a){var b=d.SearchLunarApsis(a.time.AddDays(11));if(1!==b.kind+a.kind)throw"NextLunarApsis INTERNAL ERROR: did not find alternating apogee/perigee: prev="+a.kind+" @ "+a.time.toString()+", next="+b.kind+" @ "+b.time.toString();return b};d.InverseRotation=function(a){return new w([[a.rot[0][0],a.rot[1][0],a.rot[2][0]],[a.rot[0][1],a.rot[1][1],a.rot[2][1]],[a.rot[0][2], +a.rot[1][2],a.rot[2][2]]])};d.CombineRotation=function(a,b){return new w([[b.rot[0][0]*a.rot[0][0]+b.rot[1][0]*a.rot[0][1]+b.rot[2][0]*a.rot[0][2],b.rot[0][1]*a.rot[0][0]+b.rot[1][1]*a.rot[0][1]+b.rot[2][1]*a.rot[0][2],b.rot[0][2]*a.rot[0][0]+b.rot[1][2]*a.rot[0][1]+b.rot[2][2]*a.rot[0][2]],[b.rot[0][0]*a.rot[1][0]+b.rot[1][0]*a.rot[1][1]+b.rot[2][0]*a.rot[1][2],b.rot[0][1]*a.rot[1][0]+b.rot[1][1]*a.rot[1][1]+b.rot[2][1]*a.rot[1][2],b.rot[0][2]*a.rot[1][0]+b.rot[1][2]*a.rot[1][1]+b.rot[2][2]*a.rot[1][2]], +[b.rot[0][0]*a.rot[2][0]+b.rot[1][0]*a.rot[2][1]+b.rot[2][0]*a.rot[2][2],b.rot[0][1]*a.rot[2][0]+b.rot[1][1]*a.rot[2][1]+b.rot[2][1]*a.rot[2][2],b.rot[0][2]*a.rot[2][0]+b.rot[1][2]*a.rot[2][1]+b.rot[2][2]*a.rot[2][2]]])};d.VectorFromSphere=function(a,b){var c=.017453292519943295*a.lat,d=.017453292519943295*a.lon,g=a.dist*Math.cos(c);return new t(g*Math.cos(d),g*Math.sin(d),a.dist*Math.sin(c),b)};d.VectorFromEquator=function(a,b){return d.VectorFromSphere(new W(a.dec,15*a.ra,a.dist),b)};d.EquatorFromVector= +function(a){a=d.SphereFromVector(a);return new da(a.lon/15,a.lat,a.dist)};d.SphereFromVector=function(a){var b=a.x*a.x+a.y*a.y,c=Math.sqrt(b+a.z*a.z);if(0===b){if(0===a.z)throw"Zero-length vector not allowed.";var d=0;a=0>a.z?-90:90}else d=57.29577951308232*Math.atan2(a.y,a.x),0>d&&(d+=360),a=57.29577951308232*Math.atan2(a.z,Math.sqrt(b));return new W(a,d,c)};d.HorizonFromVector=function(a,b){a=d.SphereFromVector(a);a.lon=fa(a.lon);a.lat+=d.Refraction(b,a.lat);return a};d.VectorFromHorizon=function(a, +b,c){var e=fa(a.lon);c=a.lat+d.InverseRefraction(c,a.lat);a=new W(c,e,a.dist);return d.VectorFromSphere(a,b)};d.Refraction=function(a,b){if(-90>b||90c&&(c=-1);c=1.02/Math.tan(.017453292519943295*(c+10.3/(c+5.11)))/60;"normal"===a&&-1>b&&(c*=(b+90)/89)}else c=0;return c};d.InverseRefraction=function(a,b){if(-90>b||90Math.abs(e))return c-b;c-=e}};d.RotateVector=function(a, +b){return new t(a.rot[0][0]*b.x+a.rot[1][0]*b.y+a.rot[2][0]*b.z,a.rot[0][1]*b.x+a.rot[1][1]*b.y+a.rot[2][1]*b.z,a.rot[0][2]*b.x+a.rot[1][2]*b.y+a.rot[2][2]*b.z,b.t)};d.Rotation_EQJ_ECL=function(){return new w([[1,0,0],[0,.9174821430670688,-.3977769691083922],[0,.3977769691083922,.9174821430670688]])};d.Rotation_ECL_EQJ=function(){return new w([[1,0,0],[0,.9174821430670688,.3977769691083922],[0,-.3977769691083922,.9174821430670688]])};d.Rotation_EQJ_EQD=function(a){var b=X(0,a.tt);a=Z(a,0);return d.CombineRotation(b, +a)};d.Rotation_EQD_EQJ=function(a){var b=Z(a,1);a=X(a.tt,0);return d.CombineRotation(b,a)};d.Rotation_EQD_HOR=function(a,b){var c=Math.sin(.017453292519943295*b.latitude),d=Math.cos(.017453292519943295*b.latitude),g=Math.sin(.017453292519943295*b.longitude),h=Math.cos(.017453292519943295*b.longitude);b=[d*h,d*g,c];c=[-c*h,-c*g,d];g=[g,-h,0];a=-15*S(a);b=E(a,b);c=E(a,c);a=E(a,g);return new w([[c[0],a[0],b[0]],[c[1],a[1],b[1]],[c[2],a[2],b[2]]])};d.Rotation_HOR_EQD=function(a,b){a=d.Rotation_EQD_HOR(a, +b);return d.InverseRotation(a)};d.Rotation_HOR_EQJ=function(a,b){b=d.Rotation_HOR_EQD(a,b);a=d.Rotation_EQD_EQJ(a);return d.CombineRotation(b,a)};d.Rotation_EQJ_HOR=function(a,b){a=d.Rotation_HOR_EQJ(a,b);return d.InverseRotation(a)};d.Rotation_EQD_ECL=function(a){a=d.Rotation_EQD_EQJ(a);var b=d.Rotation_EQJ_ECL();return d.CombineRotation(a,b)};d.Rotation_ECL_EQD=function(a){a=d.Rotation_EQD_ECL(a);return d.InverseRotation(a)};d.Rotation_ECL_HOR=function(a,b){var c=d.Rotation_ECL_EQD(a);a=d.Rotation_EQD_HOR(a, +b);return d.CombineRotation(c,a)};d.Rotation_HOR_ECL=function(a,b){a=d.Rotation_ECL_HOR(a,b);return d.InverseRotation(a)}})("undefined"===typeof exports?this.Astronomy={}:exports); diff --git a/source/python/astronomy.py b/source/python/astronomy.py index a6fa1376..d5e2cc00 100644 --- a/source/python/astronomy.py +++ b/source/python/astronomy.py @@ -2874,7 +2874,12 @@ _vsop = [ [0.00807830553, 5.18592878704, 1.48447270830], [0.00537760510, 4.52113935896, 35.16409022120], [0.00495725141, 1.57105641650, 491.55792945680], - [0.00274571975, 1.84552258866, 175.16605980020] + [0.00274571975, 1.84552258866, 175.16605980020], + [0.00012012320, 1.92059384991, 1021.24889455140], + [0.00121801746, 5.79754470298, 76.26607127560], + [0.00100896068, 0.37702724930, 73.29712585900], + [0.00135134092, 3.37220609835, 39.61750834610], + [0.00007571796, 1.07149207335, 388.46515523820] ] ] ],