×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Scripting telescope motion, never see RA change but is changing

  • Posts: 276
  • Thank you received: 52
Hi all,

I am trying to write a simple shell script that moves the telescope simulator in RA
Connect
Set SLEW_SPEED
Read RA1
Set WE motion West On
While Current RA > to (RA1 -0.5) wait
Set WE motion Off

What I see is even though scope is 'moving' as seen by watching RA in Skychart, my loop never sees RA change
If I do a motion in SKychart, my script sees the RA change then completes

Thoughts?
Script:
=============================
#!/bin/bash
echo `date -Ins`
indi_setprop "Telescope Simulator.CONNECTION.CONNECT=On"

indi_setprop "Telescope Simulator.TELESCOPE_SLEW_RATE.3x=On"

RA=`indi_getprop -1 "Telescope Simulator.TARGET_EOD_COORD.RA"`
RAT=`echo "$RA - 0.5" | bc -l`
echo RA=$RA RAT=$RAT

indi_setprop "Telescope Simulator.TELESCOPE_MOTION_WE.MOTION_WEST=On"

while [ $(echo "$RAT < $RA" | bc) -ne 0 ]
do
RA=`indi_getprop -1 -t 1 "Telescope Simulator.TARGET_EOD_COORD.RA"`
echo RA=$RA RAT=$RAT
sleep 2
done

indi_setprop "Telescope Simulator.TELESCOPE_MOTION_WE.MOTION_WEST=Off"

echo `date -Ins`

RA=`indi_getprop -1 -t 1 "Telescope Simulator.TARGET_EOD_COORD.RA"`
echo RA=$RA RAT=$RAT

indi_setprop "Telescope Simulator.CONNECTION.CONNECT=Off"
=====================================================

This is the output
2021-02-12T09:51:56,778342081-05:00
RA=19.794006588257666124 RAT=19.294006588257666124
RA=19.794006588257666124 RAT=19.294006588257666124
RA=19.794006588257666124 RAT=19.294006588257666124
RA=19.794006588257666124 RAT=19.294006588257666124
RA=19.794006588257666124 RAT=19.294006588257666124
RA=19.794006588257666124 RAT=19.294006588257666124 (Force motion with SKychart, script see change and exits)
RA=4.6399652575165211132 RAT=19.294006588257666124
3 years 2 months ago #67256

Please Log in or Create an account to join the conversation.

  • Posts: 276
  • Thank you received: 52
Sorry, never mind, using wrong prop on my end, needed EQUATORIAL_EOD_COORD
3 years 2 months ago #67257

Please Log in or Create an account to join the conversation.

Time to create page: 0.433 seconds