Commit Graph

2245 Commits

Author SHA1 Message Date
Don Cross
18c293d8c0 Fixed #12 - Support dates 1700-01-01 through 2199-12-31.
Expanded the Chebyshev model for Pluto.
Resampled VSOP models to have required accuracy over wider date range.
Decreased astro_check.js sampling rate to allow tests to run faster.
2019-04-15 13:10:32 -04:00
Don Cross
643c7a1b34 Added explanatory comment. No code change. 2019-04-15 11:02:52 -04:00
Don Cross
d01ac8e150 Fixed #13 - Eliminate use of Julian Dates.
Now the JavaScript code uses UT and TT values expressed
in days since 2000, instead of Julian Dates.
This makes the numeric values much smaller and thus
should yield less floating point error when time solvers
are added later.
2019-04-15 10:47:00 -04:00
Don Cross
e87ccfc044 Eliminating JD: CalcChebyshev 2019-04-15 10:28:28 -04:00
Don Cross
3fc64bec77 Eliminating JD: iau2000b 2019-04-15 10:19:58 -04:00
Don Cross
938942c86a Eliminating JD: nutation_angles, mean_obliq, e_tilt 2019-04-15 10:15:03 -04:00
Don Cross
bcd37239bb Eliminating JD: precession() now uses TT expressed in J2000 days. 2019-04-15 10:03:34 -04:00
Don Cross
a3f899e234 Eliminating JD: fixed nutation() 2019-04-15 09:56:09 -04:00
Don Cross
fe70afa483 Eliminating JD: fixed era() 2019-04-15 09:47:37 -04:00
Don Cross
14119de894 Work in progress: eliminating Juliate Date. 2019-04-15 09:18:13 -04:00
Don Cross
0be2b72799 A couple of baby steps toward using J2000 days throughout the code. 2019-04-14 21:34:53 -04:00
Don Cross
9ad923ccfd Starting to rework to do all calculations in J2000 days instead of JD.
This should yield a few more decimal places of accuracy with
all the time calculations.
2019-04-14 20:56:49 -04:00
Don Cross
4052f0a31f jplcheck script was not exiting when a single test failed. 2019-04-14 20:55:34 -04:00
Don Cross
c5ed0a3c3d Reduced delta_t data by 19339 bytes. 2019-04-14 17:24:48 -04:00
Don Cross
36643fc47a Fixed #2 - use finer-grained delta-t values without discontinuities.
Using historic, recent, and predicted values of TT-UT instead of
UTC leap seconds.  With linear interpolation, there are no longer
discrete jumps in the calculated TT values. Hopefully, this will
make event solvers (rise, set, etc) more well-behaved.
2019-04-14 16:42:50 -04:00
Don Cross
8fdad8b163 Fixed #3 - Correct geocentric coordinates for light travel time.
Astronomy.GeoVector now corrects for light travel time from
the observed object. This reduced worst case angular error
from 1.16 arcmin to 0.89 arcmin (0.27 arcmin improvement).
2019-04-14 12:47:16 -04:00
Don Cross
4e77f3687c jplcheck prints worst arcminute error it found. 2019-04-14 11:27:08 -04:00
Don Cross
f8050b9913 Print JPL Horizons summary with nice columns... no more zig-zag output. 2019-04-14 11:10:52 -04:00
Don Cross
f687243ebb JPL Horizons unit test now works on Windows. 2019-04-13 22:30:45 -04:00
Don Cross
ac0d377631 Minor cleanup in jpl_horizons_check.js. 2019-04-13 22:04:46 -04:00
Don Cross
51cff29dd9 Figured out the JPL Horizons refraction formula.
I found some online resources that helped me track down the
formula for the refraction model used in the JPL Horizons
online tool. Now the JavaScript library allows 4 different
refraction options in Astronomy.Horizon():

false    :  no refraction
'novas'  :  use the NOVAS C 3.1 algorithm.
'jplhor' :  JPL Horizons algorithm, clamped beyond 1 degree below horizon.
'sae'    :  same as 'jplhor', only without clamping.

Now passes the jplcheck unit test without filtering out objects below the horizon!

Always compile the C code when executing the script './run'.
2019-04-13 22:00:20 -04:00
Don Cross
55d7467678 Documented that I have figured out the JPL Horizons refraction formula.
I created a Jupyter notebook that shows how I figured out the
refraction formula used by the JPL Horizons online tool.
2019-04-13 21:13:32 -04:00
Don Cross
b355627a3e Fixed #1 - calculating horizontal coordinates with optional refraction. 2019-04-12 22:17:14 -04:00
Don Cross
e2ff9b2197 JPL checker works for airless (no refraction) apparent coords.
Verified that the JPL checker works for apparent coordinates,
equatorial-of-date and horizontal, when I tell the JPL Horizons
tool to use its "airless" (no refraction) model.

