JS: More unit testing of rotation. Fixed a couple of bugs.

This commit is contained in:
Don Cross
2019-12-13 20:18:48 -05:00
parent 68f816f0a8
commit 690d3d0528
4 changed files with 211 additions and 130 deletions

View File

@@ -58,9 +58,90 @@ function Rotation_MatrixMultiply() {
CompareMatrices('Rotation_MatrixMultiply', c, v, 0);
}
function VectorDiff(a, b) {
const dx = a.x - b.x;
const dy = a.y - b.y;
const dz = a.z - b.z;
return Math.sqrt(dx*dx + dy*dy + dz*dz);
}
function Test_EQJ_ECL() {
const r = Astronomy.Rotation_EQJ_ECL();
/* Calculate heliocentric Earth position at a test time. */
const time = Astronomy.MakeTime(new Date('2019-12-08T19:39:15Z'));
const ev = Astronomy.HelioVector('Earth', time);
/* Use the existing Astronomy.Ecliptic() to calculate ecliptic vector and angles. */
const ecl = Astronomy.Ecliptic(ev.x, ev.y, ev.z);
console.log(`Test_EQJ_ECL ecl = (${ecl.ex}, ${ecl.ey}, ${ecl.ez})`);
/* Now compute the same vector via rotation matrix. */
const ee = Astronomy.RotateVector(r, ev);
const dx = ee.x - ecl.ex;
const dy = ee.y - ecl.ey;
const dz = ee.z - ecl.ez;
const diff = Math.sqrt(dx*dx + dy*dy + dz*dz);
console.log(`Test_EQJ_ECL ee = (${ee.x}, ${ee.y}, ${ee.z}); diff = ${diff}`);
if (diff > 1.0e-16)
throw 'Test_EQJ_ECL: EXCESSIVE VECTOR ERROR';
/* Reverse the test: go from ecliptic back to equatorial. */
const ir = Astronomy.Rotation_ECL_EQJ();
const et = Astronomy.RotateVector(ir, ee);
const idiff = VectorDiff(et, ev);
console.log(`Test_EQJ_ECL ev diff = ${idiff}`);
if (idiff > 1.0e-16)
throw 'Test_EQJ_ECL: EXCESSIVE REVERSE ROTATION ERROR';
}
function Test_EQJ_EQD(body) {
/* Verify conversion of equatorial J2000 to equatorial of-date, and back. */
/* Use established functions to calculate spherical coordinates for the body, in both EQJ and EQD. */
const time = Astronomy.MakeTime(new Date('2019-12-08T20:50:00Z'));
const observer = Astronomy.MakeObserver(+35, -85, 0);
const eq2000 = Astronomy.Equator(body, time, observer, false, true);
const eqdate = Astronomy.Equator(body, time, observer, true, true);
/* Convert EQJ spherical coordinates to vector. */
const sphere = {lat:eq2000.dec, lon:15*eq2000.ra, dist:eq2000.dist};
const v2000 = Astronomy.VectorFromSphere(sphere, time);
/* Find rotation matrix. */
const r = Astronomy.Rotation_EQJ_EQD(time);
/* Rotate EQJ vector to EQD vector. */
const vdate = Astronomy.RotateVector(r, v2000);
/* Convert vector back to spherical coordinates. */
let xsphere = Astronomy.SphereFromVector(vdate);
/* Compare the result with the eqdate. */
const ra_diff = Math.abs((xsphere.lon / 15) - eqdate.ra);
const dec_diff = Math.abs(xsphere.lat - eqdate.dec);
const dist_diff = Math.abs(xsphere.dist - eqdate.dist);
console.log(`Test_EQJ_EQD: ${body} ra=${eqdate.ra}, dec=${eqdate.dec}, dist=${eqdate.dist}, ra_diff=${ra_diff}, dec_diff=${dec_diff}, dist_diff=${dist_diff}`);
if (ra_diff > 1.0e-14 || dec_diff > 1.0e-14 || dist_diff > 4.0e-15)
throw 'Test_EQJ_EQD: EXCESSIVE ERROR';
/* Perform the inverse conversion back to equatorial J2000 coordinates. */
const ir = Astronomy.Rotation_EQD_EQJ(time);
const t2000 = Astronomy.RotateVector(ir, vdate);
const diff = VectorDiff(t2000, v2000);
console.log(`Test_EQJ_EQD: ${body} inverse diff = ${diff}`);
if (diff > 3.0e-15)
throw 'Test_EQJ_EQD: EXCESSIVE INVERSE ERROR';
}
function RotationTest() {
Rotation_MatrixInverse();
Rotation_MatrixMultiply();
Test_EQJ_ECL();
Test_EQJ_EQD('Mercury');
Test_EQJ_EQD('Venus');
Test_EQJ_EQD('Mars');
Test_EQJ_EQD('Jupiter');
Test_EQJ_EQD('Saturn');
}
RotationTest();

View File

