sat-rs/satrs-example
Robin Mueller a6d9bee5df
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good
Merge branch 'sim-mgm-update' into serialization-prototyping
2024-05-25 13:09:25 +02:00
..
pytmtc try to make MGM set HK data work 2024-05-10 17:55:11 +02:00
src Merge branch 'sim-mgm-update' into serialization-prototyping 2024-05-25 13:09:25 +02:00
.gitignore ignore log file 2024-01-31 00:02:27 +01:00
Cargo.toml start integrating sim in example 2024-05-08 20:38:45 +02:00
CHANGELOG.md add license, ntoice files and CHANGElog where missing 2023-01-25 21:37:02 +01:00
LICENSE-APACHE add license, ntoice files and CHANGElog where missing 2023-01-25 21:37:02 +01:00
NOTICE update all NOTICE files 2023-01-25 21:39:35 +01:00
README.md pytmtc as regular package now 2024-05-09 11:07:08 +02:00

sat-rs example

This crate contains an example application which simulates an on-board software. It uses various components provided by the sat-rs framework to do this. As such, it shows how a more complex real on-board software could be built from these components. It is recommended to read the dedicated example chapters inside the sat-rs book.

The application opens a UDP and a TCP server on port 7301 to receive telecommands.

You can run the application using cargo run.

Features

The example has the dyn_tmtc feature which is enabled by default. With this feature enabled, TMTC packets are exchanged using the heap as the backing memory instead of pre-allocated static stores.

You can run the application without this feature using

cargo run --no-default-features

Interacting with the sat-rs example

Simple Client

The simpleclient binary target sends a ping telecommand and then verifies the telemetry generated by the example application. It can be run like this:

cargo run --bin simpleclient

This repository also contains a more complex client using the Python tmtccmd module.

Using the tmtccmd Python client

The python client requires a valid installation of the tmtccmd package.

It is recommended to use a virtual environment to do this. To set up one in the command line, you can use python3 -m venv venv on Unix systems or py -m venv venv on Windows systems. After doing this, you can check the venv tutorial on how to activate the environment and then use the following command to install the required dependency interactively:

pip install -e .

Alternatively, if you would like to use the GUI functionality provided by tmtccmd, you can also install it manually with

pip install -e .
pip install tmtccmd[gui]

After setting up the dependencies, you can simply run the main.py script to send commands to the OBSW example and to view and handle incoming telemetry. The script and the tmtccmd framework it uses allow to easily add and expose additional telecommand and telemetry handling as Python code. For example, you can use the following command to send a ping like done with the simpleclient:

./main.py -p /test/ping

You can also simply call the script without any arguments to view the command tree.