This unifies how we perform the various NumPy array maneuvers,
eliminates duplicate code, and much more clearly expresses the
difference between the two routines (to wit: that one is a faster
version of the other by computing fewer terms).
Now it always gets computed in once place, rather than in two different
places. This eliminates a little repeated code, but more importantly
sets up a nutation model unification that should hopefully be next!
Now that we represent time internally as two floats instead of one, our
light-time correction routine can be improved to generate far less noise
down below the micro-arcsecond level. That might not sound like much,
but — for example — over the ten seconds around the maximum elongation
of Venus, the elongation varies by only about 5e-5 mas! Jitter down in
the tens of nano-arcseconds is enough to make a solver think it’s found
several different seconds in which a maximum elongation occurred.
It looks like http://maia.usno.navy.mil/ is down this morning, which
reminds me that documentation should be more consistent in loading
timescales from internal files unless illustrating explicitly how to
download up-to-date files.
Started explaining how to find maxima, then saw that the result is kind
of a disaster. Time to dig in and see how the very poor behavior of the
elongation can be improved.
By working directly off the number of degrees, we avoid rounding errors
involved in angles created from whole numbers of degrees. This
hopefully fixes the build.
And while I’m at it, switch to 2-step conversions between radians and
other units. While it was faster to do only a single multiply against a
pre-computed constant like (tau / 360.0), I suspect that two operations
might behave better when the angle is, for example, exactly a multiple
of tau. I should really learn float behavior better (or experiment more).
Without some highlighting, I get lost when I click on a link to
something in the API docs and the item is down at the bottom of the page
because it happens to be listed last. Without highlighting to help me,
I always look for the item at the top of the browser window.