Skip to main content

OreSat C3 OLAF app

Project description

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. Cloning it and using pip install --editable <path to your oresat-configs repo> is very convenient.

Install dependencies

$ pip3 install -e . --group dev

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.

  • The-m all argument can be used to mock hardware (CAN bus is always required).
  • The -m opd argument would only mock the hardware for the OPD subsystem and expect all other hardware to exist.
  • The -m fram argument would only mock the F-RAM chip and expect all other hardware to exist.
  • The -m opd fram argument would both mock the hardware for the OPD subsystem and the F-RAM chip and expect all other hardware to exist.

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

  • docs/: Source of Read the Docs documentation.
  • oresat_c3/: Source code.
    • data/: Holds the CANopen EDS and DCF files for project.
    • drivers/: Fully stand-alone (doesn't import anything else from project) Pythonic drivers used by project. All drivers can mock hardware it's for.
    • protocols/: Anything dealing with packing or unpacking beacon and EDL packets.
    • services/: OLAF services, the "glue" between protocol, drivers, and/or subsystems with the CANopen node with a dedicated thread.
    • subsystems/: Anything dealing with the subsystems of the C3 other than the CAN bus.
    • templates/: The Flask-based templates to add OLAF's REST API to be used for development and integration (not used in production).
  • tests/: Unit tests.

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:

  • I2C_BUS_NUM: The I2C bus number used by the OPD and F-RAM.
  • FRAM_ADDR: The I2C address for the F-RAM chip. Must be in hex (e.g., "0x50")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oresat_c3-0.6.5.tar.gz (225.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oresat_c3-0.6.5-py3-none-any.whl (96.2 kB view details)

Uploaded Python 3

File details

Details for the file oresat_c3-0.6.5.tar.gz.

File metadata

  • Download URL: oresat_c3-0.6.5.tar.gz
  • Upload date:
  • Size: 225.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oresat_c3-0.6.5.tar.gz
Algorithm Hash digest
SHA256 cb5c11b72c7f1377bff282b174a1252a05d569b81f463d30657111ac99642e0a
MD5 4407825488f430f135ba099bc781cf83
BLAKE2b-256 b69851c0291c2ab1b0942956696927c4ada8e3b109cd473790e8cf1fe2959740

See more details on using hashes here.

Provenance

The following attestation bundles were made for oresat_c3-0.6.5.tar.gz:

Publisher: pypi.yaml on oresat/oresat-c3-software

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oresat_c3-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: oresat_c3-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oresat_c3-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0dcb0eef3ac438ba7586c2f76347208019a15f762a993f21eaf88127f94f7181
MD5 a36b5d13f81cc985d92b7dba6b43c70f
BLAKE2b-256 1e0a2e2e0405f8a75b46c3717bd1765a909ded57aec3e5a7b7aeec316d4a4fcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for oresat_c3-0.6.5-py3-none-any.whl:

Publisher: pypi.yaml on oresat/oresat-c3-software

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page