Coordinate Conversion Equations

In "Spherical Trigonometry and Celestial Coordinates" and in "Galactic Coordinates" I demonstrated in some detail how to work out the formulae for converting the right ascension and declination of a body's Equatorial coordinates into the equivalent Ecliptic coordinates or galactic coordinates. In this essay I want to present those formulae in compressed form in a kind of cheat sheet for the conversions.

Equatorial to Ecliptic

Given the right ascension (ρ) and declination (δ) of a celestial body (the target), we want to calculate the equivalent Ecliptic latitude (φ) and Ecliptic longitude (θ). We accomplish that calculation by solving a spherical triangle that has a vertex angle A at the north celestial pole and sides b, extending between the north celestial pole and the north Ecliptic pole, and c, extending between the north celestial pole and the target. We thus start with

(Eq'n 1)

We calculate via the cosine rule the intermediate steps

(Eq'n 2)

with

(Eq'n 3)

and

(Eq'n 4)

Finally we get

(Eq'n 5)

The only additional rule we have to keep in mind is the one that tells us that if we calculate a negative Ecliptic longitude we must subtract its absolute value from 360˚ to get the correct longitude in degrees east of the First Point in Aries.

Equatorial to Galactic

Given the right ascension (ρ) and declination (δ) of a celestial body, we want to calculate the equivalent galactic latitude (ψ) and galactic longitude (λ). The galactic coordinates in this case are a heliocentric system that uses the Milky Way as its fiducial reference, so we accomplish the desired calculation by solving a trio of spherical triangles based on four points on the sky. We label the north celestial pole as point A, the north galactic pole as point B, the location of our chosen star as point C, and the cartographic center of the galaxy as point D. To avoid confusion I revert here to Euclidean notation: I identify the angular length of each arc by that arc's end points and I identify the vertex angle at a point by the endpoints of the arcs framing that vertex (for example, CAB designates the angle at A between the arcs AC and AB).

We begin with

(Eq'n 6)

The cosine rule gives us

(Eq'n 7)

in which we have

(Eq'n 8)

The length of the arc BC equals 90˚ minus the galactic longitude of our star.

Next we calculate the length of the arc CD by using

(Eq'n 9)

The cosine rule gives us

(Eq'n 10)

in which

(Eq'n 11)

Finally we calculate the angle CBD. In this calculation we have BC from part one, CD from part two, and BD=90˚. We use the cosine rule in the form

(Eq'n 12)

From those results we get the galactic latitude directly as

(Eq'n 13)

We cannot calculate the galactic longitude so easily. Naively we assume that

(Eq'n 14)

because that gives us the vertex angle between the arcs extending from the galactic north pole to the center of the galaxy and to our target star. But we have merely calculated the smaller of the two angles between those two lines; we have no indication as to whether that smaller angle puts the star galactic east of the galactic center or galactic west of the galactic center. In the later case we would have to calculate

(Eq'n 15)

because we measure galactic longitude eastward from the galactic center.

To resolve that dilemma we must repeat steps two and three above, but replace the center of the galaxy with the ascending node of the galactic equator, the point where the galactic plane crosses the celestial equator with galactic longitude increasing from south to north. That point has the Equatorial coordinates J2000 of right ascension 18 hrs 51 min 26.275 sec (282.8595˚) and declination zero and it has the galactic coordinates J2000 of latitude zero and longitude 32.9319˚. We thus have Equation 9 as

(Eq'n 16)

which gives us Equation 10 in the form

(Eq'n 17)

We then have Equation 12 in the form

(Eq'n 18)

In that equation we have [bc]=BC. We then subtract CBD from cbd. If the subtraction yields a positive 32.9319 degrees, the we have calculated the longitudinal displacement of the star westward from the galactic center and we must use Equation 15 to calculate the correct galactic longitude. If the subtraction yields a negative 32.9319 degrees or a number smaller than 32.9319 degrees, then we have calculated the longitudinal displacement of the star eastward from the galactic center and, thus, Equation 14 gives us the correct galactic longitude.

efefabefef