The makedoc script now destroys the html directory before
regenerating it. I discovered that fossils were piling up in
there because jsdoc only creates new files; it does not clean up
old files that are no longer valid.
Was missing any data from delta_t/predicted.txt that occurred after
the final integer year value. Now include the very last line of data
even when it is not on a year boundary.
This broken the Travis CI build, and we don't ship html documentation
anyway, so there is no need to unit test it.
Skip local html doc generation if html directory does not exist.
Figured out that JPL Horizons and other sources define elongation
as the full angle between bodies, not just the ecliptic projection
of the angle. This brings my predictions within 0.6 hours of JPL.
Still not happy with some of the hour errors, up to 14 hours.
Maybe I need to search for actual angle between planet and Sun,
not just along ecliptic longitude.
Also should try generating JPL Horizons data to verify the
test data I have here.
I don't have authoritative test data for Saturn, so I'm
just comparing against its own calculations, after having
visually inspected some test cases against my old code and
Heavens Above. This is not really adequate but it's the best
I can do right now.
Now that the magnitude test is passing (Saturn not yet implemented),
I added it to the unit test suite.
I changed the order the test are run to thoroughly exercise lower
level calculations before the tests that are based on them.
That way, in case of breakage, it will hopefully be quicker
to find the culprit.
Now Uranus calculations match output of JPL Horizons closely.
I figured this out by graphing JPL Horizons data and tweaking
my phase curve formula to match.
I was able to eyeball the slope from a graph of deduced
phase curve by analyzing JPL Horizons output.
Now my Pluto magnitude values are well within agreement.
I found a paper by James L Hilton (USNO) that provides
formulas for the phase curves of Mercury and Venus that match
the JPL Horizons tool within 0.012 mag.
https://iopscience.iop.org/article/10.1086/430212
JPL Horizons data does not include ring aspect for Saturn,
so don't bother plotting the Saturn data.
I already deleted the Saturn data so it's not there anymore.
The JPL Horizons data for Saturn says at the bottom of the file
that it does not include variations due to ring aspect.
Therefore, it is not suitable for my needs.
I realized if I'm going to create regression models of planets,
it will be helpful to have known correct values of heliocentric
distance of the planet also. Will need to figure out what to do
for Saturn's rings.