[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: ATM setting circles.
Hello Mark,
I found the below Excel VBA function some years ago. I would love to give
the credit to whoever wrote it but I cannot recall where I actually found
it. I have a feeling it may have actually been from S&T's freebie program
page but I am not quite sure. (www.skypub.com). I imagine you should be able
to use the formula's in the vba function to convert the script into a form
acceptable for a programmable calulator.
Cheers
Andrew Hincks
****************************************************************************
*********
' returns altitude and azimuth of object given RA and DEC of object'latitude
and longitude of observer and days after J2000.0
Function altaz(d As Double, dec As Double, ra As Double, _glat As Double,
glong As Double, index As Integer) As DoubleDim h As Double, lst As Double,
a As Double, z As Double, _sa As Double, cz As Double
h = gst(d) + glong - rasa = DegSin(dec) * DegSin(glat)sa = sa + DegCos(dec)
* DegCos(glat) * DegCos(h)a = DegArcsin(sa)cz = DegSin(dec) - DegSin(glat) *
sacz = cz / (DegCos(glat) * DegCos(a))
Select Case index
Case 1 'altitude altaz = a
Case 2 'azimuth If DegSin(h) < 0 Then altaz = DegArccos(cz) Else
altaz = 360 - DegArccos(cz) End If
End Select
End Function
----- Original Message -----
From: Mark Gray
To: atm@shore.net
Sent: Saturday, February 02, 2002 5:04 PM
Subject: ATM setting circles.
Hello all. I have heard of people (using a calculator) converting the
Azimuth ant Altitude
reading on the side and bottom of their scope to a RA and Dec reading, and
vice versa to find an
object. Does anyone know how to do this??