Expanded the Chebyshev model for Pluto.
Resampled VSOP models to have required accuracy over wider date range.
Decreased astro_check.js sampling rate to allow tests to run faster.
Now the JavaScript code uses UT and TT values expressed
in days since 2000, instead of Julian Dates.
This makes the numeric values much smaller and thus
should yield less floating point error when time solvers
are added later.
Using historic, recent, and predicted values of TT-UT instead of
UTC leap seconds. With linear interpolation, there are no longer
discrete jumps in the calculated TT values. Hopefully, this will
make event solvers (rise, set, etc) more well-behaved.
Astronomy.GeoVector now corrects for light travel time from
the observed object. This reduced worst case angular error
from 1.16 arcmin to 0.89 arcmin (0.27 arcmin improvement).
I found some online resources that helped me track down the
formula for the refraction model used in the JPL Horizons
online tool. Now the JavaScript library allows 4 different
refraction options in Astronomy.Horizon():
false : no refraction
'novas' : use the NOVAS C 3.1 algorithm.
'jplhor' : JPL Horizons algorithm, clamped beyond 1 degree below horizon.
'sae' : same as 'jplhor', only without clamping.
Now passes the jplcheck unit test without filtering out objects below the horizon!
Always compile the C code when executing the script './run'.
Verified that the JPL checker works for apparent coordinates,
equatorial-of-date and horizontal, when I tell the JPL Horizons
tool to use its "airless" (no refraction) model.
Still need to implement refraction for at least horizontal coordinates
(where it really matters for rise/set times).
Used the JPL Horizons web interface at
https://ssd.jpl.nasa.gov/horizons.cgi
to generate test data for astrometric RA/DEC,
apparent RA/DEC, and apparent az/alt.
Will use this as a secondary unit test to confirm
that I'm not fooling myself by incorrectly using the
NOVAS C 3.1 code for unit tests.
Not quite right yet for some reason, but this is closer.
JavaScript function Astronomy.SkyPos() now returns both
J2000 (RA,DEC) and (RA,DEC) using true equator and equinox of date.
Use the latter to calculate horizontal coordinates.
This matches my call to NOVAS place() function, but there
are still errors larger than 2 degrees compared with JPL Horizons
and Heavens Above.
For example:
2019-04-11 19:47:00
variable test.html JPL Horizons error(arcmin)
Sun azimuth 245.455 246.585 -67.80
Sun altitude 50.858 51.261 -24.17
Jupiter azimuth 277.309 275.287 121.33
Jupiter altitude -63.751 -63.860 6.52
I have horizontal coordinates calculated, but they might
be wrong (both in how I call NOVAS functions and the JS code itself)
because I think I'm mixing up equinox of date coordinates with
J2000 coordinates for (RA,DEC).
Fixed bug that caused excessive estimate of angular error:
right ascension and azimuth are like longitudes -- they matter
less as an object approaches the poles. Scale such longitudinal
errors by the cosine of the latitudinal counterpart.