Still need to implement refraction for at least horizontal coordinates
(where it really matters for rise/set times).
2019-04-12 17:16:41 -04:00
Don Cross
eaf6f3f7d6 JPL Horizons checker now working for astrometric equatorial coords.
Still need to resolve errors in apparent equatorial and horizontal coords.
2019-04-12 16:39:23 -04:00
Don Cross
27d353ff7a Created script to test all JPL Horizons files. 2019-04-12 15:58:41 -04:00
Don Cross
3d0c984068 JPL Horizons test is starting to parse input files. 2019-04-12 15:34:28 -04:00
Don Cross
788e7334ea Test data generated by using the JPL Horizons online tool.
Used the JPL Horizons web interface at
https://ssd.jpl.nasa.gov/horizons.cgi
to generate test data for astrometric RA/DEC,
apparent RA/DEC, and apparent az/alt.
Will use this as a secondary unit test to confirm
that I'm not fooling myself by incorrectly using the
NOVAS C 3.1 code for unit tests.
2019-04-12 14:14:49 -04:00
Don Cross
167abe1c64 Removed obsolete comment. 2019-04-12 13:01:43 -04:00
Don Cross
80267c39ec Getting closer to correct horizontal coordinates.
Not quite right yet for some reason, but this is closer.
JavaScript function Astronomy.SkyPos() now returns both
J2000 (RA,DEC) and (RA,DEC) using true equator and equinox of date.
Use the latter to calculate horizontal coordinates.
This matches my call to NOVAS place() function, but there
are still errors larger than 2 degrees compared with JPL Horizons
and Heavens Above.

For example:

2019-04-11 19:47:00
variable           test.html  JPL Horizons   error(arcmin)
Sun azimuth	        245.455     246.585         -67.80
Sun altitude         50.858      51.261         -24.17
Jupiter azimuth     277.309     275.287         121.33
Jupiter altitude    -63.751     -63.860           6.52
2019-04-11 17:21:03 -04:00
Don Cross
005edb555b Unconfirmed calculation of horizontal coordinates.
I have horizontal coordinates calculated, but they might
be wrong (both in how I call NOVAS functions and the JS code itself)
because I think I'm mixing up equinox of date coordinates with
J2000 coordinates for (RA,DEC).

Fixed bug that caused excessive estimate of angular error:
right ascension and azimuth are like longitudes -- they matter
less as an object approaches the poles.  Scale such longitudinal
errors by the cosine of the latitudinal counterpart.
2019-04-11 14:15:31 -04:00
Don Cross
8c392a9cc8 Added HTML unit test of JavaScript code. 2019-04-11 12:30:06 -04:00
Don Cross
2da753ae61 Added support for building on Windows using Visual Studio 2015. 2019-04-09 15:07:02 -04:00
Don Cross
8dbe1d1f28 Renamed VSOP data types to lower case and to end with '_t'. 2019-04-09 13:42:32 -04:00
Don Cross
390e0692d7 Added JavaScript unit test. 2019-04-09 13:34:56 -04:00
Don Cross
e90a3006b6 Updated license comments in source code. 2019-04-09 12:43:08 -04:00
Don Cross
2decdbc685 Generating JavaScript code. 2019-04-09 12:23:35 -04:00
Don Cross
1e0527e2cf Generating VSOP output files. 2019-04-08 22:25:38 -04:00
Don Cross
f4b67f1f0e Automatically download and validate the ephemeris file if missing. 2019-04-08 15:45:23 -04:00
Don Cross
f163d86170 Starting to work on astronomy source generator C program. 2019-04-08 08:57:43 -04:00
Don Cross
2eab0b7805 Added source for NOVAS C 3.1. 2019-04-08 08:44:06 -04:00
Don Cross
b98d6c03a2 Added VSOP87 data and my C code for using it. 2019-04-08 08:39:34 -04:00
Don Cross
00187637df Created directory into which JavaScript code will be generated. 2019-04-07 17:08:13 -04:00
Don Cross
fa743529cc Starting the generate directory. 2019-04-07 17:02:50 -04:00
Don Cross
e45ad7595d Initial commit 2019-04-07 16:55:21 -04:00