Commit Graph

276 Commits

Author SHA1 Message Date
Don Cross
84703016e1 Narrow the search window for local solar eclipses. 2020-06-06 14:32:04 -04:00
Don Cross
0a4e0c48a0 Documentation fixes for eclipse functions.
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.
2020-06-06 10:42:57 -04:00
Don Cross
9645ff6cc3 C# LocalSolarEclipse: finished code, but no unit test yet. 2020-05-26 21:09:22 -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
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
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
30c2141ca6 Added documentation about lunar eclipse functions to topic indexes. 2020-05-16 20:41:57 -04:00
Don Cross
b970694aa2 Implemented JavaScript version of lunar eclipse functions. 2020-05-16 15:43:16 -04:00
Don Cross
a753fb54b7 C# LunarEclipse: Applied optmizations from the C version of LunarEclipse. 2020-05-16 13:58:49 -04:00
Don Cross
a3ee6d3035 C# lunar eclipse code is now passing unit test. 2020-05-15 22:30:43 -04:00
Don Cross
f5b7c6c758 C#: Coded SearchLunarEclipse, NextLunarEclipse. Not yet tested. 2020-05-15 21:33:52 -04:00
Don Cross
7eb3322fd1 C#: Use Espenak/Meeus DeltaT function. 2020-05-15 17:20:51 -04:00
Don Cross
b7c59f6628 Include extrapolated DeltaT values for the years 2030..2200.
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.
2020-05-14 20:24:34 -04:00
Don Cross
6c3655c1c6 Corrected the B1875 epoch for determining constellation boundaries.
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.
2020-05-04 21:30:36 -04:00
Don Cross
540d9d7cef Added constellation function to Python code. 2020-05-03 21:37:28 -04:00
Don Cross
d05f213584 Added constellation finder algorithm to C#. 2020-05-03 15:06:02 -04:00
Don Cross
4f8977067b Snapped constellation border to nearest quarter arcminute.
Instead of using decimal hours/degrees rounded to 4 decimal places,
I went back to the original constel.c and modified it to represent
both RA and DEC in degrees, and to round all values to the nearest
quarter arcminute. This seems closer to the original intent of the
constellation boundaries.
2020-05-02 21:21:32 -04:00
Don Cross
8367638d28 Updated codegen to generate C# constellation tables.
This is just a step toward supporting constellation
calculations in C#. Nothing uses the new tables yet.
2020-05-02 19:24:01 -04:00
Don Cross
3bb740fd1c Fixed #62 - Automatically update copyright year range. 2020-04-30 15:12:14 -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
ec6a82b133 Improved performance of Neptune apsis search.
The apsis search for Neptune was sampling 1000 points
in its first pass. It turns out 100 is enough.
2020-01-07 11:57:54 -05:00
Don Cross
7892b797ba Python: planet apsis search is working. 2020-01-06 20:49:49 -05:00
Don Cross
cdf9c6955e Added planet apsis functions to C and C# documentation topic indexes. 2020-01-06 17:28:09 -05:00
Don Cross
977ab2d5b3 C# planet apsis: Implemented unit tests. 2020-01-06 16:04:57 -05:00
Don Cross
9992f2570b Starting to port planetary apsis functions to C#.
No unit tests implemented yet.
2020-01-06 15:19:19 -05:00
Don Cross
02dc4e95a4 Pluto apsis predictions are now within 0.0810 degrees of orbit period.
Increased from 7 Chebyshev sections to 8.
This also decreases max arcmin error from 0.336084 to 0.120252.
2020-01-06 11:25:47 -05:00
Don Cross
f67ddf1c8d Planet apsis: all planets but Pluto now have prediction error below 0.1 degrees.
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.
2020-01-06 10:59:38 -05:00
Don Cross
819e59745d Decreased Neptune apsis prediction errors from 49.25 days to 15.45 days.
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.
2020-01-05 20:44:29 -05:00
Don Cross
113396d04c C#: Call RefractionAngle from Horizon. Added refraction unit test.
Removed redundant refraction calculations from Astronomy.Horizon().
Added a unit test that InverseRefractionAngle() converges and calculates
an accurate inverse of RefractionAngle().
2019-12-24 11:06:33 -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
93fdf9a146 C# rotation: added remaining rotation functions.
Fixed a couple of mistakes in the C documentation.
Turned on link checking for csharp markdown output.
2019-12-22 13:44:58 -05:00
Don Cross
d3f0339498 C# rotation: Added more rotation functions. 2019-12-22 13:32:15 -05:00
Don Cross
8768a157cb C# rotation: Added more rotation functions.
More work on new functions for converting orientation systems.
Changed a few classes to structs for memory allocation efficiency.
Moved stuff around in astronomy.cs so the Astronomy class comes
last. This is helpful when I want to add new functions, so I
don't have to search for the end of the class.
2019-12-22 12:07:38 -05:00
Don Cross
660096e8b0 C# rotation: Added Rotation_EQJ_ECL, Rotation_ECL_EQJ. 2019-12-21 21:54:41 -05:00
Don Cross
30a0e51347 C# rotation: Implemented InverseRotation(). 2019-12-21 21:08:35 -05:00
Don Cross
633b7ae2ef C# rotation: Added CombineRotation. Started unit tests. 2019-12-21 20:52:15 -05:00
Don Cross
88eaadf176 C# rotation: split nutation into nutation_rot, nutation. 2019-12-21 19:55:16 -05:00
Don Cross
8d28f07ef3 C#: Added class RotationMatrix, reworked precession function.
Starting to work on rotation functions in C#.
Added class RotationMatrix.
Split precession() into precession() and precession_rot().
Fixed problem in csdown handling type double[3,3].
2019-12-21 19:03:26 -05:00
Don Cross
30d03321e3 C# doc: fixed broken internal links. 2019-12-21 15:15:44 -05:00
Don Cross
3160bbc992 C# doc: Fixed incorrect symbol names in documentation internal links. 2019-12-21 14:46:26 -05:00
Don Cross
6c8bef9b5e C# doc: Fix internal links within descriptive text. 2019-12-21 14:31:47 -05:00
Don Cross
3ae1d92cb2 C# doc: generate Markdown for type summary and remarks. 2019-12-21 13:54:23 -05:00
Don Cross
d0183e2930 C# doc: generate Markdown for class member variables. 2019-12-21 13:48:31 -05:00
Don Cross
1f654d3130 Fixed whitespace that broke Travis CI build. 2019-12-20 22:10:33 -05:00
Don Cross
3bb59f99f1 C# doc: generating Markdown for enumeration values. 2019-12-20 21:48:25 -05:00
Don Cross
b6a913785c C# doc: Merging classes, structs, and enums into one section. 2019-12-20 21:21:51 -05:00
Don Cross
424fc82da8 C# doc: starting to generate Markdown for classes.
Currently emit the member functions.
Need to emit the public member variables.
2019-12-20 21:13:46 -05:00
Don Cross
ef654a1d14 C# doc: documenting function parameters and return value. 2019-12-20 20:30:13 -05:00
Don Cross
1bb7fcde6f C# doc: starting to merge in summary and remarks for each function. 2019-12-20 20:10:01 -05:00