Welcome, Guest
Username: Password: Remember me
14 Nov 2018
Glad to announce of release of INDI Library v1.7.5 on 2018-11-14. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
Read More...

TOPIC: Parking scope without Park capability (LX200 & Skysensor)

Parking scope without Park capability (LX200 & Skysensor) 1 year 6 months ago #16336

  • Barker
  • Barker's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
For remote sessions it would be useful to be able to park a LX200 type mount like I've seen in Jasem's EKOS schedule demos, not at least this is useful for setting-up for making flats. However I believe my mount (SS2K) and most LX200 types don't have a "Park button" command built-in.

I've see there are a few tricks that involve passing dummy signals like ":Q#" (Quit) or switching to Land "#:AL#" that may work. Before digging deeper would a Python script be the best way to implement this i.e.running a script in EKOS in Sheduler or after imaging in File Settings?

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 1 day ago #28610

  • Barker
  • Barker's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
For the record I did resolve this using a python code and serial interface module (pyserial - see code extract below). So now I'm able to effectively 'park' the scope at a 'land' location (fixed AltAz LCD screen) so the scope stops tracking and then sleeps enabling me to take flats etc.

The options I tried:
a. Using the INDI module PyIndi - but couldn't find any commands to set land mode , sleep or park.
b. A hardware switch on the skysensor to turn it off - this still meant coding to get the scope into position

Let me know if you want more info.
Andrew

Python 3.5 code extract

import serial
import time
#import string, re
#
def start_telescope(port):
#connect to the scope on a port #linux: /dev/ttyUSB0 (check with lsusb)
print("trying to connect to port:{} ".format(port))
try:
serialobject = serial.Serial(port, 9600, timeout = 5)
if(serialobject.isOpen()):
print("port is connected")
#wakeup sleeping telescope
serialobject.write("#:hW#".encode())
print("trying to wake scope")
else:
print("-- scope not ready! --")
serialobject = "notready"
except:
print("serial port open error - already open?")
serialobject = "serialerror"
return(serialobject)

def get_telescope_position(serialobject):
#get RA and DEC
serialobject.write("#:GR#".encode())
RA = serialobject.read(10).decode('latin-1')
time.sleep(1)
serialobject.write("#:GD#".encode())
Dec = serialobject.read(10).decode('latin-1')
pos = [RA, Dec]
print('telescope pos is RA:{}, DE:{}, pos{}'.format(RA,Dec,pos))
return (pos)

def set_alignment(serialobject, amode): #set to land, polar or altaz mode
serialobject.reset_input_buffer() #flushInput()
serialobject.reset_output_buffer() #flushOutput()
if(amode == "Land"):
command = "#:AL#"
elif(amode == "polar"):
command = "#:AP#"
elif(amode == "altaz"):
command = "#:AA#"
else:
print(" alignmode not recognized...defaulting to altaz..")
command = "#:AA#"
print('alignment mode set to {}'.format(amode))
serialobject.write(command.encode())
time.sleep(1)
serialobject.reset_input_buffer() #flushInput()
return

def get_alignment(serialobject): # find the alignment mode
serialobject.reset_input_buffer() #flushInput()
serialobject.reset_output_buffer() #flushOutput()
command = chr(0x06)
serialobject.write(command.encode())
time.sleep(1)
result = serialobject.read(2).decode('latin-1')
time.sleep(1)
serialobject.flushInput()
if (result == 'A'):
mode = "altaz"
elif (result == 'L'):
mode = "Land"
elif (result == 'P'):
mode = "polar"
else:
mode = "unknown"
print('alignment mode is {}, {}'.format(result,mode))
return

def go_lcd(serialobject) :# only works if Land or AlAz True
alt= '#:Sa -0*50#' #:Sa sDD*MM#
az = '#:Sz 250*50#' #:Sz DDD*MM#
print('going to lcd at {}, {}'.format(alt,az))
serialobject.reset_input_buffer() #flushInput()
serialobject.reset_output_buffer() #flushOutput()
serialobject.write(alt.encode())
serialobject.write(az.encode())
command = "#:MA#"
serialobject.write(command.encode())
return

def halt_scope(serialobject):
serialobject.reset_input_buffer() #flushInput()
serialobject.reset_output_buffer() #flushOutput()
command = "#:Q#"
print('scope halted')
serialobject.write(command.encode())
serialobject.write("#:hN#".encode())
return

so = start_telescope('/dev/ttyUSB1')
for x in range(3):
get_telescope_position(so)
get_alignment(so)
set_alignment(so,'Land')
go_lcd(so)
get_alignment(so)
halt_scope(so)
so.close()

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 1 day ago #28612

To my knowledge, I think INDI has not solved the park problem.
(It may be functioning with the driver of the mount with some encoders, perhaps.)

I requested before, but it has not been improved in my environment.

driver
skywatcherAlt
Cerestrongps

indilib.org/forum/mounts/2778-about-alig...d-park-function.html

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

Last Edit: by T-Studio.

Parking scope without Park capability (LX200 & Skysensor) 3 months 1 day ago #28613

> Mr. Barker

Can I contact Jasem and allow all the drivers to run this scripting function?

The parking function of my driver seems to be simply recording absolute time.

Although SynScanAltAz does not have its recording place, UNPark is necessary to operate, and it stops with the Ekos controller each time in order to take a strange behavior.

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 1 day ago #28622

  • Barker
  • Barker's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
