org.jscience.astronomy.solarsystem
Class AstronomicalCoordinates

java.lang.Object
  extended by org.jscience.astronomy.solarsystem.AstronomicalCoordinates
All Implemented Interfaces:
Positioned

public class AstronomicalCoordinates
extends java.lang.Object
implements Positioned

The AstronomyCoordinates class is for storage of an array of positions in space, such as those of satellites, planets or stars. The position stored is rectangular, and the unit is Gm. Typical heights above sea level are then 10-9, while c/H, the speed of light divided by the Hubble constant, is 1026. The radius of a proton would be on the order of 10-24. So this is a sensible unit to describe anything in the Universe. All these numbers are within the range of a double precision number, most probably even their fourth powers are.

The epoch (state of proper motion for stars, time for which the ephemeris of a comet etc is caltulated, etc.) is unspecified. The positions refer to the mean equinox of J2000.0. Hence the state of precession is known and the state of nutation ignored. Positions beyond the Solar System are heliocentric, i.e. parallax and annual aberration are not applied. Positions within the Solar System are mean geocentric astrometric, i.e. the light travel time from the planet to the Earth has been corrected for, but annual aberration is not applied.

The positions can be stored and retrieved in a variety of coordinate systems other than J2000, which is used internally. But in all cases we deal with mean rather than true and astrometric positions rather than true, apparent or observed positions. The coordinate systems we deal with form a logical sequence of four with three branches. Arguably you could re-arange this into a sequence of six with one branch:

 B1950 ------ J2000 ------ mean ------ topo.
 |                        |           |
 |                        |           |
 gal.                     ecl.        hori.
 

J2000
Heliocentric mean or geocentric astrometric position for equinox J2000.0. This is the internal representation. The spherical coordinates in this system are right ascension (RA) and declination (Dec).
B1950
Heliocentric mean or geocentric astrometric position for equinox B1950 (J1949.99979). This is the standard equinox in common use for much of the 20th century. The coordinates differ from J2000 due to precession, but also due to a change in the reference system (FK4 instead of FK5). The spherical coordinates in this system are right ascension (RA) and declination (Dec).
Mean equinox of date
Heliocentric mean or geocentric astrometric position for equinox of date. This differs from J2000 due to precession. This is often the natural system to use, in particular in the Solar System and in conversion to topocentric or horizontal coordinates. The spherical coordinates in this system are right ascension (RA) and declination (Dec).
Topocentric
Topocentric astrometric position for equinox of date. Since we ignore annual parallaxes, positions outside the Solar System are here not strictly topocentric, just like in J2000 above they are not strictly geocentric. Topocentric coordinates differ from "mean equinox of date" coordinates due to diurnal parallax, i.e. the offset of the observatory from the centre of the Earth. Another difference is that local sidereal time is taken into account. The spherical coordinates in this system are hour angle (HA) and declination (Dec).
Galactic lII,bII
Galactic coordinates as defined after radio observations in the middle of the 20th century indicated the location of the galactic centre. The transform from and to B1950 defines this system. The spherical coordinates in this system are longitude along the galactic plane counting from the galactic centre (l) and latitude above the galactic plane (b).
Ecliptic
Mean ecliptic coordinates. These depend on the mean obliquity at the time and are longitude along the ecliptic from the mean equinox of date and latitude above the ecliptic.
Horizontal
Mean topocentric position in azimuth along the horizon counting from North through East and elevation above the mathematical horizon. Refraction is not taken into account.

An overview of terms used in stellar and planetary coordinates seems useful here. For stars:

For planets the terminology is a little different. Planetary ephemeris are often expressed in the mean equinox and ecliptic of date, meaning they use the orientation of ecliptic and equator as it is at the time for which the ephemeris is valid.

Sputnik uses mean positions for stars and astrometric positions for planets. In converting to topocentre, Sputnik ignores nutation, all three annual effects, diurnal aberration and polar motion. Refraction is taken into account only for calculating rise and set times.

