×

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

Bi-monthly release with minor bug fixes and improvements

Slewing to AltAz coords in PyIndi

  • Posts: 57
  • Thank you received: 6
Hi there - I think I know the answer to this but thought I'd confirm - can you specify altaz coordinates in PyIndi and have the telescope slew to them? I tried the following:
# Set the desired coordinates
telescope_altaz=device_telescope.getNumber("HORIZONTAL_COORD")
while not(telescope_altaz):
    time.sleep(0.5)
    telescope_altaz=device_telescope.getNumber("HORIZONTAL_COORD")
telescope_altaz[0].value=startAltAz['altitude']
telescope_altaz[1].value=startAltAz['azimuth']
indiclient.sendNewNumber(telescope_altaz)
 
# and wait for the scope has finished moving
while (telescope_altaz.getState()==PyIndi.IPS_BUSY):
    print("Scope Moving ", telescope_altaz[0].value, telescope_altaz[1].value)
    time.sleep(2)

But the scope doesn't move. So I imagine not - the KStars client does slew to Altaz coords for automated flats. or is that just calculating a RA and DEC based on the AltAz coords desired and slews to that? I know I've got good connections and stuff since I can park and unpark the scope but this isn't working for me. Any input appreciated thanks!
Last edit: 3 months 3 weeks ago by Gord Tulloch.
3 months 3 weeks ago #97963

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

  • Posts: 262
  • Thank you received: 66
If you have a mount that is dual mode, you may have to set it to Alt/Az mode before it will work. The control might not become valid until it is switched.

You may need to set ON_COORD_SET (switch) to SLEW. The default is TRACK in the simulator. You may also want to ensure it is unparked (TELESCOPE_PARK switch). Also, verify the slew rate (TELESCOPE_SLEW_RATE switch).

Unfortunately, the telescope simulator does not appear to support the Alt/Az mode, so there is no good test case.
3 months 3 weeks ago #97967

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

  • Posts: 57
  • Thank you received: 6
Thanks Aaron I'll check the indicated settings however I think perhaps using polar coords converted from the desired altaz might be more generic anyway, so I'll do that.
Last edit: 3 months 2 weeks ago by Gord Tulloch.
3 months 2 weeks ago #97991

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

Time to create page: 0.551 seconds