Jasem saw my issue without Park last week, so please feel free to share just be aware I'm not a real coder so somebody had better check that code!
Also I realised it would probably be easier to integrate using PyIndi code and I have found below step that act as a parking function in three steps:
1. find RaDec of your park (altaz position) - uses astropy module.
2. slew to that using PyIndi
3. switch off tracking using this
telescope_on_coord_set = device_telescope.getSwitch("ON_COORD_SET")
telescope_on_coord_set[0].s = PyIndi.ISS_OFF # TRACK
telescope_on_coord_set[1].s = PyIndi.ISS_OFF # SLEW
telescope_on_coord_set[2].s = PyIndi.ISS_OFF # SYNC
indiclient.sendNewSwitch(telescope_on_coord_set)
I make complete code and tests and send update then see what Jasem and experts think.
The following user(s) said Thank You: T-Studio

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 23 hours ago #28623

> Mr. Barker

It is wonderful to realize this function.

A little worrying thing is that it needs to be replaced with INDI's current parking function and it needs to be configured to work even at remote connection.

The current INDI driver has the configuration file locally and feels like using the configuration file on the operating side.
If you do not add the sync function of the INDI driver's configuration file, I think there is a danger that both remote connection and local connection will not be the same behavior.

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 21 hours ago #28624

> Mr. Barker

In order to realize the Park function without implementing the park function, we think that it is necessary to satisfy the following elements.

· Synchronization of local time of hand controller, synchronization of planetarium software, mounting position information when INDI driver, INDI driver is connected
· Discontinuation of current "park off" button
· Abolition of registration function by absolute position of INDI driver

The park function is useful for users who use mounts mounted at the same location, but if you use mounts that do not have that feature, synchronize the local time and send the current location information of the mount I will tell you Align them.
It is necessary to synchronize all of the INDI driver, planetarium software, hand controller from the PC.

Since the parking function of the current INDI driver is not such a specification, it is a very dangerous situation for mount users who do not have the park function.

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 16 hours ago #28634

LX200 SkySensor2000PC is based on LX200, but as I see here Parking is not enabled. However, parking is supported for LX200. Do you have any links to SkySensor2000PC commands? I couldn't find any online. We can verify if it supports the Meade parking command and it can be simply enabled.

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Parking scope without Park capability (LX200 & Skysensor) 3 months 4 hours ago #28674

> Mr.Jathm

I think Barker's script is useful for adding a parking function to a mount without a Park function.

Currently I use AdvancedVX (hand controller serial) with CerestronGPS driver.

There is no Park function in the hand controller function of AdvancedVX, but the Park function can be used with the INDI driver.
(The hand controller has home commands and custom home settings, but the driver does not have that setting.)

The park function needs to set the latitude and longitude of the current position, the park position of the mount, the alignment information, the current time and the tracking function to off, but the setting of the INDI driver inputs the latitude and longitude information It is that. Celestial body.

It is very dangerous to set a park point using only absolute position without alignment information, latitude / longitude information of current position, current time information.

There is no problem if the driver has the information necessary for the park function like EQMOD, but for drivers who do not have the parking function on the hand controller, I think that problems will arise in the current park setting.

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

Last Edit: by T-Studio.

Parking scope without Park capability (LX200 & Skysensor) 3 months 4 hours ago #28675

> Jathm

Another mount I use is the SynScanAltAz driver that uses Skywatcher Virtuoso, but this driver will not work until I press the ParkOFF button, but pressing this button moves the mount in an unexpected direction. (I am pushing the stop button immediately.)

Even if you press the park button, unexpected movement will occur. . .

I want to operate the system immediately at home position (Arctic), but I can not set the park's initial value from the driver.
(Everything except the Park function works well)

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

Parking scope without Park capability (LX200 & Skysensor) 3 months 3 hours ago #28677

One idea,
Can I set the EkosPark function based on Mr. Barker's script by excluding the parking function from the mount driver that does not have the park function?
Ekos has an alignment model, and we can also acquire the relative position of the mount from Kstars, so I think we can realize a trouble free park function.

In order to realize the park function at the driver level, I think that it is necessary to add the Park function of the EQMOD driver to other drivers.

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

Parking scope without Park capability (LX200 & Skysensor) 2 months 3 weeks ago #28774

  • Barker
  • Barker's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
Sorry for delayed reply it was clear here so priority went to photon collection!

Firstly Jasem,
The SS2K serial commands I used to 'park' (since park doesn't exist only 'Land') are in the code extract I gave in #28610 which works but needs more tests, the LX200 codes are published online (i.e. github.com/syntheticminds/raspberrysky/blob/master/telescope.py .

Here is key points extracted from my code:-
command = "#:AL#" (set mode to Land)
command = "#:MA#" (slew to AltAz coordinates previously given )
command = "#:Q#" (halt the scope) followed by with "#:hN#" (like sleep)

Even if I get this code working/hardened it requires dedicated serial connection using pypi serial, so its not a good INDI solution, hence I'm trying to implement using pyindi. I'm having some ON_COORD-SET Switch issues that I'll send in separate post for checking.

For T-studio,

I'll keep working on a PyINDI solution with my skysensor and simulator setup, if I get it working and hardened we can work on how to integrate it but at present it requires these things:-
a. A know 'park' position to be input in AltAz coords (dms)
b. The precise geodetic EarthLocation (gps, with elevation, locatime is converted to UTC by code)
c. mount setup in accordance with b (obviously will fail if mount thinks its somewhere else, as you say it's dangerous)

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

Time to create page: 0.271 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica