Function icrsToGal( xyz )

Description:
Converts a 3-element vector representing ICRS (equatorial) coordinates to galactic coordinates. This can be used with position or velocity vectors.

The input vector is multiplied by the matrix AG', given in Eq. 3.61 of the Gaia DR2 documentation, following Eq. 1.5.13 of the Hipparcos catalogue.

The output coordinate system is right-handed, with the three components positive in the directions of the Galactic center, Galactic rotation, and the North Galactic Pole respectively.

Parameters:
xyz (array of floating point)
3-element vector giving ICRS Cartesian components
Return Value (array of floating point):
3-element vector giving Galactic Cartesian components
Example:
icrsToGal(polarXYZ(ra, dec, distance))
Signature:
double[] icrsToGal(double[])