Commit Graph

2227 Commits

Author SHA1 Message Date
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
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
Don Cross
3c5de6b4f9 C: Fixed documentation mistake. 2020-05-26 21:18:50 -04:00
Don Cross
9645ff6cc3 C# LocalSolarEclipse: finished code, but no unit test yet. 2020-05-26 21:09:22 -04:00
Don Cross
e9503bc202 Made 'generate check' output less verbose unless -v is specified.
This completes my initial pass for making unit test less verbose.
2020-05-26 12:23:40 -04:00
Don Cross
75e26ccac2 Changed verbosity option from -d to more standard -v. 2020-05-26 11:58:02 -04:00
Don Cross
b48ac658da Made JavaScript unit tests less verbose by default. 2020-05-26 11:43:03 -04:00
Don Cross
0787b88ddd Python unit tests are less verbose unless -d option is specified. 2020-05-26 11:14:12 -04:00
Don Cross
382b9ba58f Added -d option to ctest for verbose output. 2020-05-26 10:49:44 -04:00
Don Cross
86c5f4c66f C# unit test is much less verbose.
By default, print a lot less C# unit test output.
Added '-d' debug mode option to ./unit_test_csharp that
prints the more verbose output.
2020-05-26 09:44:45 -04:00