×

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

Bi-monthly release with minor bug fixes and improvements

Bisque Paramount - INDI driver for TSX TCP API?

  • Posts: 152
  • Thank you received: 20
OK... Here's a very quick and dirty example. Opening a TCP connection to TSX on port 3040 and sending the following will cause TSX to slew the mount to the specified RA and Dec.

/* Java Script */
/* Socket Start Packet */
 
var MyRA = 3.0;
var MyDec = 7.125;
 
var Out;
// slew to RaDec, 
Out = sky6RASCOMTele.SlewToRaDec(MyRA, MyDec, "MyObject")
 
/* Socket End Packet */

So you'd want to pass the RA and Dec into this script as variables, open the socket (if not already open) and send the above. If possible, it would be good to have these commands broken out into config snippets that can be adjusted without changing the underlying driver. This would allow for customizations of the script to accommodate for error checking, requesting feedback during the slew and such.

Closed loop slew is next.
7 years 11 months ago #8347

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

  • Posts: 152
  • Thank you received: 20
Now that I think about this, it would be awesome if INDI had a "scriptable" driver that can be instantiated such that when provided certain commands and/or information a configured script is executed by the driver. This would abstract scriptable items and present them as a standard INDI hardware driver I think.

Example:

Scriptable INDI driver set up to control a mount. Client passes a slew command to an RA/Dec to the driver, which then has a configuration to take that info and pass it to a configureable script, wait for a response, and so on.
7 years 11 months ago #8348

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

What actually gets sent over the wire? What does sky6RASCOMTele.SlewToRaDec(MyRA, MyDec, "MyObject") do?

INDI has scripting for over 13 years now. You can do it via Python, DBUS, or via INDI scripting tools.
7 years 11 months ago #8349

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

  • Posts: 152
  • Thank you received: 20

That snippet is exactly what gets sent over the wire in clear text. Simply open a TCP socket to port 3040 of the system running TSX and dump the snippet on the wire. sky6RASCOMTele.SlewToRaDec(MyRA, MyDec, "My Object") will slew the Paramount (or other) mount to the MyRA and MyDec as set in the variables. "My Object" is a text string the function requires. I think it just lets you name the object so it appears in the TSX GUI, but I haven't seen it show. Here is what the docs say about it:
void sky6RASCOMTele::SlewToRaDec	(	double 	dRa,
double 	dDec,
QString 	lpszObjectName 
)		
slot
Slews the telescope to the specified right ascension and declination coordinates.
 
Note - Coordinates used to slew the telescope are normally for the current epoch.
 
Parameters
dRa	A double that specifies the right ascension to slew the telescope.
dDec	A double that specifies the declination to slew the telescope.
lpszObjectName	A string that specifies the object's name.


Understood. I assumed this to be client-side scripting. You can place a script under a driver to interact with something? In other words, the driver can act as an abstraction for the script?
7 years 11 months ago #8352

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

  • Posts: 456
  • Thank you received: 76
So I wonder if something like this would work from bash as an example to hack around with.
echo "/* Java Script */
/* Socket Start Packet */
 
var MyRA = 3.0;
var MyDec = 7.125;
 
var Out;
// slew to RaDec, 
Out = sky6RASCOMTele.SlewToRaDec(MyRA, MyDec, "MyObject")
 
/* Socket End Packet */" | nc tsx-hostname 3040

replace 'tsx-hostname' above with the actual host or ip-address
If anyone wants to send me a paramount mount to test with I'd be delighted :P
Last edit: 7 years 11 months ago by Derek.
7 years 11 months ago #8360

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

  • Posts: 69
  • Thank you received: 12
I attach C programs that I use to communicate with TSX to control a Paramount MYT. Those are basic commands to
Sync
Slew
Abort
Get RA and DEC
Home
The following user(s) said Thank You: Jasem Mutlaq
7 years 11 months ago #8366
Attachments:

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

Thanks Anat! This would make developing an INDI driver straightforward. I wonder if there is a better way to communicate with the mount directly with the Javascript TCP server?
7 years 11 months ago #8368

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

  • Posts: 69
  • Thank you received: 12
Hi Jasem

You may see the website for the complete protocol
www.bisque.com/scriptTheSkyX/

It works with any mount connected to TSX as well.

Anat
7 years 11 months ago #8370

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

  • Posts: 152
  • Thank you received: 20
Anat - thank you!

knro - I may be able to open up the TCP port so you can access it and test against it. I'll need to know your IP address. Feel free to PM me if this would be useful.
7 years 11 months ago #8378

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

  • Posts: 152
  • Thank you received: 20

Can you elaborate on what you might consider to be better? I know the system can execute short programs in javascript. Is that what you mean?
7 years 11 months ago #8379

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

Sorry I phrased it incorrectly. INDI mount drivers usually directly control the mount, not via some 3rd party server. If this is implemented as a driver, it would require the SkyX TCP server to be running, while a direct driver to the physical port of the mount would not require this additional layer in the middle.
The following user(s) said Thank You: Greg
7 years 11 months ago #8382

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

I'm starting to write the TSX TCP driver, who can test?
7 years 1 month ago #15005

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

Time to create page: 0.735 seconds