The camera demos all have a bug where I was calculating
the angle of the sunlit side of the Moon incorrectly.
The arguments to atan2 were backwards.
Added test data for Florida, New Zealand, and Canada
that are backed up by photographic evidence and
my first-hand observation.
Reduce the number of redundant Earth nutation calculations
by passing astro_time_t values as pointers in more functions.
Nutation values can then be cached in the time parameter
and passed to other functions that can then avoid calculating
the same nutation again.
Nutation is an expensive calculation, so reducing this overhead
can dramatically speed up certain use cases.
This was only needed in C, because this is the only language
in which times are passed by value. In Python, C#, and JavaScript,
times are objects that are already passed by reference, and
they already benefit from this nutation recyling approach.
The following functions have had their parameters changed.
This is a breaking change, but in every case, the caller
usually just needs to change `time` to `&time`.
Astronomy_Rotation_EQD_EQJ
Astronomy_Rotation_EQD_ECL
Astronomy_Rotation_EQD_HOR
Astronomy_Rotation_EQJ_EQD
Astronomy_Rotation_EQJ_HOR
Astronomy_Rotation_ECL_EQD
Astronomy_Rotation_ECL_HOR
Astronomy_Rotation_HOR_EQD
Astronomy_Rotation_HOR_EQJ
Astronomy_Rotation_HOR_ECL
Astronomy_RotationAxis
Astronomy_VectorObserver
The demo tests on Mac OS failed because of very tiny
floating point discrepancies that don't matter.
Changed the output of the "Moon check" so that slight
differences in vector residue no longer fail the unit tests.
Moved the following constant definitions from astronomy.c
to astronomy.h, so external code can use them:
DEG2RAD
RAD2DEG
KM_PER_AU
My custom doxygen-to-markdown translator (hydrogen.js)
now emits markdown for the above constants.
Eliminated the obsolete constants MIN_YEAR and MAX_YEAR.
Astronomy Engine is no longer limited to calculating planets
within that range of years.
Fixed a couple of minor documentation issues in the C code.
Started work on a new function Astronomy_ObserverVector,
but it is just a stub for now.
Added C function Astronomy_Pivot to transform a rotation matrix
by rotating it around one of its coordinate axes by a given angle.
Added C function Astronomy_IdentityMatrix that just returns
an identity matrix that can be used as the starting point in
a series of transforms.
C function Astronomy_Equator now also returns the topocentric
equatorial location in the form of a cartesian vector.
This is in a new member of the astro_equatorial_t struct
called 'vec'.
The unit test in ctest.c "Rotation_Pivot()" could be improved
with more and better tests.
Created a demo program camera.c that illustrates using
Astronomy_Pivot() to help calculate the tilt of the sunlit
side of the Moon, as seen by a camera pointing right at it.
The resulting tilt angle is not yet verified.
I need to have some confirmation that it is correct before
porting to the other languages.