Use a private enumerated type to select which direction
the precession and nutation is to be done:
- from date to J2000
- from J2000 to date
Normalize the order of parameters to be consistent
between precession() and nutation(), and across languages.
Pass in AstroTime instead of a pair of floating point TT
values (one of which had to be 0).
Added TypeScript version of ObserverVector(),
but it has not yet been documented or tested.
Astronomy Engine used to use USNO historical and predictive tables,
along with linear interpolation, to calculate Delta-T values.
The problem with the USNO tables is, they did not work well outside
a few centuries around present day.
Later I replaced with Espenak & Meeus piecewise polynomials
that work over a much larger time span (thousands of years).
I just discovered there were still comments in the code referring
to the USNO models. I updated the ones I could find to reflect
the current truth about how the code works today.
This is technically a breaking change, but only for clients
that use the cartesian coordinates in an ecliptic coordinate
return type. Before now, the coordinates were just separate
floating-point members ex, ey, ez. Now they are a standard
vector type.
The purpose is to allow seamless interfacing with vector
rotation functions, and to be consistent with the equatorial
coordinate types.
Now that equatorial coordinates include both angles
and cartesian coordinates, there is no need for the
VectorFromEquator function. It has been removed
from all four supported languages.
The expression "VectorFromEquator(equ, time)" can be
replaced with "equ.vec" in any calling code.
I'm about to start working on adding a new output
from the Horizon functions. It was a good time to better
document the ideas behind these calculations, before
adding anything new. These are internal comments only
and do not affect generated documentation.
While I was in there, I noticed extra code that was
checking for impossible return values from atan2().
I eliminated these.
I forgot that my build process automatically updates
copyright years when the current year changes.
My Travis CI unit tests verify that there are no local
changes after running all the tests.
That test failed because the update_copyrights.py changed
all the "2019-2020" to "2019-2021".
In all four versions of Astronomy Engine (C, C#, JavaScript, and Python),
starting a search for a full moon near December 19, 2020 would fail.
I added a unit test to all four languages and it failed consistently
across them all.
The root cause: I was too optimistic about how narrow I could make
the window around the approximate moon phase time in the
SearchMoonPhase functions. Finding the exact moon phase time failed
because it was outside this excessively small window around the approximate
time. I increased the window from 1.8 days to 3.0 days.
This should handle all cases with minimal impact on performance.
Now all four of the new unit tests pass.
I believe this wraps up the Python integrator.
It now works in all 4 languages and passes all tests.
Fixed up demo tests to match new output.
Turned on Travis CI checking in this branch again.
To be consistent, when calculating the geocentric position of the Sun,
we do need to correct for light travel time just like we would for any
other object. This reduces the maximum time error for predicting transits
from 25 minutes to 11 minutes.
Also had to disable aberration when calculating moon phases
(longitude from Sun) in order to keep a good fit with test data.
Added global/local solar eclipse functions to topic indexes for
C#, JavaScript, and Python.
Revised wording "eclipse found may be" --> "eclipse may be".
Python:
- Added missing Attributes section in class GlobalSolarEclipseInfo.
- Added classes EclipseEvent, LocalSolarEclipseInfo.
- Added stub functions SearchLocalSolarEclipse, NextLocalSolarEclipse.
In all 4 supported languages, use consistent constant names for
Earth and Moon radii.
Use Moon's equatorial radius for rise/set timing.
Use Moon's mean radius for calculating Moon's umbra radius for
detecting solar eclipses.
Also use Moon's mean radius for determining whether the Earth's shadow
touches the Moon, for finding lunar eclipses.
Use the Moon's polar radius for distinguishing between total
and annular eclipses, with a 14 meter bias (instead of 1420 meters!)
to match Espenak data.
Use consistent unit test error threshold of 0.57 minutes for rise/set.
Updated demo test data for slight changes to rise/set prediction times.
Updated doxygen options to issue an error on any warnings.
Fixed the incorrect function name link that doxygen was warning me about.
There is no need to use absolute value, and it makes the logic
easier for me to understand if I express each of the inequalities
in terms of addition rather than subtraction.
I had to increase certain error tolerances in the unit tests.
Reworked the unit tests to make more sense by waiting until
each language step is done to check against each other.
That way I can run a single language step independently.
Increase type safety by making the enumerated type Body
derive from Enum rather than IntEnum, as recommended by
https://www.python.org/dev/peps/pep-0435/
Fixed places where I was treating Body values as integers.
Now when a Time object is evaluated and represented in
the Python interpreter, it results in a string of the form:
astronomy.Time(ut)
where ut is the numeric representation of the ut field.
This mimics the exact way such a Time value could be constructed.
That is, eval(repr(t)) results in a time value equal to t.
It turns out I was off by nearly 18 hours in the B1875 epoch.
This has a tiny effect on the orientation of the Earth's axis.
Instead of: ut = 1875-01-01T12:00:00.000Z
the correct epoch is: ut = 1874-12-31T18:12.21.950Z
See the comments in the Constellation functions in
each of the source files for more info.
Can now calculate the heliocentric Solar System Barycenter (SSB)
and Earth/Moon Barycenter (EMB).
Changes made in C, C#, JavaScript and Python:
Added new body codes SSB, EMB.
Added support for calculating both in HelioVector functions.
Verified that all calculations match NOVAS.
Verified that all calculations match each other across languages.
Adjust VSOP models for planets to bring their prediction errors beneath
0.1 degrees of a total orbit.
ctest no longer runs tests when no command line arguments are given.
That was annoying because I kept running it by accident.
Include an extra 4 terms in the radial component of the VSOP
model for Neptune. The code automatically picks the 4 terms
that maximize the time derivative's highest possible contribution.
Added function Time.Parse to convert a UTC date/time string
into a Time object. People should not have to keep reinventing
that wheel. I will be able to simplify astro_demo_common.py.
Currently I ignore any errors when checking the C# documentation,
because there are broken links for the rotation functions I
haven't started adding yet. I will turn that error check back on
once I finish those functions.
pydown.py now searches description text for internal links
and expands them properly for Markdown file README.md.
For example: "#Body" ==> "[`Body`](#Body)".
Fixed a couple of incorrect "Astronomy_..." names in Python docs.
Never use pound-signs inside documentation for Python return types.
Automatically create internal link just like for function parameter types.
Added special case logic in pydown.py for "Time or `None`".
Fixed minor documentation mistakes in JS version.