Commit Graph

404 Commits

Author SHA1 Message Date
Don Cross
f9ef46c5cc Implemented Python version of transit search functions. 2020-06-14 14:55:52 -04:00
Don Cross
b3573c12d7 Implemented JS Transit.
Implemented JavaScript versions of the transit functions.
2020-06-14 13:38:30 -04:00
Don Cross
4f842627da Fixed mistake in GeoVector(SUN): we do need to correct for light-travel time.
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.
2020-06-13 13:45:59 -04:00
Don Cross
fb74b2f331 Published npm package version 1.0.8 2020-06-06 21:51:29 -04:00
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
d8591c3cd7 Implemented JS LocalSolarEclipse. 2020-06-05 21:40:13 -04:00
Don Cross
3ed2bc3974 Implemented JS GlobalSolarEclipse. 2020-06-05 15:44:42 -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
7a182d1d8d Bumped node package version to 1.0.7. 2020-05-17 14:32:27 -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
1739e71c92 Decrease error threshold by using JPL Horizons Delta T function. 2020-05-15 20:04:04 -04:00
Don Cross
30a85407b4 JavaScript: Use Espenak/Meeus DeltaT function. 2020-05-15 18:42:12 -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
df776d73a6 Fixed #66 - removed JavaScript performance tuning code. 2020-05-11 19:50:47 -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
f9daa64ca0 Published npm package v 1.0.6. 2020-05-04 14:36:58 -04:00
Don Cross
9df1a7a128 Added documentation for JavaScript function Constellation. 2020-05-04 13:37:11 -04:00
Don Cross
4d81c4324f Shrank minified JS code to 76338 bytes.
Represent DeltaT table entries as lists rather than objects.
This makes them more compact in the minified code.
2020-05-04 12:59:17 -04:00
Don Cross
e7e9d1bb78 Shrank minified JavaScript to 76978 bytes.
Represent constellation name/symbol pairs as lists rather than objects.
This makes the representation more compact.
2020-05-04 12:49:00 -04:00
Don Cross
762bf08f66 Shrank minified JS code more: from 80904 to 77329 bytes.
Store each constellation border as a list rather than an object.
This makes the encoding more compact.
2020-05-04 12:39:32 -04:00
Don Cross
9a6005bf24 Shrank minified JavaScript from 86423 bytes to 80904 bytes.
Changed the units of the angles stored in the constellation
borders data so that the numbers can be represented more compactly.
This requires converting the numbers back at runtime, but this is
well worth the smaller size.
2020-05-04 12:27:37 -04:00
Don Cross
c955a56210 Added constellation finder function to JavaScript code. 2020-05-04 10:09:46 -04:00
Don Cross
2cb06afa63 Added JavaScript code generator for constellation data tables. 2020-05-03 22:06:18 -04:00
Don Cross
3bb740fd1c Fixed #62 - Automatically update copyright year range. 2020-04-30 15:12:14 -04:00
Don Cross
e80b5a45d0 Updated npm package version to 1.0.5: supports EMB, SSB.
Astronomy Engine now supports calculating heliocentric
Solar System Barycenter (SSB) and
Earth/Moon Barycenter (EMB).
2020-04-29 22:11:11 -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
20f94c9622 Published npm package 1.0.4 2020-01-07 16:28:19 -05:00
Don Cross
6d871c023a More JavaScript documentation fixes. 2020-01-07 15:34:15 -05:00
Don Cross
762ae30a14 Fixes to JavaScript documentation. 2020-01-07 14:59:42 -05:00
Don Cross
60db741717 Ported planetary apsis search functions to JavaScript. 2020-01-07 14:09:45 -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
b6a82de0a6 Published npm package 1.0.3. 2019-12-19 21:31:31 -05:00
Don Cross
7040ff8684 Cleaned up documented return types for Python functions.
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.
2019-12-18 16:53:13 -05:00
Don Cross
dc2e561e41 JS: Added rotation functions to documentation topic index. 2019-12-15 10:44:36 -05:00
Don Cross
4fc2787569 JS: Added demo program horizon.js. 2019-12-14 21:16:43 -05:00
Don Cross
ef633967e3 C, JS: continued eliminating redunancies in precession, nutation. 2019-12-14 20:18:45 -05:00
Don Cross
7b7c28bced C: Added Astronomy_VectorFromEquator and Astronomy_EquatorFromVector.
These helper routines in the JavaScript code make sense for C also.
2019-12-14 17:20:32 -05:00
Don Cross
185a872082 JS: Added helper function EquatorFromVector. 2019-12-14 14:44:29 -05:00
Don Cross
7307c99280 JS: Added function VectorFromEquator to convert equatorial coordinates to vector. 2019-12-14 14:36:56 -05:00
Don Cross
46fa5174a2 JS: Added factory function MakeRotation.
There was no way for outside callers to directly instantiate
a RotationMatrix object. Provided the factory function MakeRotation.
2019-12-14 14:19:25 -05:00
Don Cross
32f5567254 JS: More unit testing of rotation. Fixed a couple more bugs it uncovered. 2019-12-13 21:06:52 -05:00
Don Cross
690d3d0528 JS: More unit testing of rotation. Fixed a couple of bugs. 2019-12-13 20:18:48 -05:00
Don Cross
8322975e15 JS: Added inverse matrix unit test. Fixed bugs it uncovered. 2019-12-13 07:21:24 -05:00
Don Cross
13041b735e JS: Finished porting rotation functions. Not yet tested. 2019-12-12 21:30:54 -05:00