This library provides a minimally complete set of functions to convert
between various celestial coordinates, often favouring simplicity over
precision.
Starting with the B2000 galactic coordinates of an astronomical
object, you can obtain its coordinates in the equatorial and
horizontal systems, and its pixel coordinates through a simple
telescope, using the sequence of functions gx2eq, eq2hz, and hz2pxl.
You can further use Saemundsson's formula, provided by the function
saemundsson, to correct for atmospheric refraction (before the optical
projection step).
A few other lower level functions and macros are also available. For
details see the source code.
The code is in the Plan 9 dialect of C, but it should be usable on
most systems with a standard C compiler and support for floating point
arithmetic with almost no change other than replacing the standard
header files (and potentially the definition of NaN).
|