oresat / oresat-c3-software

Main application for Octavo A8 version of the C3 card
https://oresat-c3-software.readthedocs.io/en/latest/
GNU General Public License v3.0
3 stars 1 forks source link
satellite

OreSat C3 Software

Main application for Octavo A8 with Debian Linux version of the C3 card.

The C3 card is the "flight" computer of OreSat. C3 stands for command, control, and communication. It handles all communications and controls the state of the satellite.

Note: For OreSat0, the C3 card used STM32F4 and ChibiOS, for that project see the oresat-firmware repo and the src/f4/app_control directory. The C3 card was converted to Octavo A8 card to simplify the code base by swapping from heavily embedded system using ChibiOS to a general Linux-environment using Python and make to use existing Python libraries.

Like all OreSat software projects it is built using OLAF (OreSat Linux App Framework), which it built on top of CANopen for Python project. See the oresat-olaf repo for more info about OLAF.

Quick Start

For development, install oresat-configs from the GitHub repo at https://github.com/oresat/oresat-configs (not from PyPI). That repo may have changes that are not apart of the latest release yet.

Install dependencies

$ pip3 install -r requirements.txt

Make a virtual CAN bus (skip if using a real CAN bus)

$ sudo ip link add dev vcan0 type vcan
$ sudo ip link set vcan0 up

Run the C3 app

$ python3 -m oresat_c3

Can select the CAN bus to use (vcan0, can0, etc) with the -b BUS argument.

Can mock hardware by using the -m HARDWARE flag.

See other options with -h flag.

A basic Flask-based website for development and integration can be found at http://localhost:8000 when the software is running.

Project Layout

Documentation

Project uses Sphinx to generate documentation.

Documentation is hosted on Read the Docs, see https://oresat-c3-software.readthedocs.io/en/latest/

To manually build the documentation:

$ make -C docs html

Open docs/build/html/index.html in a web browser

Unit Tests

This project uses python's build in unittest module for unit testing.

To run units:

$ python3 -m unittest

By default all unit tests run with the hardware mocked. When running on the real hardware set the MOCK_HW environment variable to "false" (case insensitive).

To run units when on real hardware:

$ MOCK_HW="false" python3 -m unittest

Note: The follow environment variables are also available: