unit_test_c was not testing local solar eclipses.
C ParseDate() was not scanning seconds. This caused
discrepancies between C and C# results.
It was also failing to verify the Z on the end.
I decided it made more sense to report the Sun's altitude
at each solar eclipse event than reporting sunrise and sunset.
Sunrise and sunset are ambiguous because it's not clear which pair
should be reported. It's also harder to interpret than knowing
whether the Sun is above/below the horizon at each interesting time.
This motivated me to create a new type astro_eclipse_event_t that
holds the (time, altitude) pair for each event.
Defined data structure astro_local_solar_eclipse_t.
Created stubs for functions to find local solar eclipses.
Renamed lunar eclipse 'center' to 'peak' to be consistent.
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.
Refactored the shadow calculator so that the abstract logic is centralized
in a new function CalcShadow. Use that function to calculate the umbra
radius at the peak observation site. Theoretically, any positive value
indicates a total eclipse, but I had to fudge a little to get my calculations
to match the test data.
Documented C versions of SearchGlobalSolarEclipse and NextGlobalSolarEclipse.
Removed ECLIPSE_HYBRID enumeration value. Not going to use it.
Reworded structure documentation to indicate that the eclipse
kind refers to the peak observer only.
Use sidereal time to calculate the longitude of the point
on the Earth's surface where the Moon's shadow ray strikes it.
In the unit test, ignore glancing blows, but if the shadow
ray passes within 6100 km of the Earth's center, verify that
the total angular error is within about a quarter degree.
When there is a total or annular eclipse at the peak time and location,
I am calculating the geographic latitude of that peak within
1.006 degrees. I am disappointed by how sloppy that is, so I
will have to double-check all the math, especially related
to correcting for the Earth's oblateness.
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.