pydown.py now searches description text for internal links
and expands them properly for Markdown file README.md.
For example: "#Body" ==> "[`Body`](#Body)".
Fixed a couple of incorrect "Astronomy_..." names in Python docs.
Never use pound-signs inside documentation for Python return types.
Automatically create internal link just like for function parameter types.
Added special case logic in pydown.py for "Time or `None`".
Fixed minor documentation mistakes in JS version.
Separate the calculation of refraction angle from the Horizon function.
Added missing documentation for the parameters of the Horizon function.
Added definition of class Spherical. Not yet used, but soon will be.
Instead of having the same calculations duplicated in both
nutation() and nutation_rot(), I reworked nutation() in terms of
nutation_rot(). Use nutation_rot() to calculate the rotation matrix,
then multiply that matrix by the input vector to produce the output vector.
The gcc-6 compiler in travis-ci has changed its behavior.
It is warning that 'fmid' local variable in Search() may
be used uninitialized. I believe it is safe but I'm adding
an initialization to fmid to make the warning go away.
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.
These are the final 4 rotation functions to complete every
possible coordinate transform.
Finished unit tests of verifying that all triangular
cycles of transitive rotation are consistent.
Astronomy_CombineRotation was multiplying matrices correctly,
but it was doing it in the backwards order from what I need.
I forgot that to rotate a vector V by a matrix M, you multiply M*V,
with the matrix on the left.
Likewise, to rotate a matrix A by another matrix B, you need B*A, not A*B.
This explains why I was seeing larger than expected errors combining
nutation and precession: nutation is a very tiny shift in orientation,
so the errors were small but noticeable. Tightened the error thresholds
in the unit test code.
Astronomy_Rotation_HOR_EQJ converts from horizontal of-date coordinates
to equatorial J2000 coordinates. Here I could no longer ignore the
errors caused by having backwards matrix multiplication, leading
to discovering the problem in Astronomy_CombineRotation.
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.