Open Source Flight Intrument Documentation [index]


Software Design

Execution Threads

Software runs on a pre-emptive time slice kernel.  This allows multiple execution threads to run independently, simplifying the application code.  These threads include:

Portable Interfaces

The portable interfaces allow the majority of the code to remain truly portable by not requiring any knowledge of the platform that it is executing on.

Drivers Interface

This interface includes functions to perform low level access to the hardware devices. An example of the type of functions that might appear in this interface is as follows.

Platform Interface

This interface includes functions that are implemented differently on different compilers and/or operating systems. An example of the type of functions that might appear in this interface is as follows.

Non-Portable Modules

The following modules may be used to implement the non-portable side of the portable interfaces.

Name Description Interface Implemented
DRV Flight Instrument Hardware Drivers drivers
SIM Flight Instrument Hardware Simulators drivers
G12 GNU HC12 on target hardware platform
ICC ImageCraft ICC12 on target hardware platform
PSX GCC on Posix compliant Unix platform
QTG
QT cross platform GUI development framework
platform

Only one of the modules for each of the portable interfaces is linked into any given application.

Hardware Drivers (DRV)

The DRV module contains all of the low level hardware driver code. The code implements the drivers interface for real hardware.

Hardware Simulators (SIM)

The SIM module will attempt to mimic real hardware when applications are built to run on a PC platform. SIM will implement all of the drivers interface functions. For example, in SIM the function to read the altitude A2D channel could return whatever value is being simulated at the time. An additional function could also be provided which sets the value to be simulated in SIM. SIM may need to be further divided into other modules for example to simulate either a graphical or character based LCD.

GNU HC12 Target (G12)

The G12 module contains all code that is specific to the GNU development tools and the target platform, and is not already covered by the hardware interface.  This includes the kernel code.  G12 implements the platform interface.

QT GUI Simulation (QTG)

The QTG module contains all code that is specific to the Qt cross platform development framework, and is not already covered by the hardware interface.  This includes the kernel code.  QTG implements the platform interface. The Qt framework is designed to run on several different PC platforms such as 32-bit Windows and Linux.

As well as implementing the platform interface, QTG contains graphical emulation of several hardware components such as the LCD displays, A2D sensors and the keypad.  This is used to build PC applications that simulate the look and feel of the instruments without needing any OSFI hardware.

Others

Other modules that implement the platform interface will be added as the need arises.

Portable Modules

The following modules are used to implement the portable side of the portable interfaces.

Utilities (UTL)

UTL contains commonly used generic constructs such as linked lists, fifos, imperial conversions etc.

Measured Quantities (MSQ)

This module contains code to calculate and store the various quantities that are measured by the flight instruments. eg. Altitude, Vario, Airspeed, Speed to Fly, Wind Speed, Wind Direction etc.  MSQ has its own execution thread for regularly polling the various sensors whose readings it uses in its calculations.

User Settings (USR)

This module contains code to store and retreive various user settings. eg. QNH, Air Speed Calibration, Glider Polar etc.

Asynchronous Communications (COM)

This module contains code to manage input and output buffering of serial data.

NMEA Protocol (NME)

This module will provide functions to send or receive data through a serial port using NMEA Protocol.

Garmin Protocol (GMN)

This module will provide functions to send or receive data through a serial port using Garmin Protocol.

Screen Management (SCR)

SCR contains a list of the available screens and is responsible for keeping track of which one is currently active. SCR provides a common interface for routing button press events and requests to refresh screens to the active screen.
SCR has its own execution thread for detecting button presses.

Character Based Screens (CBS)

CBS is a collection of screen definitions for a character based LCD. It defines how each screen is drawn and how each screen reacts to button press events.

Graphics Based Screens (GBS)

GBS is a collection of screen definitions for a graphical LCD. It defines how each screen is drawn and how each screen reacts to button press events.

Logging (LOG)

LOG provides code to store and retreive flight statistics and log data.  LOG has its own execution thread for regularly logging data.

PDA-POD Specifics (POD)

This module will contain scripts and code that is specific to the PDA-POD software. This will include makefiles that specify which modules are to be linked.

Character Based Instrument Specifics (CBI)

This module will contain scripts and code that is specific to the character based flight instrument software, that is not covered by CBS. This will include makefiles that specify which modules are to be linked.

Graphical Flight Instrument Specifics (GFI)

This module will contain scripts and code that is specific to the graphical flight instrument software, that is not covered by GBS. This will include makefiles that specify which modules are to be linked.

Integration Tests (TST)

This module will contain all the integration test code and makefiles. Integration tests test the interaction between the various software modules and that they integrate as designed.