Astronomy_HorizonFromVector is a specialized variant of
Astronomy_SphereFromVector that flips the orientation of the
azimuth angle to the more traditional clockwise-from-north
direction used in navigation and cartography.
It also allows the same optional refraction correction as
Astronomy_Horizon.
Astronomy_Rotation_EQD_HOR converts a equatorial-of-date vector
to a horizontal vector. The horizontal vector has the following
components:
x = North
y = West
z = Zenith
Removed trailing whitespace in generate.c.
This function returns the constant rotation matrix that converts
equatorial J2000 coordinates to ecliptic J2000 coordinates.
Verified that it is exactly consistent with existing Ecliptic().
Astronomy_RotateVector translates a vector in one orientation
to another orientation, as specified by a rotation matrix.
I will use this to implement all the coordinate transforms
among EQJ, EQD, ECL, HOR.
Added new data type astro_spherical_t that represents generic spherical coordinates.
Implemented Astronomy_VectorFromSphere to convert spherical coordinates
to Cartesian coordinates. Included unit test to verify it is working as expected.
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 moon calculations and associated code.
Reworked AstroVector as a struct instead of a class, to reduce
memory allocation overhead.
This is just to get build errors to go away.
Will have to come back and flesh out all of the documentation
once I start working on the C# documentation generator.
I'm checking in a broken build on purpose in this topic branch
so that I can move the work over to my Windows machine and use
Visual Studio to help with formatting XML comments.
Decided to move call to makedoc script from run script.
It was confusing that it was hidden inside unit_test_js,
especially because it invokes the code generator for
all supported languages.
In C code, replaced HTML italics with Markdown emphasis markers.
Added warnings for Python symbols with missing documentation.
Documented Python class Apsis.
Changed visibility from a string 'morning'/'evening' to enum type.
Was not testing visibility was correct; now test.py does that.
Corrected a couple of minor things in C documentation.
Will generate different Markdown for my regular classes,
enumerated types, and error types.
Found out that 'from enum import IntEnum' pulls IntEnum
into the astronomy module and causes us to try to generate
documentation for it. Just keep it in the enum module.
Removed spurious dump of JavaScript README.md when verify_clean
fails.