×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Help with running a script to control a telescope

  • Posts: 554
  • Thank you received: 138
It occured to me that writing a script to control a telescope could be a way to help people collect the data I was asking for.
I'e found the indi_getprop, indi_setprop and indi_eval script methods but have run int a few problems.

The indi_* commands need the telescope name. Is there a way to get this from the server in some way? The standard properties have ACTIVE_DEVICES - ACTIVE_TELESCOPE but I haven't found a way to read this from a script.

I need the local sidereal time so I can set positions as hour angle. The standard properties specify TIME_LST.LST. Is there a way to read the LST?

Thanks,
Chris
3 years 9 months ago #55149

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

  • Posts: 150
  • Thank you received: 15
Hi Chris,

for read the lst, try this :
x=`indi_getprop -1 "EQMod Mount".TIME_LST.LST`

If you not in localhost, add -h [host] for get lst to the remote host.
Last edit: 3 years 9 months ago by Picard.
3 years 9 months ago #55150

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

  • Posts: 554
  • Thank you received: 138
Thanks but that only works of you are running EQMod, most mounts don't implement the LST command.
Last edit: 3 years 9 months ago by Chris Rowland.
3 years 9 months ago #55151

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

  • Posts: 1119
  • Thank you received: 182


Chris:

Local sidereal time (LST) = Greenwich sidereal time (GST) - Longitude West. GST can be calculated by using UTC + Lc, where Lc is the local function that converts UTC to GST. Longitude is specified in the geographical location of Kstars. It might be possible to call up that information from Kstars and calculate LST that way within the script.
Jo
Last edit: 3 years 9 months ago by Jose Corazon.
3 years 9 months ago #55154

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

  • Posts: 554
  • Thank you received: 138
So where is the function to determine GST?
3 years 9 months ago #55168

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

  • Posts: 554
  • Thank you received: 138
Well, I found out how to get the current mount name using a script:

# find the telescope name
scope=$(indi_getprop *.TELESCOPE_PIER_SIDE.PIER_WEST)
scope=${scope%%.*}
echo $scope

The first line gets something like "Telescope Simulator.TELESCOPE_PIER_SIDE.PIER_WEST=Off" and the second line removes everything from the first '.'
You have to choose a property that will only appear in the driver you are looking for and only appears once.

I've not found a way to get the data to determine hour angle. I need some form of sidereal time, I can get longitude, time and Ra from the mount.
3 years 9 months ago #55242

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

Time to create page: 0.689 seconds