Commit Graph

33 Commits

Author SHA1 Message Date
Don Cross
6156be38ca Verify that astronomy.c can be built as C++.
I discovered that when I tried to build astronomy.c as C++ code,
I got several errors and warnings. So I fixed those issues and
added a C++ build-check to the unit tests.
2021-10-31 18:48:00 -04:00
Don Cross
5707babbf8 Removed remnants of old debugging code.
I had a bug back in May 2020 that turned out to be in
generate.c unit tests, not in published Astronomy Engine code.
I have long since fixed these bugs, but I still had fossil
test code sitting around that doesn't work any more and
isn't needed. Deleted it.
2021-03-20 20:21:36 -04:00
Don Cross
4636c6d0e0 Refactored C unit tests for easier maintenance. 2020-06-03 13:09:39 -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
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
382b9ba58f Added -d option to ctest for verbose output. 2020-05-26 10:49:44 -04:00
Don Cross
8d3c43d794 Making progress on the C version of the solar eclipse predictor. 2020-05-19 22:33:33 -04:00
Don Cross
b7c59f6628 Include extrapolated DeltaT values for the years 2030..2200.
I had to increase certain error tolerances in the unit tests.
Reworked the unit tests to make more sense by waiting until
each language step is done to check against each other.
That way I can run a single language step independently.
2020-05-14 20:24:34 -04:00
Don Cross
612efd7011 Fixed bug in CheckSkyPos().
This bug has been there a long time, but I didn't notice it
until I started experimenting with larger Delta-T values.
Fortunately, the bug was in the unit test, not Astronomy Engine
release code. Calling NOVAS place(), I need to pass in Delta-T
expressed in seconds, not days.
2020-05-14 17:10:57 -04:00
Don Cross
34bb52f5a4 Added lunar eclipse predictor to C code.
Also added FAIL... macros to ctest.c to make it simpler
to print an error and abort.
2020-05-13 15:17:39 -04:00
Don Cross
1e1af922fe Constellations: Added C unit test. Fixed bugs in C code.
This unit test only exercises 8 different points.
I want to add a more thorough unit test soon, before
moving on to implementing the constellation finder in
the other supported programming languages.
2020-05-02 13:33:25 -04:00
Don Cross
f67ddf1c8d Planet apsis: all planets but Pluto now have prediction error below 0.1 degrees.
Adjust VSOP models for planets to bring their prediction errors beneath
0.1 degrees of a total orbit.
ctest no longer runs tests when no command line arguments are given.
That was annoying because I kept running it by accident.
2020-01-06 10:59:38 -05:00
Don Cross
513de6b5c1 C: Added planet apsis test that checks intervals between apsides.
This reveals surprising variation in the intervals.
I think for Earth, the Moon is causing enough wobble
that I might want to find the apsides for the Earth/Moon Barycenter
instead of the Earth by itself. It will be interesting to see
if this increases agreement with the test data.
2019-12-31 19:58:52 -05:00
Don Cross
4d573b50bd C: First draft of SearchPlanetApsis, NextPlanetApsis.
I have tested only for Earth.
Will need to add tests for all the other planets.
2019-12-31 16:02:23 -05:00
Don Cross
3d38890aaf Merge branch 'master' into csharp.
Includes coordinate transform logic support in
C, JavaScript, and Python.
Will start porting to C# soon.
2019-12-19 14:28:09 -05:00
Don Cross
824792004d Starting to work on inverse function for refraction calculation.
I need a way to undo a refraction correction:
given a post-refraction altitude, find the unrefracted
altitude that leads to it. Starting to write the code.
Not finished yet.
2019-12-10 17:58:38 -05:00
Don Cross
ae0946bd47 Implemented C versions of Astronomy_CombineRotation, Astronomy_InverseRotation.
Beginning to implement functions for converting among the
following four orientation systems:

- EQJ: equatorial J2000
- EQD: equatorial of date
- ECL: ecliptic J2000
- HOR: horizontal

Starting with some basic functions for manipulating rotation matrices.
Astronomy_CombineRotation multiplies two rotation matrices to obtain
a third that combines their effects in order. I will use these for
combining a precession matrix and a nutation matrix, to obtain a
rotation matrix that can convert between EQJ and EQD.

Astronomy_InverseRotation will allow converting in either direction
between two orientations.
2019-12-08 11:26:59 -05:00
Don Cross
b085c9b489 Validated that C# and C test output are identical within tolerance. 2019-10-29 12:01:57 -04:00
Don Cross
ed2cf7d985 Split out separate script ctbuild for building ctest from source. 2019-07-02 21:24:50 -04:00
Don Cross
dfb888efb9 Measure time required by JS and C astro_check. 2019-06-27 15:27:01 -04:00
Don Cross
49e505e654 Verified GeoMoon C and Python versions are consistent for a single test case.
This is a good indicator that the Python translation of CalcMoon is correct.
2019-06-24 15:47:17 -04:00
Don Cross
821e89e10b Validated C functions SearchLunarApsis, NextLunarApsis. 2019-05-24 19:29:31 -04:00
Don Cross
9ed27be0f8 Work in progress: Adding C magnitude tests. 2019-05-23 12:05:18 -04:00
Don Cross
4982da4307 Added unit tests for C functions SearchRiseSet, SearchHourAngle. 2019-05-22 13:44:46 -04:00
Don Cross
442b07b7c2 Work in progress: adding C riseset test. 2019-05-21 21:37:17 -04:00
Don Cross
dbd8c60e15 Added more unit tests for C function SearchRelativeLongitude. 2019-05-21 17:16:44 -04:00
Don Cross
daf2dddcce Validated C function SearchRelativeLongitude. 2019-05-21 15:20:18 -04:00
Don Cross
e798e1bb80 Work in progress: C moon phase unit test. 2019-05-21 10:17:59 -04:00
Don Cross
78e46bdaad Starting to implement C seasons test. Work in progress. 2019-05-20 15:37:48 -04:00
Don Cross
d2cab3eb2b Compare C check output with JS check output. Fail if they differ significantly. 2019-05-20 12:37:29 -04:00
Don Cross
d0cc01186e Starting to validate C VSOP calculations.
Still need to implement GeoMoon and Chebyshev Pluto calculations.
Generating output file temp/c_check.txt that is compatible with
the existing verifier code I wrote for the JavaScript library.
2019-05-17 18:24:56 -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