Re: Mixed Coordinate conversion - ra from long and dec



Dave Blake wrote:
Can any one help me with a bit of math.
I would like to get right ascension given the celestial longitude and
declination of an object. Yes, that's right I do mean mixed co-ordinate
systems. I know the equations that convert ecliptical to equatorial
co-ordinates e.g. celestial long and lat to ra and dec (and vica versa)
but I'm darned if I can get the trig re-arranged to give ra as a
function of celestial longitude and declination. Not so worried about
celestial lat, but it could be part of it.

It might sound odd, but I really do need to solve this. Hope this is
right place to try.

Yup. In what follows, I'll use (a,d) for (RA,Dec) and (l,b) for
ecliptic (lon,lat) and e for the obliquity, just to save keystrokes.
(Note that l and b are really lambda and beta, NOT galactic coordinates!)

Use rectangular coordinates. The conversion from (RA,Dec) to (lon,lat):

cos l cos b = cos a cos d
sin l cos b = cos e sin a cos d + sin e sin d
sin b = -sin e sin a cos d + cos e sin d

Divide the second equation by the first:

sin l cos e sin a cos d + sin e sin d
----- = -------------------------------
cos l cos a cos d

This equation contains RA, longitude, declination, and obliquity -- the
latitude has been removed. We need to solve it for RA in terms of the
others. Cross multiply and gather everything on one side:

sin a (cos e cos d cos l) - cos a (cos d sin l) + sin e sin d cos l = 0

Now -- here's the tricky part -- make the substitution

cos e cos d cos l = m cos M
cos d sin l = m sin M
sin e sin d cos l = C

so the previous equation reduces to

sin a (m cos M) - cos a (m sin M) + C = 0

or

m sin (a-M) = -C

whose solution is

a = M + arcsin (C/m)

where

M = atan2 (sin l, cos e cos l)
m = cos d sqrt (sin^2 l +cos^2 e cos^2 l)

Use the principal value for arcsin (C/m) and the 4-quadrant arctan
to get M.

As one would expect, this blows up at the poles. :-)

I'll leave it as an exercise for the reader to prove that |C/m| <=1 for
all physically possible combinations of declination and longitude.

-- Bill Owen
.



Relevant Pages

  • Re: generate all possible math expr of one term
    ... The result lisp expression should match ... (+ X (TAN Y)) ... (+ X (COS Y)) ... (+ X (SIN Y)) ...
    (comp.lang.lisp)
  • Re: sin x / x tends to 1...
    ... that it's easy to show that the circumference of the unit circle ... >sin x, that we can call psin x, the limit is obvious. ... smallest positive zero of cos. ... I into the first quadrant, and that c is 1-1 on I. ...
    (sci.math)
  • Re: Mixed Coordinate conversion - ra from long and dec
    ... function of celestial longitude and declination. ... sin l cos b = cos e sin a cos d + sin e sin d ...
    (sci.astro.amateur)
  • Re: opponents of taylor and lhospital ?
    ... Suppose a high school senior taking the AP Calculus exam ... There are other ways to show that d/dx= cos x, ... computing the limit of (sin x)/x first. ... BUT practically all Calculus textbooks derive the limit of sin/x ...
    (sci.math)
  • Re: Sin Cos Tan, why not Sin Sec Tan?
    ... you'll find there are many things which sin and cos ... nicely in ways which sec and csc fail to do. ... University of California or math department thereof. ...
    (sci.math)