Celestial Programming : Full Implementation of ELP 2000-82b

An implementation of the full ELP 2000-82b solution. The source code is in elp2000-82b.js, and a set of tests produced from the original Fortran code is in elp82-tests.html.

The input is the Julian Date in Barycentric Dynamic Time (TBD), the output is the X, Y ,Z rectagular coordinates in in Kilometers in the mean dynamical ecliptic and inertial equinox of J2000. A simple conversion to the J2000 reference frame can be obtained by rotating around the X axis by -23° 26' 21.41217".

        const p=ELP82b.getPosition(2451555.5);
        //[ 382979.7604730463, -68204.20174530084, -25987.71602589964 ]

        const rx=getXRotationMatrix(-(23+26/60.0+21.41217/3600)*rad);
        const p2000=vecMatrixMul(p,rx);
        const radec=rectToPolar(p2000[0],p2000[1],p2000[2]);
Date (TDB):
RA (J2000):
Dec (J2000):