Slightly different cppcheck dev 2.11 behaviors have added
another warning that I don't care about. I don't want to
have to convert callback pointers to const, then cast them
to const.
However, it did find a couple of useful cases I fixed in
astronomy.c where GravSim parameters could be made const.
I'm taking gcc 12.2 for a test drive today.
It reports a few warnings that slipped through earlier versions.
None of the warnings concern me for actual code safety,
but I went ahead and resolved them to keep the build clean.
Also provide a hook for a CPP environment variable to override
the C++ compiler to use, instead of forcing g++.
Added `Observer.toStateVector` and `Observer.toVector` for converting
an observer's geographic location to position and velocity vectors
relative to the Earth's center.
Reworked the C unit test to output a text file that can be used
as reference, to make sure the Kotlin output matches.
When built using g++ as an alias for clang,
as reportedly happens on Mac OS, we need to explicitly
tell g++ (using option '-x c++') to compile astronomy.c
as C++. Otherwise, it will fail with a deprecation warning.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.