×

INDI Library v1.9.1 Released (26 Jun 2021)

Bi-monthly INDI Library v1.9.1 is released bringing a few new drivers and improvements to existing drivers.

Scripting telescope motion, never see RA change but is changing

  • Posts: 52
  • Thank you received: 3
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
5 months 2 weeks ago #67256

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

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

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

Time to create page: 0.391 seconds