Copyright: © 2002-2003 Horst Meyerdierks.

This programme is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version.

This programme is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details.

You should have received a copy of the GNU General Public Licence along with this programme; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

$Id: AstronomicalCoordinates.java,v 1.2 2007/11/13 22:35:06 virtualcall Exp $

2.5: 2003/09/17 hme
Add GetTopo() method.
2.3: 2003/09/16 hme
Package review.
1.14: 2003/06/14 hme
Add getHorizontal() public method.
1.13: 2003/03/09 hme
Review documentation, in particular mathematics.
1.12: 2002/07/16 hme
Make the Set*() methods protected. Most subclasses should not permit the use of these by their user. E.g. the Sun (subsubclass of this will never be at the position the user might set with these. The NamedObject class could have a subclass FixedObject that could make these methods public, but for now there is no need, because user commands to set coordinates are dealt with by the NamedObject class which can use these protected methods without problem.
1.11: 2002/07/13 hme
Consolidating documentation.
1.9: 2002/06/22 hme
Add SetEcl(), setTopocentric(), SetHori().
1.7: 2002/06/21 hme
Coordinate transforms to HA/Dec and A/h.
1.6: 2002/06/20 hme
Set*() methods for all systems within the domain of this class.
1.4: 2002/06/16 hme
Obliquity() and conversions between RA/Dec and ecliptic.
1.3: 2002/06/16 hme
Coordinate transforms Gal-B1950-J2000-Mean should work now. The B1950/J2000 transform uses FK4 precession, and takes care of the equinox correction necessary for FK4/FK5 transition.
1.1: 2002/06/15 hme
Translated from C++ (Sputnik 1.9).

See Also:
org.jscience.astronomy.solarsystem

Constructor Summary
AstronomicalCoordinates()
           
AstronomicalCoordinates(double[] coords)
           
AstronomicalCoordinates(double x, double y, double z)
           
 
Method Summary
static double[] convertB1950ToGalactic(double[] inTriplet)
          Convert B1950 to galactic coordinates.
static double[] convertB1950ToJ2000(double[] inTriplet)
          Convert B1950 to J2000 coordinates.
static double[] convertEclipticToMean(JulianTime aEquinox, double[] inTriplet)
          Convert equinox of date ecliptic coordinates to RA/Dec.
static double[] convertGalacticToB1950(double[] inTriplet)
          Convert galactic to B1950 coordinates.
static double[] convertHorizontalToTopocentric(EarthStation aStation, double[] inTriplet)
          Convert azimuth and elevation to HA/Dec.
static double[] convertJ2000ToB1950(double[] inTriplet)
          Convert J2000 to B1950 coordinates.
static double[] convertJ2000ToMean(JulianTime aEquinox, double[] inTriplet)
          Convert J2000 to equinox of date coordinates.
static double[] convertMeanToEcliptic(JulianTime aEquinox, double[] inTriplet)
          Convert equinox of date RA/Dec to ecliptic coordinates.
static double[] convertMeanToJ2000(JulianTime aEquinox, double[] inTriplet)
          Convert equinox of date to J2000 coordinates.
static double[] convertMeanToTopocentric(EarthStation aStation, JulianTime time, double[] inTriplet)
          Convert geocentric RA/Dec to topocentric HA/Dec.
static double[] convertTopocentricToHorizontal(EarthStation aStation, double[] inTriplet)
          Convert HA/Dec to azimuth and elevation.
static double[] convertTopocentricToMean(EarthStation aStation, JulianTime time, double[] inTriplet)
          Convert topocentric HA/Dec to geocentric RA/Dec.
static double[] getHorizontal(EarthStation aStation, JulianTime time, double[] aTriplet)
          Get the horizontal spherical coordinates.
 double[] getJ2000()
           
 double[] getPosition()
          Defines the position in an unspecified manner.
static double[] getTopocentric(EarthStation aStation, JulianTime time, double[] aTriplet)
          Get the topocentric spherical coordinates.
static double obliquity(JulianTime aTime)
          Obliquity of the ecliptic.
 void setB1950(double[] aTriplet)
          Set the B1950 rectangular coordinates.
 void setEcliptic(JulianTime aEquinox, double[] aTriplet)
          Set the mean equinox-of-date ecliptic rectangular coordinates.
 void setGalactic(double[] aTriplet)
          Set the galactic rectangular coordinates.
 void setHorizontal(EarthStation aStation, JulianTime time, double[] aTriplet)
          Set the horizontal rectangular coordinates.
 void setJ2000(double[] aTriplet)
          Set the J2000 rectangular coordinates.
 void setMean(JulianTime aEquinox, double[] aTriplet)
          Set the mean equinox-of-date rectangular coordinates.
 void setTopocentric(EarthStation aStation, JulianTime time, double[] aTriplet)
          Set the topocentric HA/Dec rectangular coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AstronomicalCoordinates

public AstronomicalCoordinates()

AstronomicalCoordinates

public AstronomicalCoordinates(double x,
                               double y,
                               double z)

AstronomicalCoordinates

public AstronomicalCoordinates(double[] coords)
Method Detail

getJ2000

public double[] getJ2000()

getPosition

public double[] getPosition()
Description copied from interface: Positioned
Defines the position in an unspecified manner.

Specified by:
getPosition in interface Positioned
Returns:
DOCUMENT ME!

convertB1950ToGalactic

public static final double[] convertB1950ToGalactic(double[] inTriplet)
Convert B1950 to galactic coordinates.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

The transform uses Euler angles of 282.25°, 327° and 62.6°. The last of these is the inclination of the galactic plane, as the galactic pole is defined to be at declination 27.4°. The second angle comes from the distance of 33° between the Galactic Centre and the node of the galactic plane with the equator. The first angle is 90° larger than the right ascension of the galactic pole. See e.g. Jean Meeus, 1991, Astronomical Algorithms, Willmann-Bell, Richmond VA, p.89f.

The matrix to transform from B1950 to galactic is

M11 = cos(282.25°) cos(327°) - sin(282.25°) sin(327°) cos(62.6°)
M12 = sin(282.25°) cos(327°) + cos(282.25°) sin(327°) cos(62.6°)
M13 = sin(327°) sin(62.6°)
M21 = -cos(282.25°) sin(327°) - sin(282.25°) cos(327°) cos(62.6°)
M22 = -sin(282.25°) sin(327°) + cos(282.25°) cos(327°) cos(62.6°)
M23 = cos(327°) sin(62.6°)
M31 = sin(282.25°) sin(62.6°)
M32 = -cos(282.25°) sin(62.6°)
M33 = cos(62.6°)

Parameters:
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.

convertB1950ToJ2000

public static final double[] convertB1950ToJ2000(double[] inTriplet)
Convert B1950 to J2000 coordinates.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

Jean Meeus, 1991, Astronomical Algorithms, Willmann-Bell, Richmond VA, p.130. illustrates the conversion from FK4 to FK5 and in particular from B1950 FK4 to a Julian epoch and FK5. In that case his start epoch is signified by T = 0.5. We specialise further and fix the end to J2000, hence the epoch difference is t = 0.5, also.

T = (B1950.0 - B1900.0) / 100 = 0.5
t = (J2000.0 - B1950.0) / 100 = 0.5

ζ = (2304.250 + 1.396 T) t + 0.302 t2 + 0.018 t3
z/" = ζ/" + 0.791 t2 + 0.001 t3
θ = (2004.682 - 0.853 T) t - 0.426 t2 - 0.042 t3

ζ = 1152.552"
z = 1152.750"
θ = 1002.016"

Jean Meeus, 1991, Astronomical Algorithms, Willmann-Bell, Richmond VA, p.126, does not give the transform matrix. From USNO/RGO, 1990, The Astronomical Almanach for the Year 1992, U.S. Government Printing Office, Washington DC, Her Majesty's Stationery Office, London, p.B18, we presume that for transfrom from T to T+t it is:

M11 = cos(ζ) * cos(θ) * cos(z) - sin(ζ) * sin(z)
M12 = -sin(ζ) * cos(θ) * cos(z) - cos(ζ) * sin(z)
M13 = -sin(θ) * cos(z)
M21 = cos(ζ) * cos(θ) * sin(z) + sin(ζ) * cos(z)
M22 = -sin(ζ) * cos(θ) * sin(z) + cos(ζ) * cos(z)
M23 = -sin(θ) * sin(z)
M31 = cos(ζ) * sin(θ)
M32 = -sin(ζ) * sin(θ)
M33 = cos(θ)

Returning to Jean Meeus, 1991, Astronomical Algorithms, Willmann-Bell, Richmond VA, p.130, dealing with the precession between 1950 and 2000 like this is not sufficient. We have to add to the right ascension the equinox correction

Δα = (0.0775 + 0.0850 T) s = 1.8"

Parameters:
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.

convertEclipticToMean

public static final double[] convertEclipticToMean(JulianTime aEquinox,
                                                   double[] inTriplet)
Convert equinox of date ecliptic coordinates to RA/Dec.

See also convertMeanToEcliptic.


convertGalacticToB1950

public static final double[] convertGalacticToB1950(double[] inTriplet)
Convert galactic to B1950 coordinates.

See also convertB1950ToGalactic.


getHorizontal

public static final double[] getHorizontal(EarthStation aStation,
                                           JulianTime time,
                                           double[] aTriplet)
Get the horizontal spherical coordinates.

This retrieves the position stored with conversion to horizontal spherical coordinates (azimuth and elevation).

Parameters:
aStation - The time and location of the observatory. The station clock is also the date of the equinox.
Returns:
Three floating point numbers containing the azimuth in radian (North is zero, East 90°, etc.), the elevation in radian and the topocentric distance in Gm.

getTopocentric

public static final double[] getTopocentric(EarthStation aStation,
                                            JulianTime time,
                                            double[] aTriplet)
Get the topocentric spherical coordinates.

This retrieves the position stored with conversion to topocentric spherical coordiaates (hour angle and declination).

Parameters:
aStation - The time and location of the observatory. The station clock is also the date of the equinox.
Returns:
Three floating point numbers containing the hour angle in radian (South is zero, West 6 h, etc.), the declination in radian and the topocentric distance in Gm.

convertHorizontalToTopocentric

public static final double[] convertHorizontalToTopocentric(EarthStation aStation,
                                                            double[] inTriplet)
Convert azimuth and elevation to HA/Dec.

The transform is

(
(
(
x'
y'
z'
)
)
)
= (
(
(
-sin(φ)
0
cos(φ)
0
-1
0
cos(φ)
0
sin(φ)
)
)
)
(
(
(
x"
y"
z"
)
)
)

The matrix here includes an inversion of the x and y axes, which amounts to a rotation by 180 degrees about the z axis. This takes account of the fact that azimuth counts from North while hour angle counts from South. Both count retrograde (clockwise).

Parameters:
aStation - The location of the observatory.
inTriplet - Array of 3 given numbers, forming an xyz position in Gm.
Returns:
Array of 3 numbers, forming an xyz position in Gm.

convertJ2000ToB1950

public static final double[] convertJ2000ToB1950(double[] inTriplet)
Convert J2000 to B1950 coordinates.

See also B19502J2000.


convertJ2000ToMean

public static final double[] convertJ2000ToMean(JulianTime aEquinox,
                                                double[] inTriplet)
Convert J2000 to equinox of date coordinates.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

The transform uses a matrix calculated from USNO/RGO, 1990, The Astronomical Almanach for the Year 1992, U.S. Government Printing Office, Washington DC, Her Majesty's Stationery Office, London, p.B18.

t = (Ep - J2000.0) / 100

ζ/° = 0.6406161 t + 8.39 10-5 t2 + 5 10-6 t3
z/° = 0.6406161 t + 3.041 10-4 t2 + 5.1 10-6 t3
θ/° = 0.556753 t - 1.185 10-4 t2 - 1.16 10-5 t3

M11 = cos(ζ) * cos(θ) * cos(z) - sin(ζ) * sin(z)
M12 = -sin(ζ) * cos(θ) * cos(z) - cos(ζ) * sin(z)
M13 = -sin(θ) * cos(z)
M21 = cos(ζ) * cos(θ) * sin(z) + sin(ζ) * cos(z)
M22 = -sin(ζ) * cos(θ) * sin(z) + cos(ζ) * cos(z)
M23 = -sin(θ) * sin(z)
M31 = cos(ζ) * sin(θ)
M32 = -sin(ζ) * sin(θ)
M33 = cos(θ)

This matrix transforms from J2000 to Ep. The inverse transform is achieved with the transposed matrix.

Parameters:
aEquinox - The equinox to which the returned coordinates should refer.
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.

convertMeanToEcliptic

public static final double[] convertMeanToEcliptic(JulianTime aEquinox,
                                                   double[] inTriplet)
Convert equinox of date RA/Dec to ecliptic coordinates.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

The matrix to transform from RA/Dec to ecliptic is

M = (
(
(
1
0
0
0
cos(ε)
-sin(ε)
0
sin(ε)
cos(ε)
)
)
)

Parameters:
aEquinox - The equinox to which the given coordinates refer, also the time for which the obliquity of the ecliptic needs to be calculated.
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.

convertMeanToJ2000

public static final double[] convertMeanToJ2000(JulianTime aEquinox,
                                                double[] inTriplet)
Convert equinox of date to J2000 coordinates.

See also convertJ2000ToMean.


convertMeanToTopocentric

public static final double[] convertMeanToTopocentric(EarthStation aStation,
                                                      JulianTime time,
                                                      double[] inTriplet)
Convert geocentric RA/Dec to topocentric HA/Dec.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

The transform is

(
(
(
x'
y'
z'
)
)
)
= - (
(
(
itsX
0
itsZ
)
)
)
+ (
(
(
cos(LST)
sin(LST)
0
sin(LST)
-cos(LST)
0
0
0
1
)
)
)
(
(
(
x
y
z
)
)
)

The matrix here includes an inversion of the topocentric y' axis. While the geocentric y axis points towards Orion, the topocentric y' axis points to the West point on the horizon. Therefore RA = atan(y/x) counts direct (counter-clockwise), but HA = atan(y'/x') counts retrograde (clockwise).

Parameters:
aStation - The time and location of the observatory. There is an assumption that the given geocentric coordinates are mean RA/Dec for the equinox of the same date as the station clock shows.
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.

obliquity

public static final double obliquity(JulianTime aTime)
Obliquity of the ecliptic.

We use the expression from Jean Meeus, 1991, Astronomical Algorithms, Willmann-Bell, Richmond VA, p.135:

U = (Ep - 2000) / 10000

ε = 23° + 26' + (21.448 - 4680.93 U - 1.55 U2 + 1999.25 U3 - 51.38 U4
- 249.67 U5 - 39.05 U6 + 7.12 U7 + 27.87 U8 + 5.79 U9 + 2.45 U10)"