@@ -794,19 +794,19 @@ function precession_rot(tt1, tt2) {
if (tt2 === 0) {
// Perform rotation from epoch to J2000.0.
return [
return new RotationMatrix([
[xx, yx, zx],
[xy, yy, zy],
[xz, yz, zz]
];
]);
}
// Perform rotation from J2000.0 to epoch.
return [
return new RotationMatrix([
[xx, xy, xz],
[yx, yy, yz],
[zx, zy, zz]
];
]);
}
function era(time) { // Earth Rotation Angle
@@ -921,19 +921,19 @@ function nutation_rot(time, direction) {
if (direction === 0) {
// forward rotation
return [
return new RotationMatrix([
[xx, xy, xz],
[yx, yy, yz],
[zx, zy, zz]
];
]);
}
// inverse rotation
return [
return new RotationMatrix([
[xx, yx, zx],
[xy, yy, zy],
[xz, yz, zz]
];
]);
}
function geo_pos(time, observer) {

View File

@@ -1815,19 +1815,19 @@ function precession_rot(tt1, tt2) {
if (tt2 === 0) {
// Perform rotation from epoch to J2000.0.
return [
return new RotationMatrix([
[xx, yx, zx],
[xy, yy, zy],
[xz, yz, zz]
];
]);
}
// Perform rotation from J2000.0 to epoch.
return [
return new RotationMatrix([
[xx, xy, xz],
[yx, yy, yz],
[zx, zy, zz]
];
]);
}
function era(time) { // Earth Rotation Angle
@@ -1942,19 +1942,19 @@ function nutation_rot(time, direction) {
if (direction === 0) {
// forward rotation
return [
return new RotationMatrix([
[xx, xy, xz],
[yx, yy, yz],
[zx, zy, zz]
];
]);
}
// inverse rotation
return [
return new RotationMatrix([
[xx, yx, zx],
[xy, yy, zy],
[xz, yz, zz]
];
]);
}
function geo_pos(time, observer) {

View File

@@ -28,126 +28,126 @@
SOFTWARE.
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(d){var v=0;return function(){return v<d.length?{done:!1,value:d[v++]}:{done:!0}}};$jscomp.arrayIterator=function(d){return{next:$jscomp.arrayIteratorImpl(d)}};$jscomp.makeIterator=function(d){var v="undefined"!=typeof Symbol&&Symbol.iterator&&d[Symbol.iterator];return v?v.call(d):$jscomp.arrayIterator(d)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(d,v,y){d!=Array.prototype&&d!=Object.prototype&&(d[v]=y.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(d,v,y,A){if(v){y=$jscomp.global;d=d.split(".");for(A=0;A<d.length-1;A++){var B=d[A];B in y||(y[B]={});y=y[B]}d=d[d.length-1];A=y[d];v=v(A);v!=A&&null!=v&&$jscomp.defineProperty(y,d,{configurable:!0,writable:!0,value:v})}};$jscomp.polyfill("Math.log10",function(d){return d?d:function(d){return Math.log(d)/Math.LN10}},"es6","es3");
(function(d){function v(a){return a-Math.floor(a)}function y(a,b){var c=a.x*a.x+a.y*a.y+a.z*a.z;if(1E-8>Math.abs(c))throw"AngleBetween: first vector is too short.";var e=b.x*b.x+b.y*b.y+b.z*b.z;if(1E-8>Math.abs(e))throw"AngleBetween: second vector is too short.";a=(a.x*b.x+a.y*b.y+a.z*b.z)/Math.sqrt(c*e);return-1>=a?180:1<=a?0:57.29577951308232*Math.acos(a)}function A(a){a:{var b=a+51544.5;if(b<=r[0].mjd)b=r[0].dt;else if(b>=r[r.length-1].mjd)b=r[r.length-1].dt;else{for(var c=0,e=r.length-2;c<=e;){var l=
c+e>>1;if(b<r[l].mjd)e=l-1;else if(b>r[l+1].mjd)c=l+1;else{b=r[l].dt+(b-r[l].mjd)/(r[l+1].mjd-r[l].mjd)*(r[l+1].dt-r[l].dt);break a}}throw"Could not find Delta-T value for MJD="+b;}}return a+b/86400}function B(a){a=a.tt/36525;return(((((-4.34E-8*a-5.76E-7)*a+.0020034)*a-1.831E-4)*a-46.836769)*a+84381.406)/3600}function N(a){var b;if(!P||1E-6<Math.abs(P.tt-a.tt)){var c;var e=a.tt/36525;var l=(485868.249036+1.7179159232178E9*e)%1296E3*4.84813681109536E-6;var d=(1287104.79305+1.295965810481E8*e)%1296E3*
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(d,v,z){d!=Array.prototype&&d!=Object.prototype&&(d[v]=z.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(d,v,z,A){if(v){z=$jscomp.global;d=d.split(".");for(A=0;A<d.length-1;A++){var E=d[A];E in z||(z[E]={});z=z[E]}d=d[d.length-1];A=z[d];v=v(A);v!=A&&null!=v&&$jscomp.defineProperty(z,d,{configurable:!0,writable:!0,value:v})}};$jscomp.polyfill("Math.log10",function(d){return d?d:function(d){return Math.log(d)/Math.LN10}},"es6","es3");
(function(d){function v(a){return a-Math.floor(a)}function z(a,b){var c=a.x*a.x+a.y*a.y+a.z*a.z;if(1E-8>Math.abs(c))throw"AngleBetween: first vector is too short.";var e=b.x*b.x+b.y*b.y+b.z*b.z;if(1E-8>Math.abs(e))throw"AngleBetween: second vector is too short.";a=(a.x*b.x+a.y*b.y+a.z*b.z)/Math.sqrt(c*e);return-1>=a?180:1<=a?0:57.29577951308232*Math.acos(a)}function A(a){a:{var b=a+51544.5;if(b<=r[0].mjd)b=r[0].dt;else if(b>=r[r.length-1].mjd)b=r[r.length-1].dt;else{for(var c=0,e=r.length-2;c<=e;){var l=
c+e>>1;if(b<r[l].mjd)e=l-1;else if(b>r[l+1].mjd)c=l+1;else{b=r[l].dt+(b-r[l].mjd)/(r[l+1].mjd-r[l].mjd)*(r[l+1].dt-r[l].dt);break a}}throw"Could not find Delta-T value for MJD="+b;}}return a+b/86400}function E(a){a=a.tt/36525;return(((((-4.34E-8*a-5.76E-7)*a+.0020034)*a-1.831E-4)*a-46.836769)*a+84381.406)/3600}function F(a){var b;if(!P||1E-6<Math.abs(P.tt-a.tt)){var c;var e=a.tt/36525;var l=(485868.249036+1.7179159232178E9*e)%1296E3*4.84813681109536E-6;var d=(1287104.79305+1.295965810481E8*e)%1296E3*
4.84813681109536E-6;var k=(335779.526232+1.7395272628478E9*e)%1296E3*4.84813681109536E-6;var h=(1072260.70369+1.602961601209E9*e)%1296E3*4.84813681109536E-6;var m=(450160.398036-6962890.5431*e)%1296E3*4.84813681109536E-6;var f=c=0;for(b=76;0<=b;--b){var n=X[b].nals;var p=X[b].cls;var q=(n[0]*l+n[1]*d+n[2]*k+n[3]*h+n[4]*m)%I;n=Math.sin(q);q=Math.cos(q);c+=(p[0]+p[1]*e)*n+p[2]*q;f+=(p[3]+p[4]*e)*q+p[5]*n}b=(-6.544984694978736E-10+4.848136811095359E-13*c)/4.84813681109536E-6;f=(1.8810770827049994E-9+
4.848136811095359E-13*f)/4.84813681109536E-6;e=B(a);P={tt:a.tt,dpsi:b,deps:f,ee:b*Math.cos(.017453292519943295*e)/15,mobl:e,tobl:e+f/3600}}return P}function E(a){function b(a,b){var c=[],e;for(e=0;e<=b-a;++e)c.push(0);return{min:a,array:c}}function c(a,c,e,f){var d=[],l;for(l=0;l<=c-a;++l)d.push(b(e,f));return{min:a,array:d}}function e(a,b,c){a=a.array[b-a.min];return a.array[c-a.min]}function d(a,b,c){a=w.array[a-w.min];a.array[b-a.min]=c}function g(a,b,c){a=r.array[a-r.min];a.array[b-a.min]=c}function k(a,
b,c,e,f){return f(a*c-b*e,b*c+a*e)}function h(a){return Math.sin(I*a)}function m(a,b,c,f){var d={x:1,y:0};a=[null,a,b,c,f];for(b=1;4>=b;++b)0!==a[b]&&k(d.x,d.y,e(w,a[b],b),e(r,a[b],b),function(a,b){return d.x=a,d.y=b});return d}function f(a,b,c,e,d,f,l,g){d=m(d,f,l,g);q+=a*d.y;t+=b*d.y;y+=c*d.x;A+=e*d.x}++J.calcmoon;a=a.tt/36525;var n,p,q,t,w=c(-6,6,1,4),r=c(-6,6,1,4);var u=a*a;var y=t=q=0;var A=3422.7;var z=h(.19833+.05611*a);var B=h(.27869+.04508*a);var L=h(.16827-.36903*a);var F=h(.34734-5.37261*
a),G=h(.10498-5.37899*a),C=h(.42681-.41855*a),N=h(.14943-5.37511*a);var E=.84*z+.31*B+14.27*L+7.26*F+.28*G+.24*C;var K=2.94*z+.31*B+14.27*L+9.34*F+1.12*G+.83*C;var H=-6.4*z-1.89*C;L=.21*z+.31*B+14.27*L-88.7*F-15.3*G+.24*C-1.86*N;B=E-H;z=-3.332E-6*h(.59734-5.37261*a)-5.39E-7*h(.35498-5.37899*a)-6.4E-8*h(.39943-5.37511*a);E=I*v(.60643382+1336.85522467*a-3.13E-6*u)+E/M;K=I*v(.37489701+1325.55240982*a+2.565E-5*u)+K/M;H=I*v(.99312619+99.99735956*a-4.4E-7*u)+H/M;L=I*v(.25909118+1342.2278298*a-8.92E-6*u)+
L/M;u=I*v(.82736186+1236.85308708*a-3.97E-6*u)+B/M;for(n=1;4>=n;++n){switch(n){case 1:var D=K;var x=4;var O=1.000002208;break;case 2:D=H;x=3;O=.997504612-.002495388*a;break;case 3:D=L;x=4;O=1.000002708+139.978*z;break;case 4:D=u,x=6,O=1}d(0,n,1);d(1,n,Math.cos(D)*O);g(0,n,0);g(1,n,Math.sin(D)*O);for(p=2;p<=x;++p)k(e(w,p-1,n),e(r,p-1,n),e(w,1,n),e(r,1,n),function(a,b){return d(p,n,a),g(p,n,b)});for(p=1;p<=x;++p)d(-p,n,e(w,p,n)),g(-p,n,-e(r,p,n))}f(13.902,14.06,-.001,.2607,0,0,0,4);f(.403,-4.01,.394,
4.848136811095359E-13*f)/4.84813681109536E-6;e=E(a);P={tt:a.tt,dpsi:b,deps:f,ee:b*Math.cos(.017453292519943295*e)/15,mobl:e,tobl:e+f/3600}}return P}function J(a){function b(a,b){var c=[],e;for(e=0;e<=b-a;++e)c.push(0);return{min:a,array:c}}function c(a,c,e,f){var d=[],l;for(l=0;l<=c-a;++l)d.push(b(e,f));return{min:a,array:d}}function e(a,b,c){a=a.array[b-a.min];return a.array[c-a.min]}function d(a,b,c){a=w.array[a-w.min];a.array[b-a.min]=c}function g(a,b,c){a=r.array[a-r.min];a.array[b-a.min]=c}function k(a,
b,c,e,f){return f(a*c-b*e,b*c+a*e)}function h(a){return Math.sin(I*a)}function m(a,b,c,f){var d={x:1,y:0};a=[null,a,b,c,f];for(b=1;4>=b;++b)0!==a[b]&&k(d.x,d.y,e(w,a[b],b),e(r,a[b],b),function(a,b){return d.x=a,d.y=b});return d}function f(a,b,c,e,d,f,l,g){d=m(d,f,l,g);q+=a*d.y;t+=b*d.y;z+=c*d.x;A+=e*d.x}++K.calcmoon;a=a.tt/36525;var n,p,q,t,w=c(-6,6,1,4),r=c(-6,6,1,4);var u=a*a;var z=t=q=0;var A=3422.7;var x=h(.19833+.05611*a);var B=h(.27869+.04508*a);var L=h(.16827-.36903*a);var E=h(.34734-5.37261*
a),G=h(.10498-5.37899*a),C=h(.42681-.41855*a),N=h(.14943-5.37511*a);var F=.84*x+.31*B+14.27*L+7.26*E+.28*G+.24*C;var J=2.94*x+.31*B+14.27*L+9.34*E+1.12*G+.83*C;var H=-6.4*x-1.89*C;L=.21*x+.31*B+14.27*L-88.7*E-15.3*G+.24*C-1.86*N;B=F-H;x=-3.332E-6*h(.59734-5.37261*a)-5.39E-7*h(.35498-5.37899*a)-6.4E-8*h(.39943-5.37511*a);F=I*v(.60643382+1336.85522467*a-3.13E-6*u)+F/M;J=I*v(.37489701+1325.55240982*a+2.565E-5*u)+J/M;H=I*v(.99312619+99.99735956*a-4.4E-7*u)+H/M;L=I*v(.25909118+1342.2278298*a-8.92E-6*u)+
L/M;u=I*v(.82736186+1236.85308708*a-3.97E-6*u)+B/M;for(n=1;4>=n;++n){switch(n){case 1:var D=J;var y=4;var O=1.000002208;break;case 2:D=H;y=3;O=.997504612-.002495388*a;break;case 3:D=L;y=4;O=1.000002708+139.978*x;break;case 4:D=u,y=6,O=1}d(0,n,1);d(1,n,Math.cos(D)*O);g(0,n,0);g(1,n,Math.sin(D)*O);for(p=2;p<=y;++p)k(e(w,p-1,n),e(r,p-1,n),e(w,1,n),e(r,1,n),function(a,b){return d(p,n,a),g(p,n,b)});for(p=1;p<=y;++p)d(-p,n,e(w,p,n)),g(-p,n,-e(r,p,n))}f(13.902,14.06,-.001,.2607,0,0,0,4);f(.403,-4.01,.394,
.0023,0,0,0,3);f(2369.912,2373.36,.601,28.2333,0,0,0,2);f(-125.154,-112.79,-.725,-.9781,0,0,0,1);f(1.979,6.98,-.445,.0433,1,0,0,4);f(191.953,192.72,.029,3.0861,1,0,0,2);f(-8.466,-13.51,.455,-.1093,1,0,0,1);f(22639.5,22609.07,.079,186.5398,1,0,0,0);f(18.609,3.59,-.094,.0118,1,0,0,-1);f(-4586.465,-4578.13,-.077,34.3117,1,0,0,-2);f(3.215,5.44,.192,-.0386,1,0,0,-3);f(-38.428,-38.64,.001,.6008,1,0,0,-4);f(-.393,-1.43,-.092,.0086,1,0,0,-6);f(-.289,-1.59,.123,-.0053,0,1,0,4);f(-24.42,-25.1,.04,-.3,0,1,0,
2);f(18.023,17.93,.007,.1494,0,1,0,1);f(-668.146,-126.98,-1.302,-.3997,0,1,0,0);f(.56,.32,-.001,-.0037,0,1,0,-1);f(-165.145,-165.06,.054,1.9178,0,1,0,-2);f(-1.877,-6.46,-.416,.0339,0,1,0,-4);f(.213,1.02,-.074,.0054,2,0,0,4);f(14.387,14.78,-.017,.2833,2,0,0,2);f(-.586,-1.2,.054,-.01,2,0,0,1);f(769.016,767.96,.107,10.1657,2,0,0,0);f(1.75,2.01,-.018,.0155,2,0,0,-1);f(-211.656,-152.53,5.679,-.3039,2,0,0,-2);f(1.225,.91,-.03,-.0088,2,0,0,-3);f(-30.773,-34.07,-.308,.3722,2,0,0,-4);f(-.57,-1.4,-.074,.0109,
2,0,0,-6);f(-2.921,-11.75,.787,-.0484,1,1,0,2);f(1.267,1.52,-.022,.0164,1,1,0,1);f(-109.673,-115.18,.461,-.949,1,1,0,0);f(-205.962,-182.36,2.056,1.4437,1,1,0,-2);f(.233,.36,.012,-.0025,1,1,0,-3);f(-4.391,-9.66,-.471,.0673,1,1,0,-4);f(.283,1.53,-.111,.006,1,-1,0,4);f(14.577,31.7,-1.54,.2302,1,-1,0,2);f(147.687,138.76,.679,1.1528,1,-1,0,0);f(-1.089,.55,.021,0,1,-1,0,-1);f(28.475,23.59,-.443,-.2257,1,-1,0,-2);f(-.276,-.38,-.006,-.0036,1,-1,0,-3);f(.636,2.27,.146,-.0102,1,-1,0,-4);f(-.189,-1.68,.131,
-.0028,0,2,0,2);f(-7.486,-.66,-.037,-.0086,0,2,0,0);f(-8.096,-16.35,-.74,.0918,0,2,0,-2);f(-5.741,-.04,0,-9E-4,0,0,2,2);f(.255,0,0,0,0,0,2,1);f(-411.608,-.2,0,-.0124,0,0,2,0);f(.584,.84,0,.0071,0,0,2,-1);f(-55.173,-52.14,0,-.1052,0,0,2,-2);f(.254,.25,0,-.0017,0,0,2,-3);f(.025,-1.67,0,.0031,0,0,2,-4);f(1.06,2.96,-.166,.0243,3,0,0,2);f(36.124,50.64,-1.3,.6215,3,0,0,0);f(-13.193,-16.4,.258,-.1187,3,0,0,-2);f(-1.187,-.74,.042,.0074,3,0,0,-4);f(-.293,-.31,-.002,.0046,3,0,0,-6);f(-.29,-1.45,.116,-.0051,
2,1,0,2);f(-7.649,-10.56,.259,-.1038,2,1,0,0);f(-8.627,-7.59,.078,-.0192,2,1,0,-2);f(-2.74,-2.54,.022,.0324,2,1,0,-4);f(1.181,3.32,-.212,.0213,2,-1,0,2);f(9.703,11.67,-.151,.1268,2,-1,0,0);f(-.352,-.37,.001,-.0028,2,-1,0,-1);f(-2.494,-1.17,-.003,-.0017,2,-1,0,-2);f(.36,.2,-.012,-.0043,2,-1,0,-4);f(-1.167,-1.25,.008,-.0106,1,2,0,0);f(-7.412,-6.12,.117,.0484,1,2,0,-2);f(-.311,-.65,-.032,.0044,1,2,0,-4);f(.757,1.82,-.105,.0112,1,-2,0,2);f(2.58,2.32,.027,.0196,1,-2,0,0);f(2.533,2.4,-.014,-.0212,1,-2,
0,-2);f(-.344,-.57,-.025,.0036,0,3,0,-2);f(-.992,-.02,0,0,1,0,2,2);f(-45.099,-.02,0,-.001,1,0,2,0);f(-.179,-9.52,0,-.0833,1,0,2,-2);f(-.301,-.33,0,.0014,1,0,2,-4);f(-6.382,-3.37,0,-.0481,1,0,-2,2);f(39.528,85.13,0,-.7136,1,0,-2,0);f(9.366,.71,0,-.0112,1,0,-2,-2);f(.202,.02,0,0,1,0,-2,-4);f(.415,.1,0,.0013,0,1,2,0);f(-2.152,-2.26,0,-.0066,0,1,2,-2);f(-1.44,-1.3,0,.0014,0,1,-2,2);f(.384,-.04,0,0,0,1,-2,-2);f(1.938,3.6,-.145,.0401,4,0,0,0);f(-.952,-1.58,.052,-.013,4,0,0,-2);f(-.551,-.94,.032,-.0097,
3,1,0,0);f(-.482,-.57,.005,-.0045,3,1,0,-2);f(.681,.96,-.026,.0115,3,-1,0,0);f(-.297,-.27,.002,-9E-4,2,2,0,-2);f(.254,.21,-.003,0,2,-2,0,-2);f(-.25,-.22,.004,.0014,1,3,0,-2);f(-3.996,0,0,4E-4,2,0,2,0);f(.557,-.75,0,-.009,2,0,2,-2);f(-.459,-.38,0,-.0053,2,0,-2,2);f(-1.298,.74,0,4E-4,2,0,-2,0);f(.538,1.14,0,-.0141,2,0,-2,-2);f(.263,.02,0,0,1,1,2,0);f(.426,.07,0,-6E-4,1,1,-2,-2);f(-.304,.03,0,3E-4,1,-1,2,0);f(-.372,-.19,0,-.0027,1,-1,-2,2);f(.418,0,0,0,0,0,4,0);f(-.33,-.04,0,0,3,0,2,0);x=-526.069*m(0,
0,1,-2).y;x+=-3.352*m(0,0,1,-4).y;x+=44.297*m(1,0,1,-2).y;x+=-6*m(1,0,1,-4).y;x+=20.599*m(-1,0,1,0).y;x+=-30.598*m(-1,0,1,-2).y;x+=-24.649*m(-2,0,1,0).y;x+=-2*m(-2,0,1,-2).y;x+=-22.571*m(0,1,1,-2).y;x+=10.985*m(0,-1,1,-2).y;q+=.82*h(.7736-62.5512*a)+.31*h(.0466-125.1025*a)+.35*h(.5785-25.1042*a)+.66*h(.4591+1335.8075*a)+.64*h(.313-91.568*a)+1.14*h(.148+1331.2898*a)+.21*h(.5918+1056.5859*a)+.44*h(.5784+1322.8595*a)+.24*h(.2275-5.7374*a)+.28*h(.2965+2.6929*a)+.33*h(.3132+6.3368*a);a=L+t/M;a=(1.000002708+
139.978*z)*(18518.511+1.189+y)*Math.sin(a)-6.24*Math.sin(3*a)+x;return{geo_eclip_lon:I*v((E+q/M)/I),geo_eclip_lat:Math.PI/648E3*a,distance_au:4.263520978299708E-5*M/(.999953253*A)}}function Q(a,b,c){var e=84381.406;if(0!==a&&0!==c)throw"One of (tt1, tt2) must be 0.";a=(c-a)/36525;0===c&&(a=-a);var d=((((3.337E-7*a-4.67E-7)*a-.00772503)*a+.0512623)*a-.025754)*a+e;e*=4.84813681109536E-6;var g=((((-9.51E-8*a+1.32851E-4)*a-.00114045)*a-1.0790069)*a+5038.481507)*a*4.84813681109536E-6;d*=4.84813681109536E-6;
3,1,0,0);f(-.482,-.57,.005,-.0045,3,1,0,-2);f(.681,.96,-.026,.0115,3,-1,0,0);f(-.297,-.27,.002,-9E-4,2,2,0,-2);f(.254,.21,-.003,0,2,-2,0,-2);f(-.25,-.22,.004,.0014,1,3,0,-2);f(-3.996,0,0,4E-4,2,0,2,0);f(.557,-.75,0,-.009,2,0,2,-2);f(-.459,-.38,0,-.0053,2,0,-2,2);f(-1.298,.74,0,4E-4,2,0,-2,0);f(.538,1.14,0,-.0141,2,0,-2,-2);f(.263,.02,0,0,1,1,2,0);f(.426,.07,0,-6E-4,1,1,-2,-2);f(-.304,.03,0,3E-4,1,-1,2,0);f(-.372,-.19,0,-.0027,1,-1,-2,2);f(.418,0,0,0,0,0,4,0);f(-.33,-.04,0,0,3,0,2,0);y=-526.069*m(0,
0,1,-2).y;y+=-3.352*m(0,0,1,-4).y;y+=44.297*m(1,0,1,-2).y;y+=-6*m(1,0,1,-4).y;y+=20.599*m(-1,0,1,0).y;y+=-30.598*m(-1,0,1,-2).y;y+=-24.649*m(-2,0,1,0).y;y+=-2*m(-2,0,1,-2).y;y+=-22.571*m(0,1,1,-2).y;y+=10.985*m(0,-1,1,-2).y;q+=.82*h(.7736-62.5512*a)+.31*h(.0466-125.1025*a)+.35*h(.5785-25.1042*a)+.66*h(.4591+1335.8075*a)+.64*h(.313-91.568*a)+1.14*h(.148+1331.2898*a)+.21*h(.5918+1056.5859*a)+.44*h(.5784+1322.8595*a)+.24*h(.2275-5.7374*a)+.28*h(.2965+2.6929*a)+.33*h(.3132+6.3368*a);a=L+t/M;a=(1.000002708+
139.978*x)*(18518.511+1.189+z)*Math.sin(a)-6.24*Math.sin(3*a)+y;return{geo_eclip_lon:I*v((F+q/M)/I),geo_eclip_lat:Math.PI/648E3*a,distance_au:4.263520978299708E-5*M/(.999953253*A)}}function Q(a,b,c){var e=84381.406;if(0!==a&&0!==c)throw"One of (tt1, tt2) must be 0.";a=(c-a)/36525;0===c&&(a=-a);var d=((((3.337E-7*a-4.67E-7)*a-.00772503)*a+.0512623)*a-.025754)*a+e;e*=4.84813681109536E-6;var g=((((-9.51E-8*a+1.32851E-4)*a-.00114045)*a-1.0790069)*a+5038.481507)*a*4.84813681109536E-6;d*=4.84813681109536E-6;
var k=((((-5.6E-8*a+1.70663E-4)*a-.00121197)*a-2.3814292)*a+10.556403)*a*4.84813681109536E-6;a=Math.sin(e);e=Math.cos(e);var h=Math.sin(-g);g=Math.cos(-g);var m=Math.sin(-d);var f=Math.cos(-d);var n=Math.sin(k);var p=Math.cos(k);k=p*g-h*n*f;d=p*h*e+n*f*g*e-a*n*m;var q=p*h*a+n*f*g*a+e*n*m;var t=-n*g-h*p*f;var w=-n*h*e+p*f*g*e-a*p*m;n=-n*h*a+p*f*g*a+e*p*m;h*=m;p=-m*g*e-a*f;a=-m*g*a+f*e;return 0===c?[k*b[0]+t*b[1]+h*b[2],d*b[0]+w*b[1]+p*b[2],q*b[0]+n*b[1]+a*b[2]]:[k*b[0]+d*b[1]+q*b[2],t*b[0]+w*b[1]+
n*b[2],h*b[0]+p*b[1]+a*b[2]]}function Y(a,b){var c=84381.406;if(0!==a&&0!==b)throw"One of (tt1, tt2) must be 0.";a=(b-a)/36525;0===b&&(a=-a);var e=((((3.337E-7*a-4.67E-7)*a-.00772503)*a+.0512623)*a-.025754)*a+c;c*=4.84813681109536E-6;var d=((((-9.51E-8*a+1.32851E-4)*a-.00114045)*a-1.0790069)*a+5038.481507)*a*4.84813681109536E-6;e*=4.84813681109536E-6;var g=((((-5.6E-8*a+1.70663E-4)*a-.00121197)*a-2.3814292)*a+10.556403)*a*4.84813681109536E-6;a=Math.sin(c);c=Math.cos(c);var k=Math.sin(-d);d=Math.cos(-d);
var h=Math.sin(-e);var m=Math.cos(-e);var f=Math.sin(g);var n=Math.cos(g);g=n*d-k*f*m;e=n*k*c+f*m*d*c-a*f*h;var p=n*k*a+f*m*d*a+c*f*h;var q=-f*d-k*n*m;var t=-f*k*c+n*m*d*c-a*n*h;f=-f*k*a+n*m*d*a+c*n*h;k*=h;n=-h*d*c-a*m;a=-h*d*a+m*c;return 0===b?[[g,e,p],[q,t,f],[k,n,a]]:[[g,q,k],[e,t,n],[p,f,a]]}function R(a){var b=a.tt/36525,c=15*N(a).ee;a=(.779057273264+.00273781191135448*a.ut+a.ut%1)%1*360;0>a&&(a+=360);b=((c+.014506+((((-3.68E-8*b-2.9956E-5)*b-4.4E-7)*b+1.3915817)*b+4612.156534)*b)/3600+a)%360/
15;0>b&&(b+=24);return b}function V(a,b,c){a=N(a);var e=.017453292519943295*a.mobl,d=.017453292519943295*a.tobl,g=4.84813681109536E-6*a.dpsi;a=Math.cos(e);e=Math.sin(e);var k=Math.cos(d),h=Math.sin(d);d=Math.cos(g);var m=Math.sin(g);g=-m*a;var f=-m*e,n=m*k,p=d*a*k+e*h,q=d*e*k-a*h;m*=h;var t=d*a*h-e*k;a=d*e*h+a*k;return 0===b?[d*c[0]+g*c[1]+f*c[2],n*c[0]+p*c[1]+q*c[2],m*c[0]+t*c[1]+a*c[2]]:[d*c[0]+n*c[1]+m*c[2],g*c[0]+p*c[1]+t*c[2],f*c[0]+q*c[1]+a*c[2]]}function Z(a,b){a=N(a);var c=.017453292519943295*
a.mobl,e=.017453292519943295*a.tobl,d=4.84813681109536E-6*a.dpsi;a=Math.cos(c);c=Math.sin(c);var g=Math.cos(e),k=Math.sin(e);e=Math.cos(d);var h=Math.sin(d);d=-h*a;var m=-h*c,f=h*g,n=e*a*g+c*k,p=e*c*g-a*k;h*=k;var q=e*a*k-c*g;a=e*c*k+a*g;return 0===b?[[e,f,h],[d,n,q],[m,p,a]]:[[e,d,m],[f,n,p],[h,q,a]]}function aa(a){var b=a[0]*a[0]+a[1]*a[1],c=Math.sqrt(b+a[2]*a[2]);if(0===b){if(0===a[2])throw"Indeterminate sky coordinates";return 0>a[2]?{ra:0,dec:-90,dist:c}:{ra:0,dec:90,dist:c}}var e=Math.atan2(a[1],
a[0])/.2617993877991494;0>e&&(e+=24);return new ja(e,Math.atan2(a[2],Math.sqrt(b))/.017453292519943295,c)}function F(a,b){var c=.017453292519943295*a;a=Math.cos(c);c=Math.sin(c);return[a*b[0]+c*b[1]+0*b[2],-c*b[0]+a*b[1]+0*b[2],0*b[0]+0*b[1]+1*b[2]]}function ba(a,b,c,e,d){var g=b*e+c*d;b=-b*d+c*e;c=Math.sqrt(a*a+g*g);e=0;0<c&&(e=57.29577951308232*Math.atan2(g,a),0>e&&(e+=360));return new ka(a,g,b,57.29577951308232*Math.atan2(b,c),e)}function G(a,b){var c=[];var e=b.tt/365250;var d,g,k;a=$jscomp.makeIterator(a);
for(g=a.next();!g.done;g=a.next()){var h=g.value;g=1;var m=0;h=$jscomp.makeIterator(h);for(k=h.next();!k.done;k=h.next()){var f=k.value;k=0;f=$jscomp.makeIterator(f);for(d=f.next();!d.done;d=f.next())d=d.value,k+=d[0]*Math.cos(d[1]+e*d[2]);m+=g*k;g*=e}c.push(m)}e=c[2]*Math.cos(c[1]);c=[e*Math.cos(c[0]),e*Math.sin(c[0]),c[2]*Math.sin(c[1])];return new u(c[0]+4.4036E-7*c[1]-1.90919E-7*c[2],-4.79966E-7*c[0]+.917482137087*c[1]-.397776982902*c[2],.397776982902*c[1]+.917482137087*c[2],b)}function la(a,
b,c,e,d){var g=(d+c)/2-e;c=(d-c)/2;if(0==g){if(0==c)return null;e=-e/c;if(-1>e||1<e)return null}else{e=c*c-4*g*e;if(0>=e)return null;d=Math.sqrt(e);e=(-c+d)/(2*g);d=(-c-d)/(2*g);if(-1<=e&&1>=e){if(-1<=d&&1>=d)return null}else if(-1<=d&&1>=d)e=d;else return null}return{x:e,t:a+e*b,df_dt:(2*g*e+c)/b}}function K(a){for(;-180>=a;)a+=360;for(;180<a;)a-=360;return a}function H(a){if("Earth"===a)throw"The Earth does not have a synodic period as seen from itself.";if("Moon"===a)return 29.530588;var b=S[a];
if(!b)throw"Not a valid planet name: "+a;a=S.Earth.OrbitalPeriod;return Math.abs(a/(a/b.OrbitalPeriod-1))}function ca(a){a=360-a;360<=a?a-=360:0>a&&(a+=360);return a}var W=new Date("2000-01-01T12:00:00Z"),I=2*Math.PI,M=180/Math.PI*3600,ma=-.17-5*Math.log10(648E3/Math.PI),na=34/60,T,da,ea,U=function(){this.calcmoon=this.lunar_apsis_iter=this.lunar_apsis_calls=this.longitude_iter=this.longitude_search=this.search=this.search_func=0};U.prototype.Clone=function(){var a=new U;a.search_func=this.search_func;
a.search=this.search;a.longitude_search=this.longitude_search;a.longitude_iter=this.longitude_iter;a.lunar_apsis_calls=this.lunar_apsis_calls;a.lunar_apsis_iter=this.lunar_apsis_iter;a.calcmoon=this.calcmoon;return a};var J=new U;d.GetPerformanceMetrics=function(){return J.Clone()};d.ResetPerformanceMetrics=function(){J=new U};d.Bodies="Sun Moon Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto".split(" ");var S={Mercury:{OrbitalPeriod:87.969},Venus:{OrbitalPeriod:224.701},Earth:{OrbitalPeriod:365.256},
Mars:{OrbitalPeriod:686.98},Jupiter:{OrbitalPeriod:4332.589},Saturn:{OrbitalPeriod:10759.22},Uranus:{OrbitalPeriod:30685.4},Neptune:{OrbitalPeriod:60189},Pluto:{OrbitalPeriod:90560}},z={Mercury:[[[[4.40250710144,0,0],[.40989414977,1.48302034195,26087.9031415742],[.050462942,4.47785489551,52175.8062831484],[.00855346844,1.16520322459,78263.70942472259],[.00165590362,4.11969163423,104351.61256629678],[3.4561897E-4,.77930768443,130439.51570787099],[7.583476E-5,3.71348404924,156527.41884944518]],[[26087.90313685529,
0,0],[.01131199811,6.21874197797,26087.9031415742],[.00292242298,3.04449355541,52175.8062831484],[7.5775081E-4,6.08568821653,78263.70942472259],[1.9676525E-4,2.80965111777,104351.61256629678]]],[[[.11737528961,1.98357498767,26087.9031415742],[.02388076996,5.03738959686,52175.8062831484],[.01222839532,3.14159265359,0],[.0054325181,1.79644363964,78263.70942472259],[.0012977877,4.83232503958,104351.61256629678],[3.1866927E-4,1.58088495658,130439.51570787099],[7.963301E-5,4.60972126127,156527.41884944518]],
[[.00274646065,3.95008450011,26087.9031415742],[9.9737713E-4,3.14159265359,0]]],[[[.39528271651,0,0],[.07834131818,6.19233722598,26087.9031415742],[.00795525558,2.95989690104,52175.8062831484],[.00121281764,6.01064153797,78263.70942472259],[2.1921969E-4,2.77820093972,104351.61256629678],[4.354065E-5,5.82894543774,130439.51570787099]],[[.0021734774,4.65617158665,26087.9031415742],[4.4141826E-4,1.42385544001,52175.8062831484]]]],Venus:[[[[3.17614666774,0,0],[.01353968419,5.59313319619,10213.285546211],
[8.9891645E-4,5.30650047764,20426.571092422],[5.477194E-5,4.41630661466,7860.4193924392],[3.455741E-5,2.6996444782,11790.6290886588],[2.372061E-5,2.99377542079,3930.2096962196],[1.317168E-5,5.18668228402,26.2983197998],[1.664146E-5,4.25018630147,1577.3435424478],[1.438387E-5,4.15745084182,9683.5945811164],[1.200521E-5,6.15357116043,30639.856638633]],[[10213.28554621638,0,0],[9.5617813E-4,2.4640651111,10213.285546211],[7.787201E-5,.6247848222,20426.571092422]]],[[[.05923638472,.26702775812,10213.285546211],
[4.0107978E-4,1.14737178112,20426.571092422],[3.2814918E-4,3.14159265359,0]],[[.00287821243,1.88964962838,10213.285546211]]],[[[.72334820891,0,0],[.00489824182,4.02151831717,10213.285546211],[1.658058E-5,4.90206728031,20426.571092422]],[[3.4551041E-4,.89198706276,10213.285546211]]]],Earth:[[[[1.75347045673,0,0],[.03341656453,4.66925680415,6283.0758499914],[3.4894275E-4,4.62610242189,12566.1516999828],[3.417572E-5,2.82886579754,3.523118349],[3.497056E-5,2.74411783405,5753.3848848968],[3.135899E-5,
3.62767041756,77713.7714681205],[2.676218E-5,4.41808345438,7860.4193924392],[2.342691E-5,6.13516214446,3930.2096962196],[1.273165E-5,2.03709657878,529.6909650946],[1.324294E-5,.74246341673,11506.7697697936],[9.01854E-6,2.04505446477,26.2983197998],[1.199167E-5,1.10962946234,1577.3435424478],[8.57223E-6,3.50849152283,398.1490034082],[7.79786E-6,1.17882681962,5223.6939198022],[9.9025E-6,5.23268072088,5884.9268465832],[7.53141E-6,2.53339052847,5507.5532386674],[5.05267E-6,4.58292599973,18849.2275499742],
[4.92392E-6,4.20505711826,775.522611324],[3.56672E-6,2.91954114478,.0673103028],[2.84125E-6,1.89869240932,796.2980068164],[2.42879E-6,.34481445893,5486.777843175],[3.17087E-6,5.84901948512,11790.6290886588],[2.71112E-6,.31486255375,10977.078804699],[2.06217E-6,4.80646631478,2544.3144198834],[2.05478E-6,1.86953770281,5573.1428014331],[2.02318E-6,2.45767790232,6069.7767545534],[1.26225E-6,1.08295459501,20.7753954924],[1.55516E-6,.83306084617,213.299095438]],[[6283.0758499914,0,0],[.00206058863,2.67823455808,
6283.0758499914],[4.303419E-5,2.63512233481,12566.1516999828]],[[8.721859E-5,1.07253635559,6283.0758499914]]],[[],[[.00227777722,3.4137662053,6283.0758499914],[3.805678E-5,3.37063423795,12566.1516999828]]],[[[1.00013988784,0,0],[.01670699632,3.09846350258,6283.0758499914],[1.3956024E-4,3.05524609456,12566.1516999828],[3.08372E-5,5.19846674381,77713.7714681205],[1.628463E-5,1.17387558054,5753.3848848968],[1.575572E-5,2.84685214877,7860.4193924392],[9.24799E-6,5.45292236722,11506.7697697936],[5.42439E-6,
4.56409151453,3930.2096962196],[4.7211E-6,3.66100022149,5884.9268465832]],[[.00103018607,1.10748968172,6283.0758499914],[1.721238E-5,1.06442300386,12566.1516999828]],[[4.359385E-5,5.78455133808,6283.0758499914]]]],Mars:[[[[6.20347711581,0,0],[.18656368093,5.0503710027,3340.6124266998],[.01108216816,5.40099836344,6681.2248533996],[9.1798406E-4,5.75478744667,10021.8372800994],[2.7744987E-4,5.97049513147,3.523118349],[1.0610235E-4,2.93958560338,2281.2304965106],[1.2315897E-4,.84956094002,2810.9214616052],
[8.926784E-5,4.15697846427,.0172536522],[8.715691E-5,6.11005153139,13362.4497067992],[6.797556E-5,.36462229657,398.1490034082],[7.774872E-5,3.33968761376,5621.8429232104],[3.575078E-5,1.6618650571,2544.3144198834],[4.161108E-5,.22814971327,2942.4634232916],[3.075252E-5,.85696614132,191.4482661116],[2.628117E-5,.64806124465,3337.0893083508],[2.937546E-5,6.07893711402,.0673103028],[2.389414E-5,5.03896442664,796.2980068164],[2.579844E-5,.02996736156,3344.1355450488],[1.528141E-5,1.14979301996,6151.533888305],
[1.798806E-5,.65634057445,529.6909650946],[1.264357E-5,3.62275122593,5092.1519581158],[1.286228E-5,3.06796065034,2146.1654164752],[1.546404E-5,2.91579701718,1751.539531416],[1.024902E-5,3.69334099279,8962.4553499102],[8.91566E-6,.18293837498,16703.062133499],[8.58759E-6,2.4009381194,2914.0142358238],[8.32715E-6,2.46418619474,3340.5951730476],[8.3272E-6,4.49495782139,3340.629680352],[7.12902E-6,3.66335473479,1059.3819301892],[7.48723E-6,3.82248614017,155.4203994342],[7.23861E-6,.67497311481,3738.761430108],
[6.35548E-6,2.92182225127,8432.7643848156],[6.55162E-6,.48864064125,3127.3133312618],[5.50474E-6,3.81001042328,.9803210682],[5.5275E-6,4.47479317037,1748.016413067],[4.25966E-6,.55364317304,6283.0758499914],[4.15131E-6,.49662285038,213.299095438],[4.72167E-6,3.62547124025,1194.4470102246],[3.06551E-6,.38052848348,6684.7479717486],[3.12141E-6,.99853944405,6677.7017350506],[2.93198E-6,4.22131299634,20.7753954924],[3.02375E-6,4.48618007156,3532.0606928114],[2.74027E-6,.54222167059,3340.545116397],[2.81079E-6,
5.88163521788,1349.8674096588],[2.31183E-6,1.28242156993,3870.3033917944],[2.83602E-6,5.7688543494,3149.1641605882],[2.36117E-6,5.75503217933,3333.498879699],[2.74033E-6,.13372524985,3340.6797370026],[2.99395E-6,2.78323740866,6254.6266625236]],[[3340.61242700512,0,0],[.01457554523,3.60433733236,3340.6124266998],[.00168414711,3.92318567804,6681.2248533996],[2.0622975E-4,4.26108844583,10021.8372800994],[3.452392E-5,4.7321039319,3.523118349],[2.586332E-5,4.60670058555,13362.4497067992],[8.41535E-6,4.45864030426,
2281.2304965106]],[[5.8152577E-4,2.04961712429,3340.6124266998],[1.3459579E-4,2.45738706163,6681.2248533996]]],[[[.03197134986,3.76832042431,3340.6124266998],[.00298033234,4.10616996305,6681.2248533996],[.00289104742,0,0],[3.1365539E-4,4.4465105309,10021.8372800994],[3.4841E-5,4.7881254926,13362.4497067992]],[[.00217310991,6.04472194776,3340.6124266998],[2.0976948E-4,3.14159265359,0],[1.2834709E-4,1.60810667915,6681.2248533996]]],[[[1.53033488271,0,0],[.1418495316,3.47971283528,3340.6124266998],[.00660776362,
3.81783443019,6681.2248533996],[4.6179117E-4,4.15595316782,10021.8372800994],[8.109733E-5,5.55958416318,2810.9214616052],[7.485318E-5,1.77239078402,5621.8429232104],[5.523191E-5,1.3643630377,2281.2304965106],[3.82516E-5,4.49407183687,13362.4497067992],[2.306537E-5,.09081579001,2544.3144198834],[1.999396E-5,5.36059617709,3337.0893083508],[2.484394E-5,4.9254563992,2942.4634232916],[1.960195E-5,4.74249437639,3344.1355450488],[1.167119E-5,2.11260868341,5092.1519581158],[1.102816E-5,5.00908403998,398.1490034082],
[8.99066E-6,4.40791133207,529.6909650946],[9.92252E-6,5.83861961952,6151.533888305],[8.07354E-6,2.10217065501,1059.3819301892],[7.97915E-6,3.44839203899,796.2980068164],[7.40975E-6,1.49906336885,2146.1654164752]],[[.01107433345,2.03250524857,3340.6124266998],[.00103175887,2.37071847807,6681.2248533996],[1.28772E-4,0,0],[1.081588E-4,2.70888095665,10021.8372800994]],[[4.4242249E-4,.47930604954,3340.6124266998],[8.138042E-5,.86998389204,6681.2248533996]]]],Jupiter:[[[[.59954691494,0,0],[.09695898719,
5.06191793158,529.6909650946],[.00573610142,1.44406205629,7.1135470008],[.00306389205,5.41734730184,1059.3819301892],[9.7178296E-4,4.14264726552,632.7837393132],[7.2903078E-4,3.64042916389,522.5774180938],[6.4263975E-4,3.41145165351,103.0927742186],[3.9806064E-4,2.29376740788,419.4846438752],[3.8857767E-4,1.27231755835,316.3918696566],[2.7964629E-4,1.7845459182,536.8045120954],[1.358973E-4,5.7748104079,1589.0728952838],[8.246349E-5,3.5822792584,206.1855484372],[8.768704E-5,3.63000308199,949.1756089698],
[7.368042E-5,5.0810119427,735.8765135318],[6.26315E-5,.02497628807,213.299095438],[6.114062E-5,4.51319998626,1162.4747044078],[4.905396E-5,1.32084470588,110.2063212194],[5.305285E-5,1.30671216791,14.2270940016],[5.305441E-5,4.18625634012,1052.2683831884],[4.647248E-5,4.69958103684,3.9321532631],[3.045023E-5,4.31676431084,426.598190876],[2.609999E-5,1.56667394063,846.0828347512],[2.028191E-5,1.06376530715,3.1813937377],[1.764763E-5,2.14148655117,1066.49547719],[1.722972E-5,3.88036268267,1265.5674786264],
[1.920945E-5,.97168196472,639.897286314],[1.633223E-5,3.58201833555,515.463871093],[1.431999E-5,4.29685556046,625.6701923124],[9.73272E-6,4.09764549134,95.9792272178]],[[529.69096508814,0,0],[.00489503243,4.2208293947,529.6909650946],[.00228917222,6.02646855621,7.1135470008],[3.0099479E-4,4.54540782858,1059.3819301892],[2.072092E-4,5.45943156902,522.5774180938],[1.2103653E-4,.16994816098,536.8045120954],[6.067987E-5,4.42422292017,103.0927742186],[5.433968E-5,3.98480737746,419.4846438752],[4.237744E-5,
5.89008707199,14.2270940016]],[[4.7233601E-4,4.32148536482,7.1135470008],[3.0649436E-4,2.929777887,529.6909650946],[1.4837605E-4,3.14159265359,0]]],[[[.02268615702,3.55852606721,529.6909650946],[.00109971634,3.90809347197,1059.3819301892],[.00110090358,0,0],[8.101428E-5,3.60509572885,522.5774180938],[6.043996E-5,4.25883108339,1589.0728952838],[6.437782E-5,.30627119215,536.8045120954]],[[7.8203446E-4,1.52377859742,529.6909650946]]],[[[5.20887429326,0,0],[.25209327119,3.49108639871,529.6909650946],
[.00610599976,3.84115365948,1059.3819301892],[.00282029458,2.57419881293,632.7837393132],[.00187647346,2.07590383214,522.5774180938],[8.6792905E-4,.71001145545,419.4846438752],[7.2062974E-4,.21465724607,536.8045120954],[6.5517248E-4,5.9799588479,316.3918696566],[2.9134542E-4,1.67759379655,103.0927742186],[3.0135335E-4,2.16132003734,949.1756089698],[2.3453271E-4,3.54023522184,735.8765135318],[2.2283743E-4,4.19362594399,1589.0728952838],[2.3947298E-4,.2745803748,7.1135470008],[1.3032614E-4,2.96042965363,
1162.4747044078],[9.70336E-5,1.90669633585,206.1855484372],[1.2749023E-4,2.71550286592,1052.2683831884]],[[.0127180152,2.64937512894,529.6909650946],[6.1661816E-4,3.00076460387,1059.3819301892],[5.3443713E-4,3.89717383175,522.5774180938],[3.1185171E-4,4.88276958012,536.8045120954],[4.1390269E-4,0,0]]]],Saturn:[[[[.87401354025,0,0],[.11107659762,3.96205090159,213.299095438],[.01414150957,4.58581516874,7.1135470008],[.00398379389,.52112032699,206.1855484372],[.00350769243,3.30329907896,426.598190876],
[.00206816305,.24658372002,103.0927742186],[7.92713E-4,3.84007056878,220.4126424388],[2.3990355E-4,4.66976924553,110.2063212194],[1.6573588E-4,.43719228296,419.4846438752],[1.4906995E-4,5.76903183869,316.3918696566],[1.582029E-4,.93809155235,632.7837393132],[1.4609559E-4,1.56518472,3.9321532631],[1.3160301E-4,4.44891291899,14.2270940016],[1.5053543E-4,2.71669915667,639.897286314],[1.3005299E-4,5.98119023644,11.0457002639],[1.0725067E-4,3.12939523827,202.2533951741],[5.863206E-5,.23656938524,529.6909650946],
[5.227757E-5,4.20783365759,3.1813937377],[6.126317E-5,1.76328667907,277.0349937414],[5.019687E-5,3.17787728405,433.7117378768],[4.59255E-5,.61977744975,199.0720014364],[4.005867E-5,2.24479718502,63.7358983034],[2.953796E-5,.98280366998,95.9792272178],[3.87367E-5,3.22283226966,138.5174968707],[2.461186E-5,2.03163875071,735.8765135318],[3.269484E-5,.77492638211,949.1756089698],[1.758145E-5,3.2658010994,522.5774180938],[1.640172E-5,5.5050445305,846.0828347512],[1.391327E-5,4.02333150505,323.5054166574],
[1.580648E-5,4.37265307169,309.2783226558],[1.123498E-5,2.83726798446,415.5524906121],[1.017275E-5,3.71700135395,227.5261894396],[8.48642E-6,3.1915017083,209.3669421749]],[[213.2990952169,0,0],[.01297370862,1.82834923978,213.299095438],[.00564345393,2.88499717272,7.1135470008],[9.3734369E-4,1.06311793502,426.598190876],[.00107674962,2.27769131009,206.1855484372],[4.0244455E-4,2.04108104671,220.4126424388],[1.9941774E-4,1.2795439047,103.0927742186],[1.0511678E-4,2.7488034213,14.2270940016],[6.416106E-5,
.38238295041,639.897286314],[4.848994E-5,2.43037610229,419.4846438752],[4.056892E-5,2.92133209468,110.2063212194],[3.768635E-5,3.6496533078,3.9321532631]],[[.0011644133,1.17988132879,7.1135470008],[9.1841837E-4,.0732519584,213.299095438],[3.6661728E-4,0,0],[1.5274496E-4,4.06493179167,206.1855484372]]],[[[.04330678039,3.60284428399,213.299095438],[.00240348302,2.85238489373,426.598190876],[8.4745939E-4,0,0],[3.0863357E-4,3.48441504555,220.4126424388],[3.4116062E-4,.57297307557,206.1855484372],[1.473407E-4,
2.11846596715,639.897286314],[9.916667E-5,5.79003188904,419.4846438752],[6.993564E-5,4.7360468972,7.1135470008],[4.807588E-5,5.43305312061,316.3918696566]],[[.00198927992,4.93901017903,213.299095438],[3.6947916E-4,3.14159265359,0],[1.7966989E-4,.5197943111,426.598190876]]],[[[9.55758135486,0,0],[.52921382865,2.39226219573,213.299095438],[.01873679867,5.2354960466,206.1855484372],[.01464663929,1.64763042902,426.598190876],[.00821891141,5.93520042303,316.3918696566],[.00547506923,5.0153261898,103.0927742186],
[.0037168465,2.27114821115,220.4126424388],[.00361778765,3.13904301847,7.1135470008],[.00140617506,5.70406606781,632.7837393132],[.00108974848,3.29313390175,110.2063212194],[6.9006962E-4,5.94099540992,419.4846438752],[6.1053367E-4,.94037691801,639.897286314],[4.8913294E-4,1.55733638681,202.2533951741],[3.4143772E-4,.19519102597,277.0349937414],[3.2401773E-4,5.47084567016,949.1756089698],[2.0936596E-4,.46349251129,735.8765135318]],[[.0618298134,.2584351148,213.299095438],[.00506577242,.71114625261,
206.1855484372],[.00341394029,5.79635741658,426.598190876],[.00188491195,.47215589652,220.4126424388],[.00186261486,3.14159265359,0],[.00143891146,1.40744822888,7.1135470008]],[[.00436902572,4.78671677509,213.299095438]]]],Uranus:[[[[5.48129294297,0,0],[.09260408234,.89106421507,74.7815985673],[.01504247898,3.6271926092,1.4844727083],[.00365981674,1.89962179044,73.297125859],[.00272328168,3.35823706307,149.5631971346],[7.0328461E-4,5.39254450063,63.7358983034],[6.8892678E-4,6.09292483287,76.2660712756],
[6.1998615E-4,2.26952066061,2.9689454166],[6.1950719E-4,2.85098872691,11.0457002639],[2.646877E-4,3.14152083966,71.8126531507],[2.5710476E-4,6.11379840493,454.9093665273],[2.107885E-4,4.36059339067,148.0787244263],[1.7818647E-4,1.74436930289,36.6485629295],[1.4613507E-4,4.73732166022,3.9321532631],[1.1162509E-4,5.8268179635,224.3447957019],[1.099791E-4,.48865004018,138.5174968707],[9.527478E-5,2.95516862826,35.1640902212],[7.545601E-5,5.236265824,109.9456887885],[4.220241E-5,3.23328220918,70.8494453042],
[4.0519E-5,2.277550173,151.0476698429],[3.354596E-5,1.0654900738,4.4534181249],[2.926718E-5,4.62903718891,9.5612275556],[3.49034E-5,5.48306144511,146.594251718],[3.144069E-5,4.75199570434,77.7505439839],[2.922333E-5,5.35235361027,85.8272988312],[2.272788E-5,4.36600400036,70.3281804424],[2.051219E-5,1.51773566586,.1118745846],[2.148602E-5,.60745949945,38.1330356378],[1.991643E-5,4.92437588682,277.0349937414],[1.376226E-5,2.04283539351,65.2203710117],[1.666902E-5,3.62744066769,380.12776796],[1.284107E-5,
3.11347961505,202.2533951741],[1.150429E-5,.93343589092,3.1813937377],[1.533221E-5,2.58594681212,52.6901980395],[1.281604E-5,.54271272721,222.8603229936],[1.372139E-5,4.19641530878,111.4301614968],[1.221029E-5,.1990065003,108.4612160802],[9.46181E-6,1.19253165736,127.4717966068],[1.150989E-5,4.17898916639,33.6796175129]],[[74.7815986091,0,0],[.00154332863,5.24158770553,74.7815985673],[2.4456474E-4,1.71260334156,1.4844727083],[9.258442E-5,.4282973235,11.0457002639],[8.265977E-5,1.50218091379,63.7358983034],
[9.15016E-5,1.41213765216,149.5631971346]]],[[[.01346277648,2.61877810547,74.7815985673],[6.23414E-4,5.08111189648,149.5631971346],[6.1601196E-4,3.14159265359,0],[9.963722E-5,1.61603805646,76.2660712756],[9.92616E-5,.57630380333,73.297125859]],[[3.4101978E-4,.01321929936,74.7815985673]]],[[[19.21264847206,0,0],[.88784984413,5.60377527014,74.7815985673],[.03440836062,.32836099706,73.297125859],[.0205565386,1.7829515933,149.5631971346],[.0064932241,4.52247285911,76.2660712756],[.00602247865,3.86003823674,
63.7358983034],[.00496404167,1.40139935333,454.9093665273],[.00338525369,1.58002770318,138.5174968707],[.00243509114,1.57086606044,71.8126531507],[.00190522303,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]]]]},fa={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}],C=function(a){if(a instanceof Date)this.date=a,this.ut=(a-W)/864E5,this.tt=A(this.ut);else if("number"===typeof a)this.date=new Date(W-864E5*-a),this.ut=a,this.tt=A(this.ut);else throw"Argument must be a Date object, an AstroTime object, or a numeric UTC Julian date.";
};C.prototype.toString=function(){return this.date.toISOString()};C.prototype.AddDays=function(a){return new C(this.ut+a)};d.MakeTime=function(a){return a instanceof C?a:new C(a)};var X=[{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]}],P,u=function(a,b,c,e){this.x=a;this.y=b;this.z=c;this.t=e};u.prototype.Length=
function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};var ha=function(a,b,c){this.lat=a;this.lon=b;this.dist=c},ja=function(a,b,c){this.ra=a;this.dec=b;this.dist=c},D=function(a){this.rot=a},oa=function(a,b,c,e){this.azimuth=a;this.altitude=b;this.ra=c;this.dec=e},ka=function(a,b,c,e,d){this.ex=a;this.ey=b;this.ez=c;this.elat=e;this.elon=d};d.Horizon=function(a,b,c,e,l){a=d.MakeTime(a);var g=Math.sin(.017453292519943295*b.latitude),k=Math.cos(.017453292519943295*b.latitude),h=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=[k*m,k*h,g];g=[-g*m,-g*h,k];h=[h,-m,0];k=-15*R(a);a=F(k,q);q=F(k,g);h=F(k,h);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];h=b[0]*h[0]+b[1]*h[1]+b[2]*h[2];p=Math.sqrt(q*q+h*h);f=0;0<p&&(f=57.29577951308232*-Math.atan2(h,q),0>f&&(f+=360),360<=f&&(f-=360));n=57.29577951308232*
Math.atan2(p,n);p=e;if(l&&(e=n,l=d.Refraction(l,90-n),n-=l,0<l&&3E-4<n)){c=Math.sin(.017453292519943295*n);p=Math.cos(.017453292519943295*n);q=Math.sin(.017453292519943295*e);e=Math.cos(.017453292519943295*e);l=[];for(h=0;3>h;++h)l.push((b[h]-e*a[h])/q*c+a[h]*p);p=Math.sqrt(l[0]*l[0]+l[1]*l[1]);0<p?(c=57.29577951308232*Math.atan2(l[1],l[0])/15,0>c&&(c+=24),24<=c&&(c-=24)):c=0;p=57.29577951308232*Math.atan2(l[2],p)}return new oa(f,90-n,c,p)};var pa=function(a,b,c){this.latitude=a;this.longitude=b;
this.height=c};d.MakeObserver=function(a,b,c){return new pa(a,b,c||0)};d.SunPosition=function(a){a=d.MakeTime(a).AddDays(-.005775518331089121);var b=G(z.Earth,a);b=Q(0,[-b.x,-b.y,-b.z],a.tt);b=V(a,0,b);a=.017453292519943295*N(a).tobl;return ba(b[0],b[1],b[2],Math.cos(a),Math.sin(a))};d.Equator=function(a,b,c,e,l){b=d.MakeTime(b);var g=R(b),k=.017453292519943295*c.latitude,h=Math.sin(k);k=Math.cos(k);var m=1/Math.sqrt(k*k+.9933056020041345*h*h),f=c.height/1E3,n=6378.1366*m+f;c=.017453292519943295*
(15*g+c.longitude);c=V(b,-1,[n*k*Math.cos(c)/1.4959787069098932E8,n*k*Math.sin(c)/1.4959787069098932E8,(6335.438815127603*m+f)*h/1.4959787069098932E8]);c=Q(b.tt,c,0);a=d.GeoVector(a,b,l);a=[a.x-c[0],a.y-c[1],a.z-c[2]];if(!e)return aa(a);e=Q(0,a,b.tt);e=V(b,0,e);return aa(e)};d.Ecliptic=function(a,b,c){void 0===T&&(T=.017453292519943295*N(d.MakeTime(W)).mobl,da=Math.cos(T),ea=Math.sin(T));return ba(a,b,c,da,ea)};d.GeoMoon=function(a){a=d.MakeTime(a);var b=E(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*B(a);c=Math.cos(e);e=Math.sin(e);b=Q(a.tt,[b[0],b[1]*c-b[2]*e,b[1]*e+b[2]*c],0);return new u(b[0],b[1],b[2],a)};d.HelioVector=function(a,b){b=d.MakeTime(b);if(a in z)return G(z[a],b);if(a in fa){a:{var c=$jscomp.makeIterator(fa[a]);for(a=c.next();!a.done;a=c.next()){a=a.value;var e=a.tt;var l=a.tt+a.ndays;e=(2*b.tt-(l+e))/(l-e);if(-1<=e&&1>=e){var g=[];for(l=0;3>l;++l){var k=
1;var h=a.coeff[0][l];var m=e;h+=a.coeff[1][l]*m;for(c=2;c<a.coeff.length;++c){var f=2*e*m-k;h+=a.coeff[c][l]*f;k=m;m=f}g.push(h-a.coeff[0][l]/2)}b=new u(g[0],g[1],g[2],b);break a}}throw"Cannot extrapolate Chebyshev model for given Terrestrial Time: "+b.tt;}return b}if("Sun"===a)return new u(0,0,0,b);if("Moon"===a)return a=G(z.Earth,b),e=d.GeoMoon(b),new u(a.x+e.x,a.y+e.y,a.z+e.z,b);throw'Astronomy.HelioVector: Unknown body "'+a+'"';};d.GeoVector=function(a,b,c){b=d.MakeTime(b);if("Moon"===a)return d.GeoMoon(b);
if("Earth"===a)return new u(0,0,0,b);var e;c||(e=G(z.Earth,b));for(var l,g,k=b,h=0;10>h;++h){l=d.HelioVector(a,k);c&&(e=G(z.Earth,k));g=new u(l.x-e.x,l.y-e.y,l.z-e.z,b);if("Sun"===a)return g;var m=b.AddDays(-g.Length()/173.1446326846693);l=Math.abs(m.tt-k.tt);if(1E-9>l)return g;k=m}throw"Light-travel time solver did not converge: dt="+l;};d.Search=function(a,b,c,e){function l(b){++J.search_func;return a(b)}var g=Math.abs((e&&e.dt_tolerance_seconds||1)/86400);++J.search;var k=e&&e.init_f1||l(b),h=
e&&e.init_f2||l(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 C(b.ut+.5*(c.ut-b.ut)),q=p.ut-b.ut;if(Math.abs(q)<g)return p;n?m=l(p):n=!0;var t=la(p.ut,c.ut-p.ut,k,m,h);if(t){var w=d.MakeTime(t.t),r=l(w);if(0!==t.df_dt){if(Math.abs(r/t.df_dt)<g)return w;t=1.2*Math.abs(r/t.df_dt);if(t<q/10&&(q=w.AddDays(-t),w=w.AddDays(+t),0>(q.ut-b.ut)*(q.ut-c.ut)&&0>(w.ut-b.ut)*(w.ut-c.ut))){t=l(q);var u=l(w);if(0>t&&0<=u){k=t;h=u;b=q;c=w;m=r;n=!1;continue}}}}if(0>
k&&0<=m)c=p,h=m;else if(0>m&&0<=h)b=p,k=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 K(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 qa=function(a,b,c,d,l,g,k,h){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=l;this.gc=g;this.hc=
k;this.ring_tilt=h};d.Illumination=function(a,b){if("Earth"===a)throw"The illumination of the Earth is not defined.";var c=d.MakeTime(b),e=G(z.Earth,c);if("Sun"===a){var l=new u(-e.x,-e.y,-e.z,c);b=new u(0,0,0,c);e=0}else"Moon"===a?(l=d.GeoMoon(c),b=new u(e.x+l.x,e.y+l.y,e.z+l.z,c)):(b=d.HelioVector(a,b),l=new u(b.x-e.x,b.y-e.y,b.z-e.z,c)),e=y(l,b);var g=l.Length(),k=b.Length(),h=null;if("Sun"===a)a=ma+5*Math.log10(g);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(g/.002573570052980638*k)}else if("Saturn"===a)a=e,h=d.Ecliptic(l.x,l.y,l.z),m=.017453292519943295*h.elat,h=Math.asin(Math.sin(m)*Math.cos(.4897393881096089)-Math.cos(m)*Math.sin(.4897393881096089)*Math.sin(.017453292519943295*h.elon-.017453292519943295*(169.51+3.82E-5*c.tt))),m=Math.sin(Math.abs(h)),a=-9+.044*a+m*(-2.6+1.2*m)+5*Math.log10(k*g),h*=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(k*g)}return new qa(c,a,e,k,g,l,b,h)};d.SearchRelativeLongitude=function(a,b,c){function e(c){var e=d.EclipticLongitude(a,c);c=d.EclipticLongitude("Earth",c);return K(g*(c-e)-b)}var l=S[a];if(!l)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 g=l.OrbitalPeriod>S.Earth.OrbitalPeriod?1:-1;l=H(a);c=d.MakeTime(c);var k=e(c);0<k&&(k-=360);++J.longitude_search;for(var h=0;100>h;++h){++J.longitude_iter;var m=-k/360*l;c=c.AddDays(m);if(1>86400*Math.abs(m))return c;m=k;k=e(c);30>Math.abs(m)&&m!==k&&(m/=m-k,.5<m&&2>m&&(l*=m))}throw"Relative longitude search failed to converge for "+a+" near "+c.toString()+" (error_angle = "+k+").";};d.MoonPhase=function(a){return d.LongitudeFromSun("Moon",
a)};d.SearchMoonPhase=function(a,b,c){function e(b){b=d.MoonPhase(b);return K(b-a)}b=d.MakeTime(b);var l=e(b);0<l&&(l-=360);var g=-(29.530588*l)/360;l=g-.9;if(l>c)return null;c=Math.min(c,g+.9);l=b.AddDays(l);b=b.AddDays(c);return d.Search(e,l,b)};var ra=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 ra(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,l){function g(e){var f=d.Equator(a,e,b,!0,!0);e=d.Horizon(e,b,f.ra,f.dec).altitude+k/f.dist*57.29577951308232+na;return c*e}var k={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 h=12;var m=0}else if(-1===c)h=0,m=12;else throw"Astronomy.SearchRiseSet: Invalid direction parameter "+c+" -- must be +1 or -1";e=d.MakeTime(e);var f=g(e);var n;if(0<f){f=d.SearchHourAngle(a,b,h,e);var p=f.time;f=g(p)}else p=
e;var q=d.SearchHourAngle(a,b,m,p);for(n=g(q.time);;){if(0>=f&&0<n&&(p=d.Search(g,p,q.time,{init_f1:f,init_f2:n})))return p;f=d.SearchHourAngle(a,b,h,q.time);q=d.SearchHourAngle(a,b,m,f.time);if(f.time.ut>=e.ut+l)return null;p=f.time;f=g(f.time);n=g(q.time)}};var sa=function(a,b){this.time=a;this.hor=b};d.SearchHourAngle=function(a,b,c,e){e=d.MakeTime(e);var l=0;if("Earth"===a)throw"Cannot search for hour angle of the Earth.";if(0>c||24<=c)throw"Invalid hour angle "+c;for(;;){++l;var g=R(e),k=d.Equator(a,
e,b,!0,!0);g=(c+k.ra-b.longitude/15-g)%24;1===l?0>g&&(g+=24):-12>g?g+=24:12<g&&(g-=24);if(.1>3600*Math.abs(g))return a=d.Horizon(e,b,k.ra,k.dec,"normal"),new sa(e,a);e=e.AddDays(g/24*.9972695717592592)}};var ta=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),l=b(180,9,21),g=b(270,12,20);return new ta(c,e,l,g)};var ua=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<c){var e="morning";c=360-c}else e="evening";a=d.AngleFromSun(a,b);return new ua(b,e,a,c)};d.SearchMaxElongation=function(a,b){function c(b){var c=b.AddDays(-.005);b=b.AddDays(.005);c=d.AngleFromSun(a,c);b=d.AngleFromSun(a,b);return(c-b)/.01}
b=d.MakeTime(b);var e={Mercury:{s1:50,s2:85},Venus:{s1:40,s2:50}}[a];if(!e)throw"SearchMaxElongation works for Mercury and Venus only.";for(var l=0;2>=++l;){var g=d.EclipticLongitude(a,b),k=d.EclipticLongitude("Earth",b);k=K(g-k);var h=g=void 0,m=h=g=void 0;k>=-e.s1&&k<+e.s1?(m=0,g=+e.s1,h=+e.s2):k>=+e.s2||k<-e.s2?(m=0,g=-e.s2,h=-e.s1):0<=k?(m=-H(a)/4,g=+e.s1,h=+e.s2):(m=-H(a)/4,g=-e.s2,h=-e.s1);k=b.AddDays(m);g=d.SearchRelativeLongitude(a,g,k);h=d.SearchRelativeLongitude(a,h,g);k=c(g);if(0<=k)throw"SearchMaxElongation: internal error: m1 = "+
k;m=c(h);if(0>=m)throw"SearchMaxElongation: internal error: m2 = "+m;k=d.Search(c,g,h,{init_f1:k,init_f2:m,dt_tolerance_seconds:10});if(!k)throw"SearchMaxElongation: failed search iter "+l+" (t1="+g.toString()+", t2="+h.toString()+")";if(k.tt>=b.tt)return d.Elongation(a,k);b=h.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 l=d.EclipticLongitude(a,b),g=d.EclipticLongitude("Earth",b);g=K(l-g);var k=l=void 0,h=k=l=void 0;-10<=g&&10>g?(h=0,l=10,k=30):30<=g||-30>g?(h=0,l=-30,k=-10):0<=g?(h=-H(a)/4,l=10,k=30):(h=-H(a)/4,l=-30,k=-10);g=b.AddDays(h);l=d.SearchRelativeLongitude(a,l,g);k=d.SearchRelativeLongitude(a,k,l);g=c(l);if(0<=g)throw"SearchPeakMagnitude: internal error: m1 = "+g;h=c(k);if(0>=h)throw"SearchPeakMagnitude: internal error: m2 = "+
h;g=d.Search(c,l,k,{init_f1:g,init_f2:h,dt_tolerance_seconds:10});if(!g)throw"SearchPeakMagnitude: failed search iter "+e+" (t1="+l.toString()+", t2="+k.toString()+")";if(g.tt>=b.tt)return d.Illumination(a,g);b=k.AddDays(1)}throw"SearchPeakMagnitude: failed to find event after 2 tries.";};var ia=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=E(b).distance_au;return(E(a).distance_au-
b)/.001}function c(a){return-b(a)}a=d.MakeTime(a);var e=b(a);++J.lunar_apsis_calls;for(var l=0;59.061176>5*l;++l){++J.lunar_apsis_iter;var g=a.AddDays(5),k=b(g);if(0>=e*k){if(0>e||0<k){a=d.Search(b,a,g,{init_f1:e,init_f2:k});if(null==a)throw"SearchLunarApsis INTERNAL ERROR: perigee search failed!";e=E(a).distance_au;return new ia(a,0,e)}if(0<e||0>k){a=d.Search(c,a,g,{init_f1:-e,init_f2:-k});if(null==a)throw"SearchLunarApsis INTERNAL ERROR: apogee search failed!";e=E(a).distance_au;return new ia(a,
1,e)}throw"SearchLunarApsis INTERNAL ERROR: cannot classify apsis event!";}a=g;e=k}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 D([[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 D([[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,l=a.dist*Math.cos(c);return new u(l*Math.cos(d),l*Math.sin(d),a.dist*Math.sin(c),b)};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 ha(a,d,c)};d.HorizonFromVector=function(a,b){a=d.SphereFromVector(a);a.lon=ca(a.lon);a.lat+=d.Refraction(b,a.lat);return a};d.VectorFromHorizon=function(a,b,c){var e=ca(a.lon);c=a.lat+d.InverseRefraction(c,a.lat);a=new ha(c,e,a.dist);return d.VectorFromSphere(a,
b)};d.Refraction=function(a,b){if(-90>b||90<b)return 0;if("normal"===a||"jplhor"===a){var c=b;-1>c&&(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||90<b)return 0;for(var c=b-d.Refraction(a,b);;){var e=c+d.Refraction(a,c)-b;if(1E-14>Math.abs(e))return c-b;c-=e}};d.RotateVector=function(a,b){return new u(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 D([[1,0,0],[0,.9174821430670688,-.3977769691083922],[0,.3977769691083922,.9174821430670688]])};d.Rotation_ECL_EQJ=function(){return new D([[1,0,0],[0,.9174821430670688,.3977769691083922],[0,-.3977769691083922,.9174821430670688]])};d.Rotation_EQJ_EQD=function(a){var b=Y(0,a.tt);a=Z(a,0);return d.CombineRotation(b,a)};d.Rotation_EQD_EQJ=function(a){var b=Z(a,1);a=Y(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),l=Math.sin(.017453292519943295*b.longitude),g=Math.cos(.017453292519943295*b.longitude);b=[d*g,d*l,c];c=[-c*g,-c*l,d];l=[l,-g,0];a=-15*R(a);b=F(a,b);c=F(a,c);a=F(a,l);return new D([[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=Astronomy_Rotation_HOR_EQJ(a,b);return Astronomy_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);
var h=Math.sin(-e);var m=Math.cos(-e);var f=Math.sin(g);var n=Math.cos(g);g=n*d-k*f*m;e=n*k*c+f*m*d*c-a*f*h;var p=n*k*a+f*m*d*a+c*f*h;var q=-f*d-k*n*m;var t=-f*k*c+n*m*d*c-a*n*h;f=-f*k*a+n*m*d*a+c*n*h;k*=h;n=-h*d*c-a*m;a=-h*d*a+m*c;return 0===b?new x([[g,e,p],[q,t,f],[k,n,a]]):new x([[g,q,k],[e,t,n],[p,f,a]])}function R(a){var b=a.tt/36525,c=15*F(a).ee;a=(.779057273264+.00273781191135448*a.ut+a.ut%1)%1*360;0>a&&(a+=360);b=((c+.014506+((((-3.68E-8*b-2.9956E-5)*b-4.4E-7)*b+1.3915817)*b+4612.156534)*
b)/3600+a)%360/15;0>b&&(b+=24);return b}function V(a,b,c){a=F(a);var e=.017453292519943295*a.mobl,d=.017453292519943295*a.tobl,g=4.84813681109536E-6*a.dpsi;a=Math.cos(e);e=Math.sin(e);var k=Math.cos(d),h=Math.sin(d);d=Math.cos(g);var m=Math.sin(g);g=-m*a;var f=-m*e,n=m*k,p=d*a*k+e*h,q=d*e*k-a*h;m*=h;var t=d*a*h-e*k;a=d*e*h+a*k;return 0===b?[d*c[0]+g*c[1]+f*c[2],n*c[0]+p*c[1]+q*c[2],m*c[0]+t*c[1]+a*c[2]]:[d*c[0]+n*c[1]+m*c[2],g*c[0]+p*c[1]+t*c[2],f*c[0]+q*c[1]+a*c[2]]}function Z(a,b){a=F(a);var c=
.017453292519943295*a.mobl,e=.017453292519943295*a.tobl,d=4.84813681109536E-6*a.dpsi;a=Math.cos(c);c=Math.sin(c);var g=Math.cos(e),k=Math.sin(e);e=Math.cos(d);var h=Math.sin(d);d=-h*a;var m=-h*c,f=h*g,n=e*a*g+c*k,p=e*c*g-a*k;h*=k;var q=e*a*k-c*g;a=e*c*k+a*g;return 0===b?new x([[e,f,h],[d,n,q],[m,p,a]]):new x([[e,d,m],[f,n,p],[h,q,a]])}function aa(a){var b=a[0]*a[0]+a[1]*a[1],c=Math.sqrt(b+a[2]*a[2]);if(0===b){if(0===a[2])throw"Indeterminate sky coordinates";return 0>a[2]?{ra:0,dec:-90,dist:c}:{ra:0,
dec:90,dist:c}}var e=Math.atan2(a[1],a[0])/.2617993877991494;0>e&&(e+=24);return new ja(e,Math.atan2(a[2],Math.sqrt(b))/.017453292519943295,c)}function G(a,b){var c=.017453292519943295*a;a=Math.cos(c);c=Math.sin(c);return[a*b[0]+c*b[1]+0*b[2],-c*b[0]+a*b[1]+0*b[2],0*b[0]+0*b[1]+1*b[2]]}function ba(a,b,c,e,d){var g=b*e+c*d;b=-b*d+c*e;c=Math.sqrt(a*a+g*g);e=0;0<c&&(e=57.29577951308232*Math.atan2(g,a),0>e&&(e+=360));return new ka(a,g,b,57.29577951308232*Math.atan2(b,c),e)}function C(a,b){var c=[];var e=
b.tt/365250;var d,g,k;a=$jscomp.makeIterator(a);for(g=a.next();!g.done;g=a.next()){var h=g.value;g=1;var m=0;h=$jscomp.makeIterator(h);for(k=h.next();!k.done;k=h.next()){var f=k.value;k=0;f=$jscomp.makeIterator(f);for(d=f.next();!d.done;d=f.next())d=d.value,k+=d[0]*Math.cos(d[1]+e*d[2]);m+=g*k;g*=e}c.push(m)}e=c[2]*Math.cos(c[1]);c=[e*Math.cos(c[0]),e*Math.sin(c[0]),c[2]*Math.sin(c[1])];return new u(c[0]+4.4036E-7*c[1]-1.90919E-7*c[2],-4.79966E-7*c[0]+.917482137087*c[1]-.397776982902*c[2],.397776982902*
c[1]+.917482137087*c[2],b)}function la(a,b,c,e,d){var g=(d+c)/2-e;c=(d-c)/2;if(0==g){if(0==c)return null;e=-e/c;if(-1>e||1<e)return null}else{e=c*c-4*g*e;if(0>=e)return null;d=Math.sqrt(e);e=(-c+d)/(2*g);d=(-c-d)/(2*g);if(-1<=e&&1>=e){if(-1<=d&&1>=d)return null}else if(-1<=d&&1>=d)e=d;else return null}return{x:e,t:a+e*b,df_dt:(2*g*e+c)/b}}function H(a){for(;-180>=a;)a+=360;for(;180<a;)a-=360;return a}function D(a){if("Earth"===a)throw"The Earth does not have a synodic period as seen from itself.";
if("Moon"===a)return 29.530588;var b=S[a];if(!b)throw"Not a valid planet name: "+a;a=S.Earth.OrbitalPeriod;return Math.abs(a/(a/b.OrbitalPeriod-1))}function ca(a){a=360-a;360<=a?a-=360:0>a&&(a+=360);return a}var W=new Date("2000-01-01T12:00:00Z"),I=2*Math.PI,M=180/Math.PI*3600,ma=-.17-5*Math.log10(648E3/Math.PI),na=34/60,T,da,ea,U=function(){this.calcmoon=this.lunar_apsis_iter=this.lunar_apsis_calls=this.longitude_iter=this.longitude_search=this.search=this.search_func=0};U.prototype.Clone=function(){var a=
new U;a.search_func=this.search_func;a.search=this.search;a.longitude_search=this.longitude_search;a.longitude_iter=this.longitude_iter;a.lunar_apsis_calls=this.lunar_apsis_calls;a.lunar_apsis_iter=this.lunar_apsis_iter;a.calcmoon=this.calcmoon;return a};var K=new U;d.GetPerformanceMetrics=function(){return K.Clone()};d.ResetPerformanceMetrics=function(){K=new U};d.Bodies="Sun Moon Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto".split(" ");var S={Mercury:{OrbitalPeriod:87.969},Venus:{OrbitalPeriod:224.701},
Earth:{OrbitalPeriod:365.256},Mars:{OrbitalPeriod:686.98},Jupiter:{OrbitalPeriod:4332.589},Saturn:{OrbitalPeriod:10759.22},Uranus:{OrbitalPeriod:30685.4},Neptune:{OrbitalPeriod:60189},Pluto:{OrbitalPeriod:90560}},B={Mercury:[[[[4.40250710144,0,0],[.40989414977,1.48302034195,26087.9031415742],[.050462942,4.47785489551,52175.8062831484],[.00855346844,1.16520322459,78263.70942472259],[.00165590362,4.11969163423,104351.61256629678],[3.4561897E-4,.77930768443,130439.51570787099],[7.583476E-5,3.71348404924,
156527.41884944518]],[[26087.90313685529,0,0],[.01131199811,6.21874197797,26087.9031415742],[.00292242298,3.04449355541,52175.8062831484],[7.5775081E-4,6.08568821653,78263.70942472259],[1.9676525E-4,2.80965111777,104351.61256629678]]],[[[.11737528961,1.98357498767,26087.9031415742],[.02388076996,5.03738959686,52175.8062831484],[.01222839532,3.14159265359,0],[.0054325181,1.79644363964,78263.70942472259],[.0012977877,4.83232503958,104351.61256629678],[3.1866927E-4,1.58088495658,130439.51570787099],
[7.963301E-5,4.60972126127,156527.41884944518]],[[.00274646065,3.95008450011,26087.9031415742],[9.9737713E-4,3.14159265359,0]]],[[[.39528271651,0,0],[.07834131818,6.19233722598,26087.9031415742],[.00795525558,2.95989690104,52175.8062831484],[.00121281764,6.01064153797,78263.70942472259],[2.1921969E-4,2.77820093972,104351.61256629678],[4.354065E-5,5.82894543774,130439.51570787099]],[[.0021734774,4.65617158665,26087.9031415742],[4.4141826E-4,1.42385544001,52175.8062831484]]]],Venus:[[[[3.17614666774,
0,0],[.01353968419,5.59313319619,10213.285546211],[8.9891645E-4,5.30650047764,20426.571092422],[5.477194E-5,4.41630661466,7860.4193924392],[3.455741E-5,2.6996444782,11790.6290886588],[2.372061E-5,2.99377542079,3930.2096962196],[1.317168E-5,5.18668228402,26.2983197998],[1.664146E-5,4.25018630147,1577.3435424478],[1.438387E-5,4.15745084182,9683.5945811164],[1.200521E-5,6.15357116043,30639.856638633]],[[10213.28554621638,0,0],[9.5617813E-4,2.4640651111,10213.285546211],[7.787201E-5,.6247848222,20426.571092422]]],
[[[.05923638472,.26702775812,10213.285546211],[4.0107978E-4,1.14737178112,20426.571092422],[3.2814918E-4,3.14159265359,0]],[[.00287821243,1.88964962838,10213.285546211]]],[[[.72334820891,0,0],[.00489824182,4.02151831717,10213.285546211],[1.658058E-5,4.90206728031,20426.571092422]],[[3.4551041E-4,.89198706276,10213.285546211]]]],Earth:[[[[1.75347045673,0,0],[.03341656453,4.66925680415,6283.0758499914],[3.4894275E-4,4.62610242189,12566.1516999828],[3.417572E-5,2.82886579754,3.523118349],[3.497056E-5,
2.74411783405,5753.3848848968],[3.135899E-5,3.62767041756,77713.7714681205],[2.676218E-5,4.41808345438,7860.4193924392],[2.342691E-5,6.13516214446,3930.2096962196],[1.273165E-5,2.03709657878,529.6909650946],[1.324294E-5,.74246341673,11506.7697697936],[9.01854E-6,2.04505446477,26.2983197998],[1.199167E-5,1.10962946234,1577.3435424478],[8.57223E-6,3.50849152283,398.1490034082],[7.79786E-6,1.17882681962,5223.6939198022],[9.9025E-6,5.23268072088,5884.9268465832],[7.53141E-6,2.53339052847,5507.5532386674],
[5.05267E-6,4.58292599973,18849.2275499742],[4.92392E-6,4.20505711826,775.522611324],[3.56672E-6,2.91954114478,.0673103028],[2.84125E-6,1.89869240932,796.2980068164],[2.42879E-6,.34481445893,5486.777843175],[3.17087E-6,5.84901948512,11790.6290886588],[2.71112E-6,.31486255375,10977.078804699],[2.06217E-6,4.80646631478,2544.3144198834],[2.05478E-6,1.86953770281,5573.1428014331],[2.02318E-6,2.45767790232,6069.7767545534],[1.26225E-6,1.08295459501,20.7753954924],[1.55516E-6,.83306084617,213.299095438]],
[[6283.0758499914,0,0],[.00206058863,2.67823455808,6283.0758499914],[4.303419E-5,2.63512233481,12566.1516999828]],[[8.721859E-5,1.07253635559,6283.0758499914]]],[[],[[.00227777722,3.4137662053,6283.0758499914],[3.805678E-5,3.37063423795,12566.1516999828]]],[[[1.00013988784,0,0],[.01670699632,3.09846350258,6283.0758499914],[1.3956024E-4,3.05524609456,12566.1516999828],[3.08372E-5,5.19846674381,77713.7714681205],[1.628463E-5,1.17387558054,5753.3848848968],[1.575572E-5,2.84685214877,7860.4193924392],
[9.24799E-6,5.45292236722,11506.7697697936],[5.42439E-6,4.56409151453,3930.2096962196],[4.7211E-6,3.66100022149,5884.9268465832]],[[.00103018607,1.10748968172,6283.0758499914],[1.721238E-5,1.06442300386,12566.1516999828]],[[4.359385E-5,5.78455133808,6283.0758499914]]]],Mars:[[[[6.20347711581,0,0],[.18656368093,5.0503710027,3340.6124266998],[.01108216816,5.40099836344,6681.2248533996],[9.1798406E-4,5.75478744667,10021.8372800994],[2.7744987E-4,5.97049513147,3.523118349],[1.0610235E-4,2.93958560338,
2281.2304965106],[1.2315897E-4,.84956094002,2810.9214616052],[8.926784E-5,4.15697846427,.0172536522],[8.715691E-5,6.11005153139,13362.4497067992],[6.797556E-5,.36462229657,398.1490034082],[7.774872E-5,3.33968761376,5621.8429232104],[3.575078E-5,1.6618650571,2544.3144198834],[4.161108E-5,.22814971327,2942.4634232916],[3.075252E-5,.85696614132,191.4482661116],[2.628117E-5,.64806124465,3337.0893083508],[2.937546E-5,6.07893711402,.0673103028],[2.389414E-5,5.03896442664,796.2980068164],[2.579844E-5,.02996736156,
3344.1355450488],[1.528141E-5,1.14979301996,6151.533888305],[1.798806E-5,.65634057445,529.6909650946],[1.264357E-5,3.62275122593,5092.1519581158],[1.286228E-5,3.06796065034,2146.1654164752],[1.546404E-5,2.91579701718,1751.539531416],[1.024902E-5,3.69334099279,8962.4553499102],[8.91566E-6,.18293837498,16703.062133499],[8.58759E-6,2.4009381194,2914.0142358238],[8.32715E-6,2.46418619474,3340.5951730476],[8.3272E-6,4.49495782139,3340.629680352],[7.12902E-6,3.66335473479,1059.3819301892],[7.48723E-6,3.82248614017,
155.4203994342],[7.23861E-6,.67497311481,3738.761430108],[6.35548E-6,2.92182225127,8432.7643848156],[6.55162E-6,.48864064125,3127.3133312618],[5.50474E-6,3.81001042328,.9803210682],[5.5275E-6,4.47479317037,1748.016413067],[4.25966E-6,.55364317304,6283.0758499914],[4.15131E-6,.49662285038,213.299095438],[4.72167E-6,3.62547124025,1194.4470102246],[3.06551E-6,.38052848348,6684.7479717486],[3.12141E-6,.99853944405,6677.7017350506],[2.93198E-6,4.22131299634,20.7753954924],[3.02375E-6,4.48618007156,3532.0606928114],
[2.74027E-6,.54222167059,3340.545116397],[2.81079E-6,5.88163521788,1349.8674096588],[2.31183E-6,1.28242156993,3870.3033917944],[2.83602E-6,5.7688543494,3149.1641605882],[2.36117E-6,5.75503217933,3333.498879699],[2.74033E-6,.13372524985,3340.6797370026],[2.99395E-6,2.78323740866,6254.6266625236]],[[3340.61242700512,0,0],[.01457554523,3.60433733236,3340.6124266998],[.00168414711,3.92318567804,6681.2248533996],[2.0622975E-4,4.26108844583,10021.8372800994],[3.452392E-5,4.7321039319,3.523118349],[2.586332E-5,
4.60670058555,13362.4497067992],[8.41535E-6,4.45864030426,2281.2304965106]],[[5.8152577E-4,2.04961712429,3340.6124266998],[1.3459579E-4,2.45738706163,6681.2248533996]]],[[[.03197134986,3.76832042431,3340.6124266998],[.00298033234,4.10616996305,6681.2248533996],[.00289104742,0,0],[3.1365539E-4,4.4465105309,10021.8372800994],[3.4841E-5,4.7881254926,13362.4497067992]],[[.00217310991,6.04472194776,3340.6124266998],[2.0976948E-4,3.14159265359,0],[1.2834709E-4,1.60810667915,6681.2248533996]]],[[[1.53033488271,
0,0],[.1418495316,3.47971283528,3340.6124266998],[.00660776362,3.81783443019,6681.2248533996],[4.6179117E-4,4.15595316782,10021.8372800994],[8.109733E-5,5.55958416318,2810.9214616052],[7.485318E-5,1.77239078402,5621.8429232104],[5.523191E-5,1.3643630377,2281.2304965106],[3.82516E-5,4.49407183687,13362.4497067992],[2.306537E-5,.09081579001,2544.3144198834],[1.999396E-5,5.36059617709,3337.0893083508],[2.484394E-5,4.9254563992,2942.4634232916],[1.960195E-5,4.74249437639,3344.1355450488],[1.167119E-5,
2.11260868341,5092.1519581158],[1.102816E-5,5.00908403998,398.1490034082],[8.99066E-6,4.40791133207,529.6909650946],[9.92252E-6,5.83861961952,6151.533888305],[8.07354E-6,2.10217065501,1059.3819301892],[7.97915E-6,3.44839203899,796.2980068164],[7.40975E-6,1.49906336885,2146.1654164752]],[[.01107433345,2.03250524857,3340.6124266998],[.00103175887,2.37071847807,6681.2248533996],[1.28772E-4,0,0],[1.081588E-4,2.70888095665,10021.8372800994]],[[4.4242249E-4,.47930604954,3340.6124266998],[8.138042E-5,.86998389204,
6681.2248533996]]]],Jupiter:[[[[.59954691494,0,0],[.09695898719,5.06191793158,529.6909650946],[.00573610142,1.44406205629,7.1135470008],[.00306389205,5.41734730184,1059.3819301892],[9.7178296E-4,4.14264726552,632.7837393132],[7.2903078E-4,3.64042916389,522.5774180938],[6.4263975E-4,3.41145165351,103.0927742186],[3.9806064E-4,2.29376740788,419.4846438752],[3.8857767E-4,1.27231755835,316.3918696566],[2.7964629E-4,1.7845459182,536.8045120954],[1.358973E-4,5.7748104079,1589.0728952838],[8.246349E-5,3.5822792584,
206.1855484372],[8.768704E-5,3.63000308199,949.1756089698],[7.368042E-5,5.0810119427,735.8765135318],[6.26315E-5,.02497628807,213.299095438],[6.114062E-5,4.51319998626,1162.4747044078],[4.905396E-5,1.32084470588,110.2063212194],[5.305285E-5,1.30671216791,14.2270940016],[5.305441E-5,4.18625634012,1052.2683831884],[4.647248E-5,4.69958103684,3.9321532631],[3.045023E-5,4.31676431084,426.598190876],[2.609999E-5,1.56667394063,846.0828347512],[2.028191E-5,1.06376530715,3.1813937377],[1.764763E-5,2.14148655117,
1066.49547719],[1.722972E-5,3.88036268267,1265.5674786264],[1.920945E-5,.97168196472,639.897286314],[1.633223E-5,3.58201833555,515.463871093],[1.431999E-5,4.29685556046,625.6701923124],[9.73272E-6,4.09764549134,95.9792272178]],[[529.69096508814,0,0],[.00489503243,4.2208293947,529.6909650946],[.00228917222,6.02646855621,7.1135470008],[3.0099479E-4,4.54540782858,1059.3819301892],[2.072092E-4,5.45943156902,522.5774180938],[1.2103653E-4,.16994816098,536.8045120954],[6.067987E-5,4.42422292017,103.0927742186],
[5.433968E-5,3.98480737746,419.4846438752],[4.237744E-5,5.89008707199,14.2270940016]],[[4.7233601E-4,4.32148536482,7.1135470008],[3.0649436E-4,2.929777887,529.6909650946],[1.4837605E-4,3.14159265359,0]]],[[[.02268615702,3.55852606721,529.6909650946],[.00109971634,3.90809347197,1059.3819301892],[.00110090358,0,0],[8.101428E-5,3.60509572885,522.5774180938],[6.043996E-5,4.25883108339,1589.0728952838],[6.437782E-5,.30627119215,536.8045120954]],[[7.8203446E-4,1.52377859742,529.6909650946]]],[[[5.20887429326,
0,0],[.25209327119,3.49108639871,529.6909650946],[.00610599976,3.84115365948,1059.3819301892],[.00282029458,2.57419881293,632.7837393132],[.00187647346,2.07590383214,522.5774180938],[8.6792905E-4,.71001145545,419.4846438752],[7.2062974E-4,.21465724607,536.8045120954],[6.5517248E-4,5.9799588479,316.3918696566],[2.9134542E-4,1.67759379655,103.0927742186],[3.0135335E-4,2.16132003734,949.1756089698],[2.3453271E-4,3.54023522184,735.8765135318],[2.2283743E-4,4.19362594399,1589.0728952838],[2.3947298E-4,
.2745803748,7.1135470008],[1.3032614E-4,2.96042965363,1162.4747044078],[9.70336E-5,1.90669633585,206.1855484372],[1.2749023E-4,2.71550286592,1052.2683831884]],[[.0127180152,2.64937512894,529.6909650946],[6.1661816E-4,3.00076460387,1059.3819301892],[5.3443713E-4,3.89717383175,522.5774180938],[3.1185171E-4,4.88276958012,536.8045120954],[4.1390269E-4,0,0]]]],Saturn:[[[[.87401354025,0,0],[.11107659762,3.96205090159,213.299095438],[.01414150957,4.58581516874,7.1135470008],[.00398379389,.52112032699,206.1855484372],
[.00350769243,3.30329907896,426.598190876],[.00206816305,.24658372002,103.0927742186],[7.92713E-4,3.84007056878,220.4126424388],[2.3990355E-4,4.66976924553,110.2063212194],[1.6573588E-4,.43719228296,419.4846438752],[1.4906995E-4,5.76903183869,316.3918696566],[1.582029E-4,.93809155235,632.7837393132],[1.4609559E-4,1.56518472,3.9321532631],[1.3160301E-4,4.44891291899,14.2270940016],[1.5053543E-4,2.71669915667,639.897286314],[1.3005299E-4,5.98119023644,11.0457002639],[1.0725067E-4,3.12939523827,202.2533951741],
[5.863206E-5,.23656938524,529.6909650946],[5.227757E-5,4.20783365759,3.1813937377],[6.126317E-5,1.76328667907,277.0349937414],[5.019687E-5,3.17787728405,433.7117378768],[4.59255E-5,.61977744975,199.0720014364],[4.005867E-5,2.24479718502,63.7358983034],[2.953796E-5,.98280366998,95.9792272178],[3.87367E-5,3.22283226966,138.5174968707],[2.461186E-5,2.03163875071,735.8765135318],[3.269484E-5,.77492638211,949.1756089698],[1.758145E-5,3.2658010994,522.5774180938],[1.640172E-5,5.5050445305,846.0828347512],
[1.391327E-5,4.02333150505,323.5054166574],[1.580648E-5,4.37265307169,309.2783226558],[1.123498E-5,2.83726798446,415.5524906121],[1.017275E-5,3.71700135395,227.5261894396],[8.48642E-6,3.1915017083,209.3669421749]],[[213.2990952169,0,0],[.01297370862,1.82834923978,213.299095438],[.00564345393,2.88499717272,7.1135470008],[9.3734369E-4,1.06311793502,426.598190876],[.00107674962,2.27769131009,206.1855484372],[4.0244455E-4,2.04108104671,220.4126424388],[1.9941774E-4,1.2795439047,103.0927742186],[1.0511678E-4,
2.7488034213,14.2270940016],[6.416106E-5,.38238295041,639.897286314],[4.848994E-5,2.43037610229,419.4846438752],[4.056892E-5,2.92133209468,110.2063212194],[3.768635E-5,3.6496533078,3.9321532631]],[[.0011644133,1.17988132879,7.1135470008],[9.1841837E-4,.0732519584,213.299095438],[3.6661728E-4,0,0],[1.5274496E-4,4.06493179167,206.1855484372]]],[[[.04330678039,3.60284428399,213.299095438],[.00240348302,2.85238489373,426.598190876],[8.4745939E-4,0,0],[3.0863357E-4,3.48441504555,220.4126424388],[3.4116062E-4,
.57297307557,206.1855484372],[1.473407E-4,2.11846596715,639.897286314],[9.916667E-5,5.79003188904,419.4846438752],[6.993564E-5,4.7360468972,7.1135470008],[4.807588E-5,5.43305312061,316.3918696566]],[[.00198927992,4.93901017903,213.299095438],[3.6947916E-4,3.14159265359,0],[1.7966989E-4,.5197943111,426.598190876]]],[[[9.55758135486,0,0],[.52921382865,2.39226219573,213.299095438],[.01873679867,5.2354960466,206.1855484372],[.01464663929,1.64763042902,426.598190876],[.00821891141,5.93520042303,316.3918696566],
[.00547506923,5.0153261898,103.0927742186],[.0037168465,2.27114821115,220.4126424388],[.00361778765,3.13904301847,7.1135470008],[.00140617506,5.70406606781,632.7837393132],[.00108974848,3.29313390175,110.2063212194],[6.9006962E-4,5.94099540992,419.4846438752],[6.1053367E-4,.94037691801,639.897286314],[4.8913294E-4,1.55733638681,202.2533951741],[3.4143772E-4,.19519102597,277.0349937414],[3.2401773E-4,5.47084567016,949.1756089698],[2.0936596E-4,.46349251129,735.8765135318]],[[.0618298134,.2584351148,
213.299095438],[.00506577242,.71114625261,206.1855484372],[.00341394029,5.79635741658,426.598190876],[.00188491195,.47215589652,220.4126424388],[.00186261486,3.14159265359,0],[.00143891146,1.40744822888,7.1135470008]],[[.00436902572,4.78671677509,213.299095438]]]],Uranus:[[[[5.48129294297,0,0],[.09260408234,.89106421507,74.7815985673],[.01504247898,3.6271926092,1.4844727083],[.00365981674,1.89962179044,73.297125859],[.00272328168,3.35823706307,149.5631971346],[7.0328461E-4,5.39254450063,63.7358983034],
[6.8892678E-4,6.09292483287,76.2660712756],[6.1998615E-4,2.26952066061,2.9689454166],[6.1950719E-4,2.85098872691,11.0457002639],[2.646877E-4,3.14152083966,71.8126531507],[2.5710476E-4,6.11379840493,454.9093665273],[2.107885E-4,4.36059339067,148.0787244263],[1.7818647E-4,1.74436930289,36.6485629295],[1.4613507E-4,4.73732166022,3.9321532631],[1.1162509E-4,5.8268179635,224.3447957019],[1.099791E-4,.48865004018,138.5174968707],[9.527478E-5,2.95516862826,35.1640902212],[7.545601E-5,5.236265824,109.9456887885],
[4.220241E-5,3.23328220918,70.8494453042],[4.0519E-5,2.277550173,151.0476698429],[3.354596E-5,1.0654900738,4.4534181249],[2.926718E-5,4.62903718891,9.5612275556],[3.49034E-5,5.48306144511,146.594251718],[3.144069E-5,4.75199570434,77.7505439839],[2.922333E-5,5.35235361027,85.8272988312],[2.272788E-5,4.36600400036,70.3281804424],[2.051219E-5,1.51773566586,.1118745846],[2.148602E-5,.60745949945,38.1330356378],[1.991643E-5,4.92437588682,277.0349937414],[1.376226E-5,2.04283539351,65.2203710117],[1.666902E-5,
3.62744066769,380.12776796],[1.284107E-5,3.11347961505,202.2533951741],[1.150429E-5,.93343589092,3.1813937377],[1.533221E-5,2.58594681212,52.6901980395],[1.281604E-5,.54271272721,222.8603229936],[1.372139E-5,4.19641530878,111.4301614968],[1.221029E-5,.1990065003,108.4612160802],[9.46181E-6,1.19253165736,127.4717966068],[1.150989E-5,4.17898916639,33.6796175129]],[[74.7815986091,0,0],[.00154332863,5.24158770553,74.7815985673],[2.4456474E-4,1.71260334156,1.4844727083],[9.258442E-5,.4282973235,11.0457002639],
[8.265977E-5,1.50218091379,63.7358983034],[9.15016E-5,1.41213765216,149.5631971346]]],[[[.01346277648,2.61877810547,74.7815985673],[6.23414E-4,5.08111189648,149.5631971346],[6.1601196E-4,3.14159265359,0],[9.963722E-5,1.61603805646,76.2660712756],[9.92616E-5,.57630380333,73.297125859]],[[3.4101978E-4,.01321929936,74.7815985673]]],[[[19.21264847206,0,0],[.88784984413,5.60377527014,74.7815985673],[.03440836062,.32836099706,73.297125859],[.0205565386,1.7829515933,149.5631971346],[.0064932241,4.52247285911,
76.2660712756],[.00602247865,3.86003823674,63.7358983034],[.00496404167,1.40139935333,454.9093665273],[.00338525369,1.58002770318,138.5174968707],[.00243509114,1.57086606044,71.8126531507],[.00190522303,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]]]]},fa={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}],N=function(a){if(a instanceof Date)this.date=a,this.ut=(a-W)/864E5,this.tt=A(this.ut);else if("number"===typeof a)this.date=
new Date(W-864E5*-a),this.ut=a,this.tt=A(this.ut);else throw"Argument must be a Date object, an AstroTime object, or a numeric UTC Julian date.";};N.prototype.toString=function(){return this.date.toISOString()};N.prototype.AddDays=function(a){return new N(this.ut+a)};d.MakeTime=function(a){return a instanceof N?a:new N(a)};var X=[{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]}],P,u=function(a,b,c,e){this.x=a;this.y=b;this.z=c;this.t=e};u.prototype.Length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};var ha=function(a,b,c){this.lat=a;this.lon=b;this.dist=c},ja=function(a,b,c){this.ra=a;this.dec=b;this.dist=c},x=function(a){this.rot=a},oa=function(a,b,c,e){this.azimuth=a;this.altitude=b;this.ra=c;this.dec=e},ka=function(a,b,c,e,d){this.ex=a;this.ey=b;this.ez=
c;this.elat=e;this.elon=d};d.Horizon=function(a,b,c,e,l){a=d.MakeTime(a);var g=Math.sin(.017453292519943295*b.latitude),k=Math.cos(.017453292519943295*b.latitude),h=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=[k*m,k*h,g];g=[-g*m,-g*h,k];h=[h,-m,0];k=-15*R(a);a=G(k,q);q=G(k,g);h=G(k,h);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];h=b[0]*h[0]+b[1]*h[1]+b[2]*h[2];p=Math.sqrt(q*q+h*h);f=0;0<p&&(f=57.29577951308232*-Math.atan2(h,q),0>f&&(f+=360),360<=f&&(f-=360));n=57.29577951308232*Math.atan2(p,n);p=e;if(l&&(e=n,l=d.Refraction(l,90-n),n-=l,0<l&&3E-4<n)){c=Math.sin(.017453292519943295*n);p=Math.cos(.017453292519943295*n);q=Math.sin(.017453292519943295*e);e=Math.cos(.017453292519943295*e);l=[];for(h=0;3>h;++h)l.push((b[h]-e*a[h])/q*c+a[h]*p);p=Math.sqrt(l[0]*l[0]+l[1]*l[1]);0<p?(c=57.29577951308232*
Math.atan2(l[1],l[0])/15,0>c&&(c+=24),24<=c&&(c-=24)):c=0;p=57.29577951308232*Math.atan2(l[2],p)}return new oa(f,90-n,c,p)};var pa=function(a,b,c){this.latitude=a;this.longitude=b;this.height=c};d.MakeObserver=function(a,b,c){return new pa(a,b,c||0)};d.SunPosition=function(a){a=d.MakeTime(a).AddDays(-.005775518331089121);var b=C(B.Earth,a);b=Q(0,[-b.x,-b.y,-b.z],a.tt);b=V(a,0,b);a=.017453292519943295*F(a).tobl;return ba(b[0],b[1],b[2],Math.cos(a),Math.sin(a))};d.Equator=function(a,b,c,e,l){b=d.MakeTime(b);
var g=R(b),k=.017453292519943295*c.latitude,h=Math.sin(k);k=Math.cos(k);var m=1/Math.sqrt(k*k+.9933056020041345*h*h),f=c.height/1E3,n=6378.1366*m+f;c=.017453292519943295*(15*g+c.longitude);c=V(b,-1,[n*k*Math.cos(c)/1.4959787069098932E8,n*k*Math.sin(c)/1.4959787069098932E8,(6335.438815127603*m+f)*h/1.4959787069098932E8]);c=Q(b.tt,c,0);a=d.GeoVector(a,b,l);a=[a.x-c[0],a.y-c[1],a.z-c[2]];if(!e)return aa(a);e=Q(0,a,b.tt);e=V(b,0,e);return aa(e)};d.Ecliptic=function(a,b,c){void 0===T&&(T=.017453292519943295*
F(d.MakeTime(W)).mobl,da=Math.cos(T),ea=Math.sin(T));return ba(a,b,c,da,ea)};d.GeoMoon=function(a){a=d.MakeTime(a);var b=J(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*E(a);c=Math.cos(e);e=Math.sin(e);b=Q(a.tt,[b[0],b[1]*c-b[2]*e,b[1]*e+b[2]*c],0);return new u(b[0],b[1],b[2],a)};d.HelioVector=function(a,b){b=d.MakeTime(b);if(a in B)return C(B[a],b);if(a in fa){a:{var c=$jscomp.makeIterator(fa[a]);
for(a=c.next();!a.done;a=c.next()){a=a.value;var e=a.tt;var l=a.tt+a.ndays;e=(2*b.tt-(l+e))/(l-e);if(-1<=e&&1>=e){var g=[];for(l=0;3>l;++l){var k=1;var h=a.coeff[0][l];var m=e;h+=a.coeff[1][l]*m;for(c=2;c<a.coeff.length;++c){var f=2*e*m-k;h+=a.coeff[c][l]*f;k=m;m=f}g.push(h-a.coeff[0][l]/2)}b=new u(g[0],g[1],g[2],b);break a}}throw"Cannot extrapolate Chebyshev model for given Terrestrial Time: "+b.tt;}return b}if("Sun"===a)return new u(0,0,0,b);if("Moon"===a)return a=C(B.Earth,b),e=d.GeoMoon(b),new u(a.x+
e.x,a.y+e.y,a.z+e.z,b);throw'Astronomy.HelioVector: Unknown body "'+a+'"';};d.GeoVector=function(a,b,c){b=d.MakeTime(b);if("Moon"===a)return d.GeoMoon(b);if("Earth"===a)return new u(0,0,0,b);var e;c||(e=C(B.Earth,b));for(var l,g,k=b,h=0;10>h;++h){l=d.HelioVector(a,k);c&&(e=C(B.Earth,k));g=new u(l.x-e.x,l.y-e.y,l.z-e.z,b);if("Sun"===a)return g;var m=b.AddDays(-g.Length()/173.1446326846693);l=Math.abs(m.tt-k.tt);if(1E-9>l)return g;k=m}throw"Light-travel time solver did not converge: dt="+l;};d.Search=
function(a,b,c,e){function l(b){++K.search_func;return a(b)}var g=Math.abs((e&&e.dt_tolerance_seconds||1)/86400);++K.search;var k=e&&e.init_f1||l(b),h=e&&e.init_f2||l(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 N(b.ut+.5*(c.ut-b.ut)),q=p.ut-b.ut;if(Math.abs(q)<g)return p;n?m=l(p):n=!0;var t=la(p.ut,c.ut-p.ut,k,m,h);if(t){var w=d.MakeTime(t.t),r=l(w);if(0!==t.df_dt){if(Math.abs(r/t.df_dt)<g)return w;t=1.2*Math.abs(r/t.df_dt);if(t<q/10&&(q=
w.AddDays(-t),w=w.AddDays(+t),0>(q.ut-b.ut)*(q.ut-c.ut)&&0>(w.ut-b.ut)*(w.ut-c.ut))){t=l(q);var u=l(w);if(0>t&&0<=u){k=t;h=u;b=q;c=w;m=r;n=!1;continue}}}}if(0>k&&0<=m)c=p,h=m;else if(0>m&&0<=h)b=p,k=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 H(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 z(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 qa=function(a,b,
c,d,l,g,k,h){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=l;this.gc=g;this.hc=k;this.ring_tilt=h};d.Illumination=function(a,b){if("Earth"===a)throw"The illumination of the Earth is not defined.";var c=d.MakeTime(b),e=C(B.Earth,c);if("Sun"===a){var l=new u(-e.x,-e.y,-e.z,c);b=new u(0,0,0,c);e=0}else"Moon"===a?(l=d.GeoMoon(c),b=new u(e.x+l.x,e.y+l.y,e.z+l.z,c)):(b=d.HelioVector(a,b),l=new u(b.x-e.x,b.y-e.y,b.z-e.z,
c)),e=z(l,b);var g=l.Length(),k=b.Length(),h=null;if("Sun"===a)a=ma+5*Math.log10(g);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(g/.002573570052980638*k)}else if("Saturn"===a)a=e,h=d.Ecliptic(l.x,l.y,l.z),m=.017453292519943295*h.elat,h=Math.asin(Math.sin(m)*Math.cos(.4897393881096089)-Math.cos(m)*Math.sin(.4897393881096089)*Math.sin(.017453292519943295*h.elon-.017453292519943295*(169.51+3.82E-5*c.tt))),m=Math.sin(Math.abs(h)),a=-9+.044*
a+m*(-2.6+1.2*m)+5*Math.log10(k*g),h*=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(k*g)}return new qa(c,a,e,k,g,l,b,h)};d.SearchRelativeLongitude=
function(a,b,c){function e(c){var e=d.EclipticLongitude(a,c);c=d.EclipticLongitude("Earth",c);return H(g*(c-e)-b)}var l=S[a];if(!l)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 g=l.OrbitalPeriod>S.Earth.OrbitalPeriod?1:-1;l=D(a);c=d.MakeTime(c);var k=e(c);0<k&&(k-=360);++K.longitude_search;for(var h=0;100>h;++h){++K.longitude_iter;var m=-k/360*l;c=c.AddDays(m);if(1>86400*Math.abs(m))return c;
m=k;k=e(c);30>Math.abs(m)&&m!==k&&(m/=m-k,.5<m&&2>m&&(l*=m))}throw"Relative longitude search failed to converge for "+a+" near "+c.toString()+" (error_angle = "+k+").";};d.MoonPhase=function(a){return d.LongitudeFromSun("Moon",a)};d.SearchMoonPhase=function(a,b,c){function e(b){b=d.MoonPhase(b);return H(b-a)}b=d.MakeTime(b);var l=e(b);0<l&&(l-=360);var g=-(29.530588*l)/360;l=g-.9;if(l>c)return null;c=Math.min(c,g+.9);l=b.AddDays(l);b=b.AddDays(c);return d.Search(e,l,b)};var ra=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 ra(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,l){function g(e){var f=d.Equator(a,e,b,!0,!0);e=d.Horizon(e,b,f.ra,f.dec).altitude+k/f.dist*57.29577951308232+na;return c*e}var k={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 h=12;var m=0}else if(-1===c)h=0,m=12;else throw"Astronomy.SearchRiseSet: Invalid direction parameter "+c+" -- must be +1 or -1";e=d.MakeTime(e);var f=g(e);var n;if(0<f){f=d.SearchHourAngle(a,b,h,e);var p=f.time;f=g(p)}else p=e;var q=d.SearchHourAngle(a,b,m,p);for(n=g(q.time);;){if(0>=f&&0<n&&(p=d.Search(g,p,q.time,{init_f1:f,init_f2:n})))return p;f=d.SearchHourAngle(a,b,h,q.time);q=d.SearchHourAngle(a,b,m,f.time);if(f.time.ut>=e.ut+l)return null;p=f.time;f=g(f.time);n=g(q.time)}};var sa=
function(a,b){this.time=a;this.hor=b};d.SearchHourAngle=function(a,b,c,e){e=d.MakeTime(e);var l=0;if("Earth"===a)throw"Cannot search for hour angle of the Earth.";if(0>c||24<=c)throw"Invalid hour angle "+c;for(;;){++l;var g=R(e),k=d.Equator(a,e,b,!0,!0);g=(c+k.ra-b.longitude/15-g)%24;1===l?0>g&&(g+=24):-12>g?g+=24:12<g&&(g-=24);if(.1>3600*Math.abs(g))return a=d.Horizon(e,b,k.ra,k.dec,"normal"),new sa(e,a);e=e.AddDays(g/24*.9972695717592592)}};var ta=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),l=b(180,9,21),g=b(270,12,20);return new ta(c,e,l,g)};var ua=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<c){var e="morning";c=360-c}else e="evening";a=d.AngleFromSun(a,b);return new ua(b,e,a,c)};d.SearchMaxElongation=function(a,b){function c(b){var c=b.AddDays(-.005);b=b.AddDays(.005);c=d.AngleFromSun(a,c);b=d.AngleFromSun(a,b);return(c-b)/.01}b=d.MakeTime(b);var e={Mercury:{s1:50,s2:85},Venus:{s1:40,s2:50}}[a];if(!e)throw"SearchMaxElongation works for Mercury and Venus only.";for(var l=0;2>=++l;){var g=d.EclipticLongitude(a,b),k=d.EclipticLongitude("Earth",b);k=H(g-k);var h=g=void 0,m=h=g=
void 0;k>=-e.s1&&k<+e.s1?(m=0,g=+e.s1,h=+e.s2):k>=+e.s2||k<-e.s2?(m=0,g=-e.s2,h=-e.s1):0<=k?(m=-D(a)/4,g=+e.s1,h=+e.s2):(m=-D(a)/4,g=-e.s2,h=-e.s1);k=b.AddDays(m);g=d.SearchRelativeLongitude(a,g,k);h=d.SearchRelativeLongitude(a,h,g);k=c(g);if(0<=k)throw"SearchMaxElongation: internal error: m1 = "+k;m=c(h);if(0>=m)throw"SearchMaxElongation: internal error: m2 = "+m;k=d.Search(c,g,h,{init_f1:k,init_f2:m,dt_tolerance_seconds:10});if(!k)throw"SearchMaxElongation: failed search iter "+l+" (t1="+g.toString()+
", t2="+h.toString()+")";if(k.tt>=b.tt)return d.Elongation(a,k);b=h.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 l=d.EclipticLongitude(a,b),g=d.EclipticLongitude("Earth",b);g=H(l-g);var k=l=void 0,h=
k=l=void 0;-10<=g&&10>g?(h=0,l=10,k=30):30<=g||-30>g?(h=0,l=-30,k=-10):0<=g?(h=-D(a)/4,l=10,k=30):(h=-D(a)/4,l=-30,k=-10);g=b.AddDays(h);l=d.SearchRelativeLongitude(a,l,g);k=d.SearchRelativeLongitude(a,k,l);g=c(l);if(0<=g)throw"SearchPeakMagnitude: internal error: m1 = "+g;h=c(k);if(0>=h)throw"SearchPeakMagnitude: internal error: m2 = "+h;g=d.Search(c,l,k,{init_f1:g,init_f2:h,dt_tolerance_seconds:10});if(!g)throw"SearchPeakMagnitude: failed search iter "+e+" (t1="+l.toString()+", t2="+k.toString()+
")";if(g.tt>=b.tt)return d.Illumination(a,g);b=k.AddDays(1)}throw"SearchPeakMagnitude: failed to find event after 2 tries.";};var ia=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=J(b).distance_au;return(J(a).distance_au-b)/.001}function c(a){return-b(a)}a=d.MakeTime(a);var e=b(a);++K.lunar_apsis_calls;for(var l=0;59.061176>5*l;++l){++K.lunar_apsis_iter;var g=a.AddDays(5),
k=b(g);if(0>=e*k){if(0>e||0<k){a=d.Search(b,a,g,{init_f1:e,init_f2:k});if(null==a)throw"SearchLunarApsis INTERNAL ERROR: perigee search failed!";e=J(a).distance_au;return new ia(a,0,e)}if(0<e||0>k){a=d.Search(c,a,g,{init_f1:-e,init_f2:-k});if(null==a)throw"SearchLunarApsis INTERNAL ERROR: apogee search failed!";e=J(a).distance_au;return new ia(a,1,e)}throw"SearchLunarApsis INTERNAL ERROR: cannot classify apsis event!";}a=g;e=k}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 x([[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 x([[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,l=a.dist*Math.cos(c);return new u(l*Math.cos(d),l*Math.sin(d),a.dist*Math.sin(c),b)};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 ha(a,d,c)};d.HorizonFromVector=function(a,b){a=d.SphereFromVector(a);a.lon=ca(a.lon);a.lat+=d.Refraction(b,a.lat);return a};d.VectorFromHorizon=function(a,b,c){var e=ca(a.lon);c=a.lat+d.InverseRefraction(c,a.lat);a=new ha(c,e,a.dist);return d.VectorFromSphere(a,b)};d.Refraction=function(a,b){if(-90>b||90<b)return 0;if("normal"===a||"jplhor"===a){var c=b;-1>c&&(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||90<b)return 0;for(var c=b-d.Refraction(a,b);;){var e=c+d.Refraction(a,c)-b;if(1E-14>Math.abs(e))return c-b;c-=e}};d.RotateVector=function(a,b){return new u(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 x([[1,0,0],[0,.9174821430670688,-.3977769691083922],[0,.3977769691083922,
.9174821430670688]])};d.Rotation_ECL_EQJ=function(){return new x([[1,0,0],[0,.9174821430670688,.3977769691083922],[0,-.3977769691083922,.9174821430670688]])};d.Rotation_EQJ_EQD=function(a){var b=Y(0,a.tt);a=Z(a,0);return d.CombineRotation(b,a)};d.Rotation_EQD_EQJ=function(a){var b=Z(a,1);a=Y(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),l=Math.sin(.017453292519943295*b.longitude),g=
Math.cos(.017453292519943295*b.longitude);b=[d*g,d*l,c];c=[-c*g,-c*l,d];l=[l,-g,0];a=-15*R(a);b=G(a,b);c=G(a,c);a=G(a,l);return new x([[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=Astronomy_Rotation_HOR_EQJ(a,b);return Astronomy_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);