Commit Graph

2227 Commits

Author SHA1 Message Date
Don Cross
9d9462f30d Fixed #41 - Consistently call the project "Astronomy Engine". 2020-04-30 15:16:08 -04:00
Don Cross
3bb740fd1c Fixed #62 - Automatically update copyright year range. 2020-04-30 15:12:14 -04:00
Don Cross
051f2e52a1 Fixed #61: Clarify that 1700..2200 year range applies to Pluto only. 2020-04-30 14:24:47 -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
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
20f94c9622 Published npm package 1.0.4 2020-01-07 16:28:19 -05:00
Don Cross
2a1a25cd29 Fixed problems with building/testing on Windows. 2020-01-07 16:00:17 -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
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
7afdd4b7e1 Tweaked main readme file. 2020-01-06 20:53:32 -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
ff482335db C planet apsis: made SearchPlanetApsis, NextPlanetApsis parameters consistent.
Existing functions have body parameter before time parameter.
Made the planet apsis search functions consistent with that pattern.
2020-01-06 14:16:17 -05:00
Don Cross
6304cc861a C planet apsis: removed unnecessary clamping of apsis search interval to 10 days. 2020-01-06 13:57:00 -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
a5dbfd22c4 Adjusted JS unit test thresholds to pass for updated planet models.
Because I had to tweak models to get better planet apsis predictions,
it caused slight changes in other calculations that tripped
unit test errors. These are all still within safe values, so
I relaxed the ones that failed.
2020-01-06 12:06:30 -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
59237cc021 Split VsopTruncate into VsopTruncate/VsopTrim.
The VsopTruncate function had logic to remove any trailing
empty series from a coordinate formula. Now I have split
this out into a separate function called VsopTrim.
I did this because I want to experiment with re-extending
VSOP models to improve prediction of planet apsides,
so some series that are empty might become non-empty again
before being saved to disk.
2020-01-05 12:38:08 -05:00
Don Cross
5df1af7428 Deleted trailing whitespace in vsop.c 2020-01-05 11:47:46 -05:00
Don Cross
4b38e8ccf6 Fixed typo in comment. 2020-01-04 22:33:31 -05:00
Don Cross
fd77b6b6f6 C: Planet apsis test measures apsis error in terms of orbital angles.
Calculate an orbital angle error as a ratio of day error
divided by orbital period in days, multiplied by 360 degrees.
This is a way to normalize errors for distant planets.
2020-01-04 22:31:31 -05:00
Don Cross
331bdfcea9 Added special-case logic for finding Neptune perihelion/aphelion.
Because of Sun/SSB wobble, can't use slope solver to find
Neptune apsides. Added special case logic to find them
using more of a brute force algorithm.
Unit tests now pass, but require very loose tolerances
for the outer planets.
I will have to adjust the model generator to create
more accurate heliocentric distance models for the VSOP
planets, and more accurate Chebyshev polynomials for Pluto.
This will be a judgment call to balance accuracy versus code size.
2020-01-04 11:01:28 -05:00
Don Cross
1436a0be25 Planet apsides - work in progress - BROKEN TESTS.
Use planet apsis test data generated by generate.c to verify
Astronomy Engine calculations. Currently this fails for Neptune
as expected. Will fix that in a future commit.

Implemented a more efficient function Astronomy_HelioDistance
for calculating heliocentric distances of the planets
Mercury through Neptune: use VSOP distance formula only.
For Moon and Pluto, fall back to calculating heliocentric
vector and then finding the length of that vector.
2020-01-04 09:37:56 -05:00
Don Cross
07201afe0a Generate planet perihelion/aphelion test data from NOVAS.
Created my own unit test data from NOVAS for planet apsides.
Handle oddities with Neptune's orbit as a special case.
Removed hacks in ctest.c.
2020-01-04 07:05:43 -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
703f924210 Python: Added Time.Parse function.
Added function Time.Parse to convert a UTC date/time string
into a Time object. People should not have to keep reinventing
that wheel. I will be able to simplify astro_demo_common.py.
2020-01-03 14:03:01 -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
50044c0209 Added extra checks for a few Mars apsides. 2019-12-31 21:57:59 -05:00
Don Cross
513de6b5c1 C: Added planet apsis test that checks intervals between apsides.
This reveals surprising variation in the intervals.
I think for Earth, the Moon is causing enough wobble
that I might want to find the apsides for the Earth/Moon Barycenter
instead of the Earth by itself. It will be interesting to see
if this increases agreement with the test data.
2019-12-31 19:58:52 -05:00
Don Cross
dbde7cb27d Moved and updated apsis data readme file. 2019-12-31 18:23:12 -05:00
Don Cross
e6e704b33d Updated Windows run.bat for Moon/Earth apsis. 2019-12-31 17:56:02 -05:00
Don Cross
4d573b50bd C: First draft of SearchPlanetApsis, NextPlanetApsis.
I have tested only for Earth.
Will need to add tests for all the other planets.
2019-12-31 16:02:23 -05:00
Don Cross
5de0c2e0aa Added data for Earth perihelion/aphelion dates. 2019-12-30 20:52:34 -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
906c790952 Fixed whitespace diff noise in Windows version of makedoc. 2019-12-23 14:41:05 -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