Parameters:
aTime - The time for which the obliquity (w.r.t. the equator and equinox of date) is required.

setB1950

public final void setB1950(double[] aTriplet)
Set the B1950 rectangular coordinates.

This sets the position stored from the given B1950/FK4 coordinates. Conversion to J2000 for internal storage is performed.

Parameters:
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm.

setEcliptic

public final void setEcliptic(JulianTime aEquinox,
                              double[] aTriplet)
Set the mean equinox-of-date ecliptic rectangular coordinates.

This sets the position stored from the given mean ecliptic coordinates. Conversion to J2000 for internal storage is performed.

Parameters:
aEquinox - The equinox to which the given coordinates refer, also the time for which the obliquity of the ecliptic needs to be calculated.
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm.

setGalactic

public final void setGalactic(double[] aTriplet)
Set the galactic rectangular coordinates.

This sets one stored position from the given galactic coordinates. Conversion to J2000 for internal storage is performed.

Parameters:
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm.

setHorizontal

public final void setHorizontal(EarthStation aStation,
                                JulianTime time,
                                double[] aTriplet)
Set the horizontal rectangular coordinates.

This sets the position stored from the given horizontal coordinates. Conversion to J2000 for internal storage is performed.

Parameters:
aStation - The time and location of the observatory. The station clock is also the date of the equinox.
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm. Note that the coordinates are left-handed and that azimuth counts from North, i.e. the x axis points to the North point and the y axis points to the East point on the horizon.

