Commit Graph

2245 Commits

Author SHA1 Message Date
Don Cross
4c7981d325 Finally regenerated binary identical TOP2013 output.
There was one place where a couple of powers of t had empty series.
This was an important thing to fix because it would have messed
up calculations.
2020-07-01 13:07:39 -04:00
Don Cross
33d5df6280 Fixed rounding problems regenerating TOP2013.dat.
When I load TOP2013.dat, I have to simulate regenerating the output
in order to find discrepancies and fix them.
This is a total hack, but it satisfies multiple goals:

1. Generate identical output as the loaded input.
2. Confirm that what we loaded is what we meant to load.
3. Allow saving modified/calculated models correctly.
2020-07-01 12:55:29 -04:00
Don Cross
8ea3fc8c5e Track line numbers in top2013 output for debugging purposes. 2020-07-01 12:08:03 -04:00
Don Cross
87da232113 Very close to generating binary identical TOP2013 file.
I want to make sure I can load and save a TOP2013 data set perfectly
before proceeding with calculation, truncation, etc.
I'm really close, but there are occasional rounding problems
writing floating point numbers back to the file in the weird
format they use.
2020-07-01 11:52:29 -04:00
Don Cross
b5c2926b54 Needed to initialize nseries_calc in each formula. 2020-06-30 22:48:37 -04:00
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
c37ade5ee3 Bumped npm version to 1.1.0 - minor documentation fixes. npm_1.1.0 2020-06-14 16:55:32 -04:00
Don Cross
2f13b463f1 Fixed two documentation formatting mistakes. 2020-06-14 16:49:02 -04:00
Don Cross
e2cb68e021 Bumped npm version to 1.0.9. npm_1.0.9 2020-06-14 15:23:28 -04:00
Don Cross
100417dbe3 Fixed #52 - Finished documenting transit functions.
This completes work on eclipses and transits.
2020-06-14 15:05:01 -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
fb74b2f331 Published npm package version 1.0.8 npm_1.0.8 2020-06-06 21:51:29 -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
94bfe94c50 Mention solar eclipses in the main README. 2020-06-06 14:37:23 -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