how to Convert RA-DEC to Alt-AZ

Got a question on astronomy that you'd wanted to ask? Ask your questions here and see if the old timers can give you some good answers.
Post Reply
michael
Posts: 148
Joined: Tue Aug 31, 2004 5:22 pm
Location: singapore

how to Convert RA-DEC to Alt-AZ

Post by michael »

Hi,

How to Converting RA-DEC to ALT-AZ for singapore
User avatar
chrisyeo
Posts: 1186
Joined: Wed Oct 08, 2003 9:11 pm

Post by chrisyeo »

Hi Micheal,

this is the website I was talking about: http://home.att.net/~srschmitt/script_c ... rce%20code

The formula can be easily copied from the java code.

Will post more as I figure out more.

Cheers,
Chris
User avatar
chrisyeo
Posts: 1186
Joined: Wed Oct 08, 2003 9:11 pm

Post by chrisyeo »

Hi,

I need some help.. forgot my math..

when I cosine a number, shouldn't I get back the number if I inverse or arc cosine it?

Cos(A)=B; ACos(B)= A ?

so for example, cos(60)=0.5, acos(0.5)=60

but for certain numbers such as 282 degrees, the calculation doesn't work. Cos(282)=0.207, ACos(0.207)=78

Can someone explain and tell me how to get the arc cosine of a certain number in degrees? This is relevant in my conversion of alt/az to dec/ra.

Thanks,
Chris
User avatar
gwenyi
Posts: 233
Joined: Wed Oct 01, 2003 7:28 pm
Location: Holland Close

Post by gwenyi »

hmm.. gotta use the quadrant rule.. as in

Sin(A)=B

1st and 2nd quadrant for sin rule meant for positive values of B
3rd and 4th quadrant for sin rule meant for negative values of B

Cos(A)=B

1st and 4th quadrant for cos rule meant for positive values of B
2nd and 3rd quadrant for cos rule meant for negative values of B

Tan(A)=B

1st and 3rd quadrant for tan rule meant for positive values of B
2nd and 4th quadrant for tan rule meant for negative values of B


so let's take for example

tan( angle x ) = 0.8

angle x = 38.65 or 180 + 38.65 = 38.7 or 218.6 degrees ( 1dp)

but if , tan (angle x ) = -0.8

angle x = 180 - 38.65 or 360- 38.65 = 141.4 or 321.4 ( 1 dp)

hope this helps

cheers,
wenyi
Post Reply