Remote control from another PC

Hello -
I have a question related to the remote control with another PC. How is it done? I see the manual says something with about an API and scripts with python, but I am not sure if SSH is required or something like that?

Hi,

You do not need SSH to control Skydel remotely. This can be done using a TCP/IP protocol to send various commands to the simulator. This protocol is packaged into an API available in C++, C# and Python. You can find them and many examples in the Documents/Skydel-SDX/API directory.

I am going to illustrate a basic example using python, but the concept is the same in the other implementations.

First you need to create a RemoteSimulator object
sim = RemoteSimulator()

Then you connect to the simulator instance on your distant machine
sim.connect("192.168.1.1") #replace with actual machine IP address

You can now call commands to setup the simulator. A list of commands is available in Documents/Skydel-SDX/API/Documentation.txt. Or you can simply change things in the UI and check in the Automate page which commands your actions translated to.
Commands can be sent using the call method:
sim.call(New(True)) # Will call the New command, resetting the configuration to its default values

Then the start method will start the simulation: sim.start()

Once the simulation is started or armed (through the arm method), you can still call commands that can change the simulation at runtime. You can also post them so that they are executed at a certain time:
sim.post(SetSatellitePower("GPS", 16, 5, False), 10) # Will set the GPS satellite 16 power offset to 5 at the 10th second of simulation

Hope this helps! Do not hesitate to ask more questions if you have any!

4 Likes