setJ2000

public final void setJ2000(double[] aTriplet)
Set the J2000 rectangular coordinates.

This sets the position stored from the given J2000/FK5 coordinates.

Parameters:
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm.

setMean

public final void setMean(JulianTime aEquinox,
                          double[] aTriplet)
Set the mean equinox-of-date rectangular coordinates.

This sets the position stored from the given mean coordinates for the equinox of date. The date of the equinox also needs to be given. Conversion to J2000 for internal storage is performed.

Parameters:
aEquinox - The equinox to which the given coordinates refer.
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm.

setTopocentric

public final void setTopocentric(EarthStation aStation,
                                 JulianTime time,
                                 double[] aTriplet)
Set the topocentric HA/Dec rectangular coordinates.

This sets the position stored from the given topocentric coordinates. Conversion to J2000 for internal storage is performed.

Parameters:
aStation - The time and location of the observatory. The station clock is also the date of the equinox.
aTriplet - Three floating point numbers containing the x, y and z coordinates. These should normally be in Gm. Note that the coordinates are left-handed, i.e. the y axis points to the West point on the horizon.

convertTopocentricToHorizontal

public static final double[] convertTopocentricToHorizontal(EarthStation aStation,
                                                            double[] inTriplet)
Convert HA/Dec to azimuth and elevation.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

