[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [ATM] Converting ALT and AZ to RA and DEC



I took me a while to find it and make it work.
In the Transform of Coordinates in Astronomical Algorthms uses:

L    Latitude of Observation
h    Altitude above Horizon     + if above, - if below
A    Azimuth measured clockwise from South. if from the North add 180deg

>From these are computed the:
D    Declination and the
H    Local Hour angle in radians.
You will also need to know your Local Sidereal Time to get the Right 
Ascencion from.

tan(H) = sin(A)/(cos(A)*sin(L)+tan(h)*cos(L))
arctan(tan(H)) will an hour angle in radians that will need to be corrected 
for quadrant issues.
convert to degrees and correct for quadrant issue:

if A from south >180 then H - 180deg =H

now convert to hour angle at 15 degrees per hour  H/15= H in decimal hours.

You could use the atan2 function as in Excel atan2(x,y) to get quadrant 
correct.
so now you would have:

atan2(cos(A)*sin(L)+tan(h)*cos(L),sin(A))
to this you would do the divide by 15 to get the Local Hour Angle in decimal 
hour format.

Right Ascencion is Local Sidereal Time minus the Local Hour Angle
RA=LST-LHA
if RA >24hours then RA=RA-24hours

sin(D)=sin(L)*sin(h)-cos(L)*cos(h)*cos(A)

declination D=asin(sin(D))

Example data from MICA for Capella at my home in Klamath Falls, Or.

the following is a cut and paste headache:

                                 Capella

   Date        Time                Zenith               Azimuth

        (UT1)                     Distance              (E of N)

             h  m   s               °                     °

2007 Dec 05 22:57:31.0            85.64911              25.14596



   Date        Time            Local Hour              Declination

        (UT1)                    Angle

             h  m   s             h                        °

2007 Dec 05 22:57:31.0        -  9.493909              + 46.00763



   Date        Time           Right Ascension          Declination

        (UT1)

             h  m   s             h                        °

2007 Dec 05 22:57:31.0           5.2886255             + 46.007630



                                SIDEREAL TIME

                              Greenwich                Local 
Equation

   Date        Time         Sidereal Time          Sidereal Time       of 
the

        (UT1)                  Mean    App.           Mean    App. 
Equinoxes

             h  m   s    h  m   s       s       h  m   s       s        s

2007 Dec 05 22:57:31.0   3 54 57.3524 57.7804  19 47 40.5524 40.9804 
+0.4280



Altitude h is 90 deg - the from Zenith Distance 90deg- 85.64911d=4.35089 deg 
or 0.075937356 radians

Azimuth is from the North so add 180 deg 25.14596deg+ 180 = 205.14596deg or 
3.580472449 radians

Latitude used is: north 42d13m12s so 42+13/60+12/3600=42.22deg or 0.73687801 
radians

Using The Local Mean. Sidereal Time 19h 47m 40.5524s so 
19+47/60+40.5524/3600 = 19.79472hr



h=0.075937356 radians

A=3.580472449 radians

L=0.73687801 radians

LST= 19.79472 hr



tan(H) = sin(A)/(cos(A)*sin(L)+tan(h)*cos(L))
TAN(H)=SIN(3.580472449)/(COS(3.580472449)*SIN(0.73687801)+TAN(0.075937356)*COS(0.73687801))

TAN(H)= 0.769863756

ATAN(TAN(H))= 0.65609318radians or 37.5913702deg



since A>180 then 37.5913702 deg-180 deg = -142.4086298 deg



-142.4086298deg/15 deg per hr = -9.4939086 Local Hour Angle



ATAN2 Method:

atan2(cos(A)*sin(L)+tan(h)*cos(L),sin(A))
ATAN2(COS(3.580472449)*SIN(0.73687801)+TAN(0.075937356)*COS(0.73687801),SIN(3.580472449))= 
 -2.485499473

radians or -142.4086298deg

-142.4086298deg/15 deg per hr = -9.493908653 Local Hour Angle





LST-LHA=RA

19.79472-(-9.493908653)= 29.28862543 hrs

if RA >24hours then RA=RA-24hours
29.28862543 hrs-24hr=5.288625431 hrs

RA=5.288625431 hrs

Close to MICA's 5.2886255 hrs



sin(D)=sin(L)*sin(h)-cos(L)*cos(h)*cos(A)
SIN(D)=(SIN(0.73687801)*SIN(0.075937356)-COS(0.73687801)*COS(0.075937356)*COS(3.580472449))

SIN(D)= 0.719432281

ASIN(SIN(D))= 0.802984596radians or 46.00762838deg

DEC=46.00762838 deg

Good match for MICA output



You may also want to look at:

http://star-www.st-and.ac.uk/%7Efv/webnotes/index.html



I hope this does more than confuse. Who knows what the email format will do 
to this.



Virgil Johnson

Raider of the Lost Dark





----- Original Message ----- 
From: "G Gagne" <gagne51@clearwire.net>
To: "atm" <atm@atmlist.net>
Sent: Sunday, December 02, 2007 5:13 AM
Subject: [ATM] Converting ALT and AZ to RA and DEC


>I have programmed my telescope computer to convert RA and DEC to ALT and
> AZ for controlling the axes of my dob telescope. However, when manually
> slewing  the telescope I often find interesting objects that I would
> like to track. What I need now are the reverse equations for RA and DEC
> of the new found object as a function of ALT and AZ derived from the
> encoders.
>
> Can anyone point me an appropriate reference?
> _______________________________________________
> ATM mailing list http://www.atmlist.net/
> 


_______________________________________________
ATM mailing list http://www.atmlist.net/