RA & Dec to Altaz

Scripts and programs to automate Astroart
Post Reply
Forum_2015
Posts: 358
Joined: 07 Dec 2018, 15:04

RA & Dec to Altaz

Post by Forum_2015 »

Hi All,

I am trying to write a simple script to automate a sequence of images. I would like to eliminate (skip) those objects below a limiting altitude while running the script.
To do this I would like to calculate the altitude directly from RA and Dec, however when I use the "EquatToAltaz(ra,de,lon,lat,[jd])" command it only seems to return the Azimuth value.

Does anybody have a small script that will return both alt and azi. Yes, I have the formula to calculate these by pencil, yet when I write these as script I get false results in alt according to Guide 9. Also they are vastly wrong near (under) the SCP.

I was sure that there was some BASIC programs on the NET years ago, but I cant seem to find any now.

Cheers for your help.

Forum_2015
Posts: 358
Joined: 07 Dec 2018, 15:04

Re: RA & Dec to Altaz

Post by Forum_2015 »

Hi,
those functions return two values (this is not standard in BASIC) so:

az,al = EquatToAltaz(ra,de,lon,lat,[jd])

See "user subroutines" in the updated help file of the SP3/4.
Here is an example to emulate parking for those mounts which do not support it:

Code: Select all

myLon = +12.5   ' Rome 
myLat = +41.9
ra,de = AltazToEquat(180,+5,myLon,myLat)
Telescope.Goto(ra,de)
The telescope is parked at south (180°), almost horizontal (+5°).
For high accuracy, the procedure should be called two times, to compensate the time spent for the first GOTO.

Post Reply