-
Notifications
You must be signed in to change notification settings - Fork 3
Running the satellite simulator
The satellite simulator is out-of-date and lacks feature parity with ex2_ground_staion_software (which will be used to communicate with the actual satellite). Features such as flight schedules and running commands imported from ex2_ground_station_software are unavailable in the satellite simulator.
To simulate command responses, please follow the instructions here on running comm.py with ex2_ground_station_software and enabling its dummy responses, which allows you to fake communications with a satellite.
Found below are instructions for running the satellite simulator, should you wish to still do so.
It is possible to simulate communication between the web application and the satellite using the following modules:
- the comm.py module
- the satellite simulator module
- the web application
First open three terminal instances to the location where you cloned the ex2_ground_station_website directory.
In each terminal instance, set the required environment variables for the web application using:
[unix-like OS] export PYTHONPATH=.
[unix-like OS] source ./env.sh
[windows] set PYTHONPATH=.
[windows] env.sh
Note if you are on windows you will have to use a command like set
in place of export
. Additionally, source ./env.sh
likely will not work so you may need to open the env.sh file and run the commands line by line (keeping the prior sentence in mind).
Next in one of the terminal instances, create a python virtual environment using:
[all] python3 -m venv venv
If the above command does not work, see the official virtual environment documentation and set up steps here.
Activate the python virtual environment:
[unix-like OS] source venv/bin/activate
[windows] venv\Scripts\activate.bat
Install the required pip packages:
[all] python3 -m pip install -r requirements.txt
In the first terminal instance, activate the python virtual environment:
[unix-like OS] source venv/bin/activate
[windows] venv\Scripts\activate.bat
Then execute the following command to run the satellite simulator:
[all] python3 satellite_simulator/sat_server.py
The satellite simulator executes for 10 minutes as defined here so if you plan on using it for a longer period of time, you can modify this line accordingly or re-run it thereafter.
In the second terminal instance, activate the python virtual environment:
[unix-like OS] source venv/bin/activate
[windows] venv\Scripts\activate.bat
Then execute the following command to run the comm.py module:
[all] python3 comm.py
You will then be prompted by the program as to whether you want to connect to the satellite or the simulator. Enter Y
or y
followed by enter to connect to the simulator.
The comm.py module executes for 10 minutes as defined here so if you plan on using it for a longer period of time, you can modify this line accordingly or re-run it thereafter.
In the third terminal instance, run the web application as described below.
If using docker to run the web application, install and run the docker container using the instructions outlined in INSTALL.md. Once the web application is up and running, open it in a Google Chrome window and log in.
You can then use the Live Telecommands terminal to send commands to the satellite (simulator). Responses to commands executed since opening the Live Telecommands terminals will be displayed in the terminal. All communications (sent to satellite and received from satellite) can be viewed under the Logs screen.
You will also be able to see which commands are queued to be sent to the satellite (in accordance with the is_queued
value associated with each communication log) during the next passover, under the Logs screen.