Commit Graph

538 Commits

Author SHA1 Message Date
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
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
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
Don Cross
fe18eb81e4 Implemented Python version of lunar eclipse predictor. 2020-05-16 17:38:00 -04:00
Don Cross
b970694aa2 Implemented JavaScript version of lunar eclipse functions. 2020-05-16 15:43:16 -04:00
Don Cross
f5b7c6c758 C#: Coded SearchLunarEclipse, NextLunarEclipse. Not yet tested. 2020-05-15 21:33:52 -04:00
Don Cross
9ea6a0664f Python: Use Espenak/Meeus formula for calculating Delta T. 2020-05-15 19:28:54 -04:00
Don Cross
4354e72e52 Minor tweaks due to sun, moon radius changes for lunar eclipse calculations.
Adding support for lunar eclipse calculations in the C code
caused me to tweak the values of the Sun and Moon radii.
This in turn caused unit test failures.
Made slight changes to the unit tests to get things passing again.
2020-05-13 15:52:22 -04:00
Don Cross
0fc2a3208d Lunar eclipse experiments: must include Earth's atmosphere.
To get a good fit with Fred Espenak test data, I have to
include an additional 65 km or so in the Earth's radius,
for the thickness of the atmosphere.
2020-05-12 18:02:58 -04:00
Don Cross
d67c3c7c4a Improved precision of Earth shadow calculation.
Using geocentric Moon instead of heliocentric Moon
gives more floating point precision for determining
the distance between the Moon and the Earth's shadow ray.
2020-05-12 08:22:58 -04:00
Don Cross
6b60e109fb Program for testing a formula to help find lunar eclipses.
I figured out a formula that determines how far away
the Moon is from the center of the Earth's shadow.
This confirms the formula makes sense for a known
total lunar eclipse on May 26, 2021.
2020-05-11 22:22:07 -04:00
Don Cross
f754a6de82 Fixed #58 - Solar System Barycenter, Earth/Moon Barycenter.
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.
2020-04-29 21:53:57 -04:00
Don Cross
d3c29e7fd6 Added magnified view of Sun around SSB in barycenter.html animation. 2020-01-21 14:11:52 -05:00
Don Cross
a61dda0370 Starting to work on a demo of plotting the Solar System Barycenter.
Animate the Sun's motion around the Solar System Barycenter (SSB),
along with the four major planets Jupiter, Saturn, Uranus, and Neptune.
2020-01-21 13:25:32 -05:00
Don Cross
4023974079 More adjustments to unit tests to pass for model adjustments. 2020-01-06 12:53:05 -05:00
Don Cross
c2273bf4e9 graphdist.py now allows specifying the number of points to plot. 2020-01-03 19:35:44 -05:00
Don Cross
0cb14332aa Reworked Python demos to use new function Time.Parse. 2020-01-03 14:21:35 -05:00
Don Cross
982c92ff9f Added code to help me investigate planet distance vs time.
I am working on adding aphelion/perihelion functionality
for planets. I ran into complicated behavior with the orbit
of Neptune. Its orbit is so circular, and its movement so slow,
that wobbling of the Sun around the Solar System Barycenter (SSB)
causes there to be 3 consecutive zero-slope points near the true
perihelion. I still need to resolve this.
2020-01-03 11:19:15 -05:00
Don Cross
2f255eda8c C# demo: Added horizon demo. 2019-12-23 14:03:53 -05:00
Don Cross
ff75e70753 C# demo: added seasons demo. 2019-12-23 13:49:09 -05:00
Don Cross
96cd7e4c7e C# demo: added riseset. 2019-12-23 13:30:13 -05:00
Don Cross
ff964879e4 C# demo: Added positions demo. 2019-12-23 12:55:17 -05:00
Don Cross
c1b3bda2bd C# demo: Added moonphase demo. 2019-12-23 12:36:50 -05:00
Don Cross
d79c2ab071 C#: Fixed bugs handling UTC DateTime. Got culminate demo working. 2019-12-23 12:07:33 -05:00
Don Cross
c08d29e7d9 Added missing cleanup in C demo script. 2019-12-23 11:38:41 -05:00
Don Cross
3ffc77caa6 C# demo: more work getting set up. 2019-12-23 11:36:55 -05:00
Don Cross
a4dc0eb41d C# demo: Starting to set up solution, projects, and build. 2019-12-23 10:59:48 -05:00
Don Cross
4db8c66775 Python: Ported example of finding intersection of ecliptic and horizon. 2019-12-19 13:14:37 -05:00
Don Cross
4fc2787569 JS: Added demo program horizon.js. 2019-12-14 21:16:43 -05:00
Don Cross
c55330cb60 Corrected the wording of the readme file for demo program horizon.c. 2019-12-12 12:37:24 -05:00
Don Cross
c008dcdff6 Finished C demo program horizon.c.
This program demonstrates converting ecliptic coordinates
to horizontal coordinates at a given time for a given observer.
It searches for the two locations on the horizon where the
ecliptic plane intersects it.
2019-12-12 12:35:00 -05:00
Don Cross
11b4678d2b Include culminate.py in demo documentation. 2019-08-11 16:11:14 -04:00
Don Cross
cb22bd40eb Added culminate.py demo program. 2019-08-10 18:02:15 -04:00
Don Cross
b508069049 Added Python demo: seasons.py. 2019-08-10 17:38:04 -04:00
Don Cross
0a8e470fed Added Python demo program positions.py. 2019-08-10 16:38:38 -04:00
Don Cross
7ce7af4a89 Added riseset demo program for Python.
Fixed bug in demo utility function ParseArgs.
Added README.md for Python demos.
2019-07-28 21:33:39 -04:00
Don Cross
7e21a5abb5 Python moonphase demo now has passing unit test. 2019-07-26 17:23:05 -04:00
Don Cross
91aafeaba7 Starting to add Python demo programs.
Created skeleton test harness for validating the demo programs.
Created stub moonphase.py.
Copied correct demo program outputs from nodejs; will tweak as needed.
Call the Python demo test harness from the 'run' script.
2019-07-26 16:49:48 -04:00
Don Cross
112366b66a Fixed cosmetic issues in demo pages after removing GitHub CSS. 2019-07-09 20:18:03 -04:00
Don Cross
1b0ba300d8 Removed all references to GitHub Pages, because it has been disabled.
I'm not going to use GitHub Pages after all, because it is
causing more problems than it is helping. All I really wanted
was a way to host live JavaScript browser examples.
I will find my own way of hosting just those.