The transform is

(
(
(
x"
y"
z"
)
)
)
= (
(
(
-sin(φ)
0
cos(φ)
0
-1
0
cos(φ)
0
sin(φ)
)
)
)
(
(
(
x'
y'
z'
)
)
)

The matrix here includes an inversion of the x and y axes, which amounts to a rotation by 180 degrees about the z axis. This takes account of the fact that azimuth counts from North while hour angle counts from South. Both count retrograde (clockwise).

Parameters:
aStation - The location of the observatory.
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.

convertTopocentricToMean

public static final double[] convertTopocentricToMean(EarthStation aStation,
                                                      JulianTime time,
                                                      double[] inTriplet)
Convert topocentric HA/Dec to geocentric RA/Dec.

This method does not change the state, it merely operates on aNpos given triplets to generate aNpos returned triplets.

The transform is

(
(
(
x
y
z
)
)
)
= (
(
(
cos(LST)
sin(LST)
0
sin(LST)
-cos(LST)
0
0
0
1
)
)
)
(
(
(
x' + itsX
y'
z' + itsZ
)
)
)

The matrix here includes an inversion of the topocentric y' axis. While the geocentric y axis points towards Orion, the topocentric y' axis points to the West point on the horizon. Therefore RA = atan(y/x) counts direct (counter-clockwise), but HA = atan(y'/x') counts retrograde (clockwise).

Parameters:
aStation - The time and location of the observatory. There is an assumption that the given geocentric coordinates are mean RA/Dec for the equinox of the same date as the station clock shows.
inTriplet - Array of 3*aNpos given numbers, each group of three forming an xyz position in Gm.
Returns:
Array of 3*aNpos returned numbers, each group of three forming an xyz position in Gm.