×

INDI Library v1.8.9 Released (01 Mar 2021)

INDI monthly update. In addition to driver improvements, major code refactoring is in progress by @pawel-soja to modernize and improve INDI aging code.

New forum users, please go here first: indilib.org/forum/new-forum-users.html

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
10 months 1 week ago #55149

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

  • Posts: 127
  • Thank you received: 10
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.
C8 lightbridge, Orion Atlas mount, EOS 1000D modified and ASI120MM for guiding.
Last edit: 10 months 1 week ago by Christian.
10 months 1 week 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: 10 months 1 week ago by ChrisRowland.
10 months 1 week ago #55151

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

  • Posts: 1085
  • Thank you received: 169

ChrisRowland wrote: 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



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
Atlas Pro AZ-EQ, ASI1600MM-Pro, ASI120MM-S, ES102ED, WO-Z61, Nikon D3300, ASI-EFW, ZWO LRGB,Ha,O3,S2 filter set
Last edit: 10 months 1 week ago by El Corazon.
10 months 1 week 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?
10 months 1 week 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.
10 months 1 week ago #55242

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

Time to create page: 0.485 seconds