Commit Graph

2245 Commits

Author SHA1 Message Date
Don Cross
87b18dc022 Merged seasons into test.js. 2020-06-02 22:24:47 -04:00
Don Cross
d7c8b8c120 Merged elongation into test.js. 2020-06-02 22:11:07 -04:00
Don Cross
f3f6515033 Merged planet apsis into test.js. 2020-06-02 21:48:27 -04:00
Don Cross
8784c39d7e Merged lunar eclipse into test.js. 2020-06-02 21:42:35 -04:00
Don Cross
f4536ba039 Merged lunar apsis test into test.js. 2020-06-02 21:28:50 -04:00
Don Cross
3de8ee10db Merged moon phase test into test.js. 2020-06-02 21:11:53 -04:00
Don Cross
ded450d226 Starting to rework JavaScript tests to all be inside a single source file test.js. 2020-06-02 19:16:44 -04:00
Don Cross
1e6afbe886 Fixed some oopsies in the C unit tests.
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.
2020-05-27 14:49:00 -04:00
Don Cross
366a00467f C# LocalSolarEclipse: finished second unit test. Fixed mistakes in input data. 2020-05-27 08:20:13 -04:00
Don Cross
4e9b9d0a91 C# LocalSolarEclipse: ported first unit test. 2020-05-26 21:44:46 -04:00
Don Cross
3c5de6b4f9 C: Fixed documentation mistake. 2020-05-26 21:18:50 -04:00
Don Cross
9645ff6cc3 C# LocalSolarEclipse: finished code, but no unit test yet. 2020-05-26 21:09:22 -04:00
Don Cross
e9503bc202 Made 'generate check' output less verbose unless -v is specified.
This completes my initial pass for making unit test less verbose.
2020-05-26 12:23:40 -04:00
Don Cross
75e26ccac2 Changed verbosity option from -d to more standard -v. 2020-05-26 11:58:02 -04:00
Don Cross
b48ac658da Made JavaScript unit tests less verbose by default. 2020-05-26 11:43:03 -04:00
Don Cross
0787b88ddd Python unit tests are less verbose unless -d option is specified. 2020-05-26 11:14:12 -04:00
Don Cross
382b9ba58f Added -d option to ctest for verbose output. 2020-05-26 10:49:44 -04:00
Don Cross
86c5f4c66f C# unit test is much less verbose.
By default, print a lot less C# unit test output.
Added '-d' debug mode option to ./unit_test_csharp that
prints the more verbose output.
2020-05-26 09:44:45 -04:00
Don Cross
2f22520e0f C# GlobalSolarEclipse: passes unit test. 2020-05-26 09:13:28 -04:00
Don Cross
26b3a68e00 C# GlobalSolarEclipse: code builds, but no unit test yet. 2020-05-25 22:46:50 -04:00
Don Cross
a8b29b4509 Renamed lunar eclipse info member from 'center' to 'peak'.
This makes the name consistent with the solar eclipse fields.
2020-05-25 21:07:36 -04:00
Don Cross
b03914393e Added local solar eclipse test to Windows build. 2020-05-25 17:48:07 -04:00
Don Cross
692744d8b8 C solar eclipse: added documentation in topic index. 2020-05-24 21:00:35 -04:00
Don Cross
cc932ddbc4 Added more local solar eclipse data points. 2020-05-24 20:40:24 -04:00
Don Cross
ec3fa398f5 Filled out the verification logic in LocalSolarEclipseTest2. 2020-05-24 17:51:50 -04:00
Don Cross
f2c1d4a409 Created scaffold for another local solar eclipse test.
Adding data for eclipses that are not at the peak location.
Parsing the data but not verifying it yet.
2020-05-24 16:16:21 -04:00
Don Cross
1015b503de Fixed bug : wasn't calculating peak time. Not sure why anything worked. 2020-05-24 14:56:53 -04:00
Don Cross
a79ed9a487 C local solar eclipse predictor is passing first batch of unit tests. 2020-05-24 14:05:57 -04:00
Don Cross
6f03b35398 Started a unit test for local solar eclipses. 2020-05-24 11:11:54 -04:00
Don Cross
8c29661d6f Redesigned local solar eclipse programming interface.
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.
2020-05-24 10:30:55 -04:00
Don Cross
ef12121621 Starting to implement C version of local solar eclipse.
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.
2020-05-23 21:29:16 -04:00
Don Cross
d0699e828e doxygen: enable more warnings, eliminate unnecessary output.
Tell doxygen to warn (and fail) for undocumented parameters.
Tell doxygen to generate XML only, not LaTeX, HTML, etc.
2020-05-23 13:58:23 -04:00
Don Cross
e3255c7401 Cleaned up and unified Earth and Moon radius constants.
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.
2020-05-23 13:08:25 -04:00
Don Cross
c148fa6869 C global solar eclipse: Determine whether observer sees total or annular.
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.
2020-05-22 20:54:14 -04:00
Don Cross
d9e5f9dc57 C global solar eclipse: added documentation for functions.
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.
2020-05-21 22:13:47 -04:00
Don Cross
dd02364fb4 C global solar eclipse: calculate longitude of the peak eclipse.
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.
2020-05-21 20:59:22 -04:00
Don Cross
12aec84513 C global solar eclipse: calculating geographic latitude.
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.
2020-05-20 22:31:08 -04:00
Don Cross
741e38a3ef Increased efficiency of global solar eclipse predictor.
Search for peak shadow within 0.03 days of new moon.
2020-05-20 19:19:43 -04:00
Don Cross
487fe9743d Doubled performance of global solar eclipse predictor.
Ignore new moons whose ecliptic latitude is beyond 1.8 degrees.
This cuts the number of CalcMoon() calls in half.
2020-05-20 18:59:36 -04:00
Don Cross
7e345915b2 Simplified the inequalities that detect type of lunar eclipses.
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.
2020-05-20 17:24:43 -04:00
Don Cross
2dcdf3bd8a Updated Windows build to test global solar eclipse prediction. 2020-05-20 11:20:49 -04:00
Don Cross
8d3c43d794 Making progress on the C version of the solar eclipse predictor. 2020-05-19 22:33:33 -04:00
Don Cross
9ced9b4052 Starting to work on C version of global solar eclipse prediction. 2020-05-19 17:49:33 -04:00
Don Cross
d926c51cce Added lunar eclipse tests to Windows build. 2020-05-17 15:11:44 -04:00
Don Cross
d6b9967bd1 Updated error thresholds to make Windows unit tests pass. 2020-05-17 14:59:28 -04:00
Don Cross
7a182d1d8d Bumped node package version to 1.0.7. npm_1.0.7 2020-05-17 14:32:27 -04:00
Don Cross
5b822de1b5 Fixed broken README link to C# lunar eclipse demo. 2020-05-17 14:19:15 -04:00
Don Cross
83544bf57d Added C# demo for lunar eclipse.
Alphebetized demo readme pages.
2020-05-17 14:03:01 -04:00
Don Cross
d9e2ea5816 Added C version of lunar eclipse demo.
Also added better comments to Python version.
2020-05-17 13:02:18 -04:00
Don Cross
78e68354b0 Added Python demo for calculating lunar eclipses. 2020-05-16 22:14:55 -04:00