Skip to content
Snippets Groups Projects
Nicolò Caruso's avatar
Nicolò Caruso authored
Now using main branch wuth the commit for lyra.
76a2f7f8
History

ARPIST

Rust C++

ARPIST is an acronym for Autonomous Rocket Pointer Interactive Simulation of Telemetry (ARPIST in short).

In brief, ARPIST is a tool for simulating the transmission of telemetry data from a local device connected via serial port to a board with a radio module equipped, in order to test ARP response to data in a testing environment.

Getting started

Prerequisites

  • Rust: Rust need to be installed on the machine where you want to build and run ARPIST. You can find the installation instructions here.
  • C++: The boardcore library, which is used by ARPIST, is written in C++. Consult the Boardcore repo for the installation instructions.

Installation

Host-side

If you want to install just ARPIST (host tool) on your machine, you can do it with the following command:

cargo install -F tdl --git ssh://git@git.skywarder.eu/federico.lolli/arpist.git

If you plan instead to install also the board-side tool, you can clone first the repository:

git clone --recurse-submodules ssh://git@git.skywarder.eu/federico.lolli/arpist.git

And then install it with the following commands

cargo install -F tdl --path ./on-host

Board-side

If you want to install ARPIST (board tool) on your board, you can do it with the following command:

git clone --recurse-submodules ssh://git@git.skywarder.eu/federico.lolli/arpist.git

Then you can move to the on-device directory and build it with the following command:

cd arpist/on-device
./sbs -f arpist-device-sender

The above procedure should flash an entrypoint capable of decoding any mavlink messages coming from serial and sending it to the radio.

Developing

Both the host-side and the board-side scripts can be found in the justfile file for the sake of simplicity and ease of development.

First clone the repository:

git clone --recurse-submodules git@git.skywarder.eu:federico.lolli/arpist.git
cd arpist

Host-side

If you want to develop the host side of ARPIST, you can move to on-host directory and build it with the following command:

cargo build --release

The executable will be located in the target/release relative subfolder.

Board-side

If you want to develop the board side of ARPIST, you can move to on-device directory and build it with the following command:

./sbs -f arpist-device-sender

To flash the sender, if you want to test on a receiver board, you can flash a dummy receiver with the following command:

./sbs -f arpist-device-receiver

Usage

ARPIST needs a board with a radio module connected to a serial port to work. The board must have a specific entrypoint flashed (please refer to the installation paragraph above for this).

Once the board has the correct entrypoint flashed and is connected to the serial port, you can run ARPIST (host-side) as follows, after installing it.

The most common use case is to parse a CSV file containing telemetry data and send it to the board. You can do it with the following command:

arpist csv <telemetry_file>

NOTE: by default ARPIST will wait for a synchronization signal from the board before sending further data. If you want to disable this behavior, you can use the --no-sync option (or just the short -n flag).

arpist -n csv <telemetry_file>

By adding the --verbose option (or just the short -v flag), you can enable the verbose mode, which will print the sent packets to the standard output.

arpist -v csv <telemetry_file>

NOTE: if a single STM32 compatible board is connected to the serial port, ARPIST will automatically detect it and use it, so you can omit the --port <serial_port> option.

TDL Integration

If you want to send telemetry data to the board from a TDL file, you can do it with the following command:

arpist tdl --lat <latitude> --lon <longitude> --alt <altitude> <tdl_file>

Keep in mind that the --lat, --lon and --alt options are mandatory and must be specified in order to send the telemetry data to the board with the correct initial GPS position fix.

Detailed Usage

Usage: arpist [OPTIONS] <COMMAND>

Commands:
  tdl   build mavlink packets from a TDL file
  csv   parse mavlink packets from a CSV file
  help  Print this message or the help of the given subcommand(s)

Options:
  -p, --port <PORT>            The serial port to use
  -b, --baud-rate <BAUD_RATE>  baud rate [default: 115200]
  -n, --no-sync                disable SYNC MODE (wait for a sync signal from the device before proceding)
  -v, --verbose                The log level
  -h, --help                   Print help

CSV and TDL commands have their own options and arguments:

Here the CSV command usage:

parse mavlink packets from a CSV file

Usage: arpist csv <CSV_FILE>

Arguments:
  <CSV_FILE>  The CSV file to read from

Options:
  -h, --help  Print help

And here the TDL command usage:

build mavlink packets from a TDL file

Usage: arpist tdl --lat <LAT> --lon <LON> --alt <ALT> <TDL_FILE>

Arguments:
  <TDL_FILE>  The TDL file to read from

Options:
  -n, --lat <LAT>  initial GPS latitude
  -e, --lon <LON>  initial GPS longitude
  -u, --alt <ALT>  initial GPS altitude
  -h, --help       Print help