Question about ASTRO


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11435
Posted: 02:48pm 06 May 2026      

Frank

I'm in the process of implementing a SLEW command into the astro code. This will take the current DEC and RA ( assuming polar aligned equatorial mount) and output the moves requred to move to a target new RA/DEC. The code is intended to handle meridian flip.
Please could you review this concept:

  Quote  New signature

SLEW dRA1, dDec1, flipRA, flipDec, dRA2, dDec2, mountRA, mountDec, RAs, DECs, LST

Takes 5 input parameters:
Current position - mountRA/mountDEC
Desired new position - RAs/DECs
Sidereal Time - LST

6 outputs
Initial slew : deltaRA1, deltaDEC1
If flip is needed :
flip direction - flipRA, flipDec
second slew deltaRA2,deltaDEC2

Then the Basic code looks like this

LOCATE date$, time$, lat, lon, lst
ASTRO Saturn alt, az, ra, dec
SLEW dra1,ddec1, flipra,flipdec, dra2,ddec2, mount_ra,mount_dec, ra,dec, lst

drive_RA(dra1) : drive_Dec(ddec1)

IF dra2 <> 0 THEN
 drive_Dec(flipDec)            ' physical flip
 drive_RA(flipRA)              ' RA compensation
 drive_RA(dra2)            ' fine correction to target
END IF

mount_ra = ra : mount_dec = dec


Note ddec2/deltaDEC2 is always zero but is there for consistency

Edited 2026-05-07 00:50 by matherp