An Open Source Program that allows users to interact with a Spacecraft in a lab environment, pre-launch.
For those who are new to the Space Industry and it's terminology, please refer to the Background section.
Also refer to the OSSAT Glossary for explanations of any terminology.
Otherwise, head to User Setup if you want to use the software, or Development Setup if you want to develop.
NOTE: This software is useful for lab testing a spacecraft, pre-launch. Different software would be used to communicate with the spacecraft in orbit. The communications protocol is not suitable for in-orbit communication, see The Spec for further details.
- Background
- Mercury GS Overview
- Manual
- Setup
- Creating Test Frames
- Designing The GUI
- Building the GUI
- Licenses
- Get Involved
Once a Spacecraft is in flight, operators will need to communicate with it. This is normally facilitated via Ground Stations located around the globe that use a radio link to send and receive packets of data.
During a typical mission, a Spacecraft will send stats down to the ground, which we call Telemetry. This could be temperature, battery charge, sensor readings, or any data point that you can think of. However, the Spacecraft would usually only transmit the most important Telemetry by itself due to limitations with the radio link. A Ground Station can request a particular Telemetry point by sending a Telemetry Request.
The Ground Station doesn't just monitor a Spacecraft's Telemetry, an operator can send commands to tell it to do things. This could be switching on a particular system, turning towards the Sun to charge batteries, synchronising the on-board time to the Ground or a variety of mission specific functions. These are facilitated by something called a Telecommand.
The Ground Station also needs to upload and download files. This could be downloading images taken by a Spacecraft camera, or uploading an operating schedule or code update to the Spacecraft.
Mercury GS fulfils the need to send Telemetry Requests, Telecommands and to display the Telemetry generated by the Spacecraft. It does this using a simple (non-flight) communications protocol. It also includes functions to synchronise the time and to upload and download files.
It represents a simple solution to test spacecraft functions without reliance on the complex protocols available for spacecraft communication.
In the future, we are hoping to integrate the Mercury GS functions into a Continuous Integration environment that will test the spacecraft functions continuously throughout the development.
Maybe you could help with this development?
The manual, which describes how to use Mercury GS, is located in the repo here.
NOTE: This initial version of Mercury GS only fully supports Windows. Linux and MacOS support is expected after further development.
If you wish to run Mercury GS as a User, follow these steps.
- Install Python3.
- Clone the repository onto your machine. Click the "Clone" button on the Github page.
- In the scripts folder are a number of scripts used to build the Python environment and run Mercury GS.
WINDOWS:
Run the batch file build_env.bat, you only need to do this once. Then execute run_env.bat when you want to run MercuryGS.
UNIX/MACOS:
Run the shell script build_env.sh, you only need to do this once. Then execute run_env.sh when you want to run MercuryGS.
- To communicate with Mercury GS via a terminal, emulating the link to a Spacecraft, follow the steps in Serial Comms Setup.
If you wish to develop Mercury GS, follow these steps.
-
A minimal Python3 installation is required, it is recommended to use virtualenv for clean Python installation and then install PyQt bindings. You can either run the scripts as shown in User Setup or manually like so:
-
Clone the repo and navigate to its directory.
-
Create a new virtual environment.
python -m venv MercuryGSEnv
- Activate the virtual environment.
For WINDOWS:
call MercuryGSEnv\Scripts\activate.bat
For LINUX/MAC:
source MercuryGSEnv/bin/activate
- Install the required packages.
pip install -r requirements.txt
- Make sure the following packages have been installed.
#PyQt5
python3 -m pip install PyQt5
# pyserial
python3 -m pip install pyserial
# PyQt5-tools
python3 -m pip install PyQt5-tools
# QtPy
python3 -m pip install QtPy
Another solution is to install a full Python IDE like Pycharm and install the packages through its package manager.
NOTE: For further information, design and requirements. You can find the Specification for Mercury GS here.
The low level drivers talk over a COM port that is configurable in the GUI. To emulate a connection with a SpaceCraft we must spoof a connection between two ports.
Download a program like HHD Virtual Serial Port Tools, create a virtual pair between two ports (for example COM1 and COM2), and then open a terminal program like TeraTerm to listen on one of them (COM2 for example). Settings are default 9600 baud, 8 data bits, 0 parity bits, 1 stop bit. The baudrate is configurable in the GUI on the "CONFIG" tab.
NOTE: This solution is only for Windows.
Frames can be sent to MercuryGS via a terminal, these are located in the Test Frames folder.
HHD Free Hex Editor was used to create these frames.
If you wish to edit the GUI, you will need Qt Designer.
For Qt Designer install, it's suggested to download the package from here, it is used to edit the UI layout - platform-comms-app.ui.
To use the qt ui file from the Qt designer, we need to build it to a python file.
You can do that by running: pyuic5 platform-comms-app.ui -o platform_comms_app.py
,
or by running the build script from the Scripts directory.
The built code of the current version of Mercury GS is included in the repo, so you will only need to rebuild the GUI if you make changes to it.
To run the files built by the last step, run "main.py" either via command line or through a Python compatible IDE.
Mercury GS includes other open source software, for licensing details, see here.
If you wish to contribute directly to the development of Mercury GS, have a look at the existing Github issues and register here.