The main problem is that GitHub pages uses a different flavor
of Markdown than GitHub. This makes it really difficult to get
something that works right across both.  In general, it doubles
how much stuff I have to look at when I make a cosmetic change.

So I have already turned off GitHub Pages on this repo,
and this commit removes all links and references to it.
2019-07-09 19:49:28 -04:00
Don Cross
0c824bcf1b Major performance improvement for C library: re-use Earth tilt calculations.
Just like I did in the Python version, avoid repeated calculations
of the Earth's tilt angles for a given time. Do this by caching
the angles in the astro_time_t structure. This requires passing in
the time values by address instead of by value. I may go back and
change all the time parameters to pointers for consistency.
2019-06-27 21:47:30 -04:00
Don Cross
743394b6d7 Added C example: culminate. 2019-06-18 21:00:57 -04:00
Don Cross
9e4c340f60 Added link to culminate.js in nodejs example markdown. Enhanced comments. 2019-06-18 15:41:04 -04:00
Don Cross
a205fcbcb7 Added node.js example for how to calculate culmination. 2019-06-18 15:28:47 -04:00
Don Cross
0e0bac95ce Added nodejs seasons test. 2019-06-16 21:30:53 -04:00
Don Cross
ab642feb21 Added C example: calculating seasons. 2019-06-16 20:39:40 -04:00
Don Cross
5e755fe894 Fixed warnings found by lgtm. 2019-06-16 13:47:10 -04:00