Skip to content
Sven Steudte edited this page Jan 28, 2016 · 3 revisions

This is a balloon tracking software which can be used on multiple trackers. This is the documentation of the software.

Modules and drivers

The tracking software is driver and module driven. Drivers are implementation of a specific peripheral hardware component like the camera or radio. The modules are accessing the drivers. Modules provides the functionality which we expect, like doing RTTY or logging data. The modules available are:

Name Short name Functionality
TRACKING Manager TRAC Collects all the data from the peripheral hardware and put them togeter in a struct which can be used by POSITION or LOG
POSITION POS Generates position messages, provides the protocol (e.g. APRS, Habhub RTTY telemetry)
SATELLITE SAT Does the same like POSITION but its specified to communicate with sats like ISS APRS
LOG LOG Maintains a log from the bundles which are generated by the TRACKING Manager.
IMAGE IMA Operates the camera and takes pictures
RADIO RAD Operates the 2 radios on the board

Drivers are:

Name Short name Functionality
BME280 BME Provides the BME280 driver
MPU9250 MPU Provides the MPU9250 driver
MAX MAX Provides the driver for MAX6, MAX7 or MAX8 (The protocols are almost identical)
Si4464 SI Provides the driver for the Si4464
OV9655 OV Provides the OV9655 driver

All modules can be run optional. So no modules configured means no operation. The modules can be configured in the config.h. For a reasonable operate, there are some modules required like the TRACKING Manager which collects data from the sensors and RADIO which controls the radios.

To identify all modules and drivers, they have a specific name with capital letters, to give a better understanding. Some modules are shortened like Tracking manager => TRACKING. To visualize which component actually does the action, the specfic short module name in printed in the serial debug port:

[ 0.0000][ ] MAIN > Startup
[ 0.0021][ ] MAIN > Startup SENSOR I2C
[ 0.0067][ ] RAD > Startup module RADIO
[ 0.0109][ ] TRAC > Startup module TRACKING MANAGER
[ 0.0164][ ] RAD > Setup radio mailbox
[ 0.0208][ ] TRAC > Module TRACKING MANAGER info
Cycle: 120 sec
[ 0.0300][ ] TRAC > Do module TRACKING MANAGER cycle
...

This a data flow diagram of all components (for Pecan Pico 7):

DRIVER | DATA PROCESSING MODULES | DRIVER
------------+--------------------------------------------------------------+------------------

Function call communication ---+---------------------------------------+
| |
MPU9250 --+ | +---> SATELLITE ---+ |
| V | | V
BME280 ---+---> TRACKING Manager -----+---> POSITION ----+------> RADIO ---+---> RADIO1 (2m)
| | | Λ |
MAX ------+ +-----> LOG -------+ | +---> RADIO2 (70cm)
| |
OV9655 or ---------------------------------> IMAGE ------+ |
OV2640 Λ |
| |
+--- Function call communication +--- Mailbox communication

RTOS

The project uses ChibiOS as RTOS. ChibiOS provides many different chips and provides bus drivers, so there is no need to customize code for a different board. This software uses ChibiOS 3.0_stable. Modules and the main function have their own thread while drivers don't.

Debug port

Each board should have a debug port available to see whats going on. It's operating 115k2 8n1. The printout should maintain a specific format in order to keep it readable

[System Time][Tracing level] Short module name > Message

There are 4 Debug levels: INFO, DEBUG, WARN, ERROR. In order to see warnings and errors more clearly the INFO level is not prited:

[ 0.0000][ ] MAIN > Startup
[ 0.0021][ ] MAIN > Startup SENSOR I2C
[ 0.0025][ERROR] MAIN > Could not startup I2C
[ 0.0067][ ] RAD > Startup module RADIO
...

This could be a reasonable printout of the tracker:

[ 0.0000][ ] MAIN > Startup
[ 0.0021][ ] MAIN > Startup SENSOR I2C
[ 0.0067][ ] RAD > Startup module RADIO
[ 0.0109][ ] TRAC > Startup module TRACKING MANAGER
[ 0.0164][ ] RAD > Setup radio mailbox
[ 0.0208][ ] TRAC > Module TRACKING MANAGER info
Cycle: 120 sec
[ 0.0300][ ] TRAC > Do module TRACKING MANAGER cycle
[ 0.0355][ ] GPS > Init pins
[ 0.0391][ ] GPS > Switch on
[ 1.0068][ ] MAIN > Current time: 2000-01-01 00:00:01:015
[ 1.0112][ ] IMG > Startup module IMAGE
[ 1.0157][ ] PAC > Startup module PAC1720
[ 1.0204][ ] MAIN > Module TRAC OK
[ 1.0244][ ] IMG > Module IMAGE info
Cycle: 300 sec
Power: 10 dBm
Frequency: 434.500 MHz (current)
Modulation: 2FSK
Protocol: SSDV
[ 1.0502][ ] MAIN > Module RAD OK
[ 1.0541][ ] IMG > Do module IMAGE cycle
[ 1.0587][ ] MAIN > Module IMG OK
[ 1.0626][WARN ] IMG > Module IMAGE not fully implemented
[ 1.0683][ ] IMG > Init camera I2C
[ 1.0724][ ] CAM > Init pins
[ 1.0760][ ] CAM > Switch on
[ 1.0795][ ] CAM > Transmit config to camera
...

Clone this wiki locally