Commit Graph

24 Commits

Author SHA1 Message Date
Don Cross
410cf99a5e Display the "All Tests Passed" ASCII art from a text file. 2019-07-09 20:38:54 -04:00
Don Cross
7c8722acad Print ASCII art "All Tests Passed" on success.
It's nice to have a clear signal that I can read across the room
that everything was successful.  If I don't see this, I know
something went wrong.
2019-07-02 14:12:19 -04:00
Don Cross
b5ebc4a645 Added python unit test. 2019-06-23 19:52:16 -04:00
Don Cross
d476465b6d Actually test moonphase.js and moonphase.c. Test after generating code. 2019-06-13 21:38:27 -04:00
Don Cross
58fa90a0bf Reworked tests of C examples.
Moved test files into separate test directory (cleaner).
Make C and nodejs 'position' tests generate identical output.
2019-06-13 21:04:45 -04:00
Don Cross
4061aa6b58 Added nodejs example 'positions.js'.
Unit test the calculations and fail if output deviates.
2019-06-13 20:37:43 -04:00
Don Cross
fb09678d4f Verify that demo C programs build. Validate positions.c output.
I could also validate moonphase.c output if only I modified it
to accept an optional date and time parameter.
2019-06-11 21:05:44 -04:00
Don Cross
bf3c7a45c4 Fixed bug in checking for planet model files. 2019-06-04 17:50:36 -04:00
Don Cross
c343998098 Automatically detect whether planet models need to be generated.
Skip the time-consuming generation of planet models unless one
or more of the required files is missing.
This will cause the planet models to always be exercised by
Travis CI, but most of the time in my own development, they will
be skipped.  This is a good compromise now that the code is very stable.
2019-06-04 17:30:18 -04:00
Don Cross
f057996cda Implemented "fast" option for skipping regeneration of planet models. 2019-06-04 17:19:56 -04:00
Don Cross
2a0bd80469 Got timeout in Travis CI retrying download. Decrease timeout to 9 seconds. 2019-05-27 20:03:32 -04:00
Don Cross
6615e3b9f8 Starting to unit test astronomy.c.
Beginnings of a unit test for the C version of Astronomy Engine.
Currently verifies that Astro_MakeTime() is working correctly.
2019-05-16 16:18:03 -04:00
Don Cross
296367bd63 Attempt at fixing occasional ephemeris download error in Travis CI.
I will need to wait until I see the error happen, and confirm
that the retry logic fixes it, before I mark the bug fixed.
2019-05-09 20:40:25 -04:00
Don Cross
fa609fa6a0 Separated generating planet models and generating source code.
This allows me to very quickly and easily test changes that don't
affect the planet models or how code is generated.
2019-04-18 13:45:40 -04:00
Don Cross
e2d85e7bfb Added separate unit_test script. 2019-04-18 13:14:33 -04:00
Don Cross
0e757dfc0d Skip 6 days (instead of 1) to find next moon quarter.
This should help find the next quarter slightly more efficiently
because it will provide a more accurate estimate of the next quarter.
2019-04-18 13:05:29 -04:00
Don Cross
d00e40341b Added test of ecliptic longitude formula.
Using moon phase test data, exercised the calculation of
ecliptic longitude of the Sun and Moon at indicated times.
Compared the actual difference in longitude with 90*phase degrees,
where phase is 0 for new moon, 1 for first quarter, 2 for full,
3 for third quarter. The results always agree within 1 arcminute
(just barely).

Added this to the unit test.

Will come back and add unit tests for the phase searcher once
I implement it.
2019-04-17 05:03:47 -04:00
Don Cross
db6a7d3258 Curl needs -L option to follow redirects to download from GitHub. 2019-04-16 13:57:08 -04:00
Don Cross
a3f2495b59 Hosting DE405 ephemeris file on my own GitHub account.
I kept having trouble with Travis CI timing out trying
to download the DE405 ephmeris file from its official ftp site,
so I'm mirroring it on my own GitHub account.
Hopefully this makes the download smoother.
2019-04-16 12:40:14 -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
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
390e0692d7 Added JavaScript unit test. 2019-04-09 13:34:56 -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