Commit Graph

1670 Commits

Author SHA1 Message Date
Don Cross
75c1a75098 First draft of loading a TOP2013 planet model. Needs more testing. 2020-06-30 22:18:58 -04:00
Don Cross
ff5ef2b3bb Starting to implement ValidateTop2013().
Adding infrastructure for loading TOP2013 models of planets
and calculating them. Will start with a unit test to verify
I'm calculating the formulas correctly.
2020-06-30 17:58:42 -04:00
Don Cross
60b69065b8 Factored out download logic into a bash function. Download TOP2013 data.
I'm starting to work on a replacement for Pluto calculations that
are not bounded in time. I'm trying the TOP2013 model that calculates
elliptic parameters of the outer planets Jupiter..Pluto.
I needed to download the 24MB file TOP2013.dat.
I already had redundant download logic for two files, and this was a third.
So I eliminated the redundancy and generalized the download logic
in the new bash function Download.
2020-06-30 14:03:27 -04:00
Don Cross
9d04a0018c Python: improved Time repr. Added Vector repr, str support. 2020-06-14 21:31:07 -04:00
Don Cross
b6c0b9cb00 Python: added str and repr support for class Observer. 2020-06-14 21:14:53 -04:00
Don Cross
2f13b463f1 Fixed two documentation formatting mistakes. 2020-06-14 16:49:02 -04:00
Don Cross
f9ef46c5cc Implemented Python version of transit search functions. 2020-06-14 14:55:52 -04:00
Don Cross
bf5a390d88 Fixed bug in Windows run.bat running new C# unit tests. 2020-06-14 13:45:56 -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
7fcf730839 Implemented C# Transit functions and unit test. 2020-06-13 21:10:48 -04:00
Don Cross
b32c16b6ad C Transit: made significantly faster. Fixed documentation mistake.
Use much tighter pruning to figure out when a transit might be
possible, based on a smaller angle between the planet and Sun
at the moment of inferior conjunction.
Including aberration makes little difference in the transit calculations,
so I turned that off to be a little more efficient.
2020-06-13 21:07:07 -04:00
Don Cross
944dba94b7 Reworked C# unit tests to be table-driven.
All the other languages have a lookup table that allows
any specific test to be run by name, or all tests to be run
using "all" as the name.  Now the C# unit test does the same.
2020-06-13 17:22:03 -04:00
Don Cross
456b367c01 C Transit: also report minimum angular separation between planet and Sun. 2020-06-13 16:48:33 -04:00
Don Cross
413cb2410c C Transit: tightened up the error thresholds in the unit test. 2020-06-13 15:08:13 -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
882eaaa2e7 C Transit: unit tests are passing.
I had to modify norm.py to handle some oddities in the input data.
The error threshold (26 minutes) is still surprisingly large.
I want to investigate more before porting to the other 3 languages.
2020-06-13 12:07:07 -04:00
Don Cross
489e98ad5d C Transit in progress. Not quite working yet, but getting close.
Does not pass unit test yet.
I had to rework norm.py because I misunderstood the data format.
The date given is not for the beginning of the transit, but
for the peak. This means the normalized data files need to
keep the start time, peak date/time, and finish time.
The unit test needs to adjust start time and finish time
to make sense with respect to the peak time, by adding/subtracting
a day as needed.
2020-06-12 22:26:20 -04:00
Don Cross
3f0accca10 C Transit: starting to add unit test. 2020-06-12 19:13:00 -04:00
Don Cross
9cdaaa8761 Starting to work on planetary transit calculations.
Wrote stub C functions for finding transits.
Updated html files containing Espenak test data for Mercury, Venus.
Updated norm.py to convert the html files to easy-to-use text files.
2020-06-11 22:17:01 -04:00
Don Cross
c7134e5dae Added numeric sanity checks to C unit tests. 2020-06-06 21:47:05 -04:00
Don Cross
40db8ec49b Added numeric checking in C# unit tests. 2020-06-06 21:15:11 -04:00
Don Cross
ef4975fc3f Added more sanity checking for Python numeric values. 2020-06-06 20:43:34 -04:00
Don Cross
9f295f94d2 Added more sanity checking of numeric values in JavaScript unit tests.
I was irked by how a seemingly passing unit test was not actually
doing anything because something of the form

    if (diff > threshold) ...

was never firing when 'diff' was NaN. This made me paranoid
that other things could be broken. Added strategic checks
that values that are supposed to be numbers are indeed numbers.
2020-06-06 20:06:01 -04:00
Don Cross
84703016e1 Narrow the search window for local solar eclipses. 2020-06-06 14:32:04 -04:00
Don Cross
c4e273cc47 Minor cleanup in Python unit tests. 2020-06-06 14:09:52 -04:00
Don Cross
443c744aaf Implemented Python LocalSolarEclipse. 2020-06-06 13:42:40 -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
9187e3e966 Python: Implemented GlobalSolarEclipse. 2020-06-04 19:01:39 -04:00
Don Cross
b6fbdf9119 Simplified functions in Python unit test. 2020-06-03 21:17:45 -04:00
Don Cross
a6c9526389 Eliminate extraneous blank lines in run.bat output. 2020-06-03 14:04:56 -04:00
Don Cross
4636c6d0e0 Refactored C unit tests for easier maintenance. 2020-06-03 13:09:39 -04:00
Don Cross
cd058ccd89 Refactored Python unit tests to be table driven.
Now I can run any Python unit test by name, or specify 'all'
to run them all. This way I don't have to update scripts
every time I add a new Python unit test.
2020-06-03 12:27:20 -04:00
Don Cross
6b0bc73b0b Reworking Python unit tests to be table-driven.
I like what I did to the JavaScript tests, where I no longer
need to update scripts when I add a new unit test.
So I have decided to do the same for the other languages,
starting with Python.
2020-06-03 11:57:30 -04:00
Don Cross
6b56bf0cfd Finished refactoring JavaScript unit tests.
From now on, it will be simpler to add new JavaScript unit tests.
In most cases, it should no longer be necessary to update the
bash script unit_test_js or the batch file run.bat when new
JavaScript tests are added.
2020-06-03 10:20:52 -04:00
Don Cross
e642000cf4 Merged constellation into test.js 2020-06-03 09:54:49 -04:00
Don Cross
ecd5376927 Merged magnitude into test.js 2020-06-03 09:51:31 -04:00
Don Cross
ae45181bb8 Merged rotation and refraction into test.js. 2020-06-03 09:47:26 -04:00
Don Cross
302ade93d0 Merged RiseSet into test.js. More work cleaning up JavaScript unit tests. 2020-06-03 09:36:20 -04:00
Don Cross
87b18dc022 Merged seasons into test.js. 2020-06-02 22:24:47 -04:00
Don Cross
d7c8b8c120 Merged elongation into test.js. 2020-06-02 22:11:07 -04:00
Don Cross
f3f6515033 Merged planet apsis into test.js. 2020-06-02 21:48:27 -04:00
Don Cross
8784c39d7e Merged lunar eclipse into test.js. 2020-06-02 21:42:35 -04:00
Don Cross
f4536ba039 Merged lunar apsis test into test.js. 2020-06-02 21:28:50 -04:00
Don Cross
3de8ee10db Merged moon phase test into test.js. 2020-06-02 21:11:53 -04:00
Don Cross
ded450d226 Starting to rework JavaScript tests to all be inside a single source file test.js. 2020-06-02 19:16:44 -04:00
Don Cross
1e6afbe886 Fixed some oopsies in the C unit tests.
unit_test_c was not testing local solar eclipses.
C ParseDate() was not scanning seconds. This caused
discrepancies between C and C# results.
It was also failing to verify the Z on the end.
2020-05-27 14:49:00 -04:00
Don Cross
366a00467f C# LocalSolarEclipse: finished second unit test. Fixed mistakes in input data. 2020-05-27 08:20:13 -04:00
Don Cross
4e9b9d0a91 C# LocalSolarEclipse: ported first unit test. 2020-05-26 21:44:46 -04:00