Package: oresat-c3
OreSat C3 SoftwareMain 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 commuication. It handles all commuications and controls
the state of the satellite.Note:For OreSat0, the C3 card used STM32F4 and ChibiOS, for that project
see theoresat-firmwarerepo and thesrc/f4/app_controldirectory.
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 ontop ofCANopen for Pythonproject. See theoresat-olafrepo for more info about OLAF.QuickstartFor development, installoresat-configsfrom the github repo athttps://github.com/oresat/oresat-configs(not from PyPI). That repo may have
changes that are not apart of the latest release yet.Install dependencies$pip3install-rrequirements.txtMake a virtual CAN bus (skip if using a real CAN bus)$sudoiplinkadddevvcan0typevcan
$sudoiplinksetvcan0upRun the C3 app$python3-moresat_c3Can select the CAN bus to use (vcan0,can0, etc) with the-b BUSarg.Can mock hardware by using the-m HARDWAREflag.The-m allargument can be used to mock hardware (CAN bus is always
required).The-m opdargument would only mock the hardware for the OPD subsystem and
expect all other hardware
to exist.The-m framargument would only mock the F-RAM chip and expect all other
hardware to exist.The-m opd framargument 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-hflag.A basicFlask-based website for development and integration can be found athttp://localhost:8000when the software is running.Project Layoutdocs/: 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/: TheFlask-based templates to add OLAF's REST API to be used
for development and integration (not used in production).tests/: Unit tests.DocumentationProject usesSphinxto generate documentation.Documentation is hosted onRead the Docs, seehttps://oresat-c3-software.readthedocs.io/en/latest/To manually build the documentation:$make-CdocshtmlOpendocs/build/html/index.htmlin a web broswerUnit TestsThis project uses python's build inunittestmodule for unit testing.To run units:$python3-munittestBy default all unit tests run with the hardware mocked. When running on the real
hardware set theMOCK_HWenvironment variable to"false"(case insensitive).To run units when on real hardware:$MOCK_HW="false"python3-munittestNote: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")