Howto:Build your own Panel or Cockpit - Communicating with the Simulator: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Discusses potential solutions for communication between physical cockpit elements and Flightgear)
 
Line 13: Line 13:
For the complete C172p there are:
For the complete C172p there are:


o 12 volume controls
* 12 volume controls
o 9 multi position switches
* 9 multi position switches
o 17 meter movements
* 17 meter movements
o 50 spst switches
* 50 spst switches
o 9 spdt switches
* 9 spdt switches
o 17 rotary encoders
* 17 rotary encoders
o 7 instruments with rotational movement  
* 7 instruments with rotational movement  
o 12 3 to 6 digit numbers
* 12 3 to 6 digit numbers
o 4 3 letter Alpha displays
* 4 3 letter Alpha displays
o 23 on/off indications on radios and instruments
* 23 on/off indications on radios and instruments


The simplest implementation would about 300 gpio pins to drive every hardware element.  We can reduce this number greatly by thinking carefully about how to  
The simplest implementation would about 300 gpio pins to drive every hardware element.  We can reduce this number greatly by thinking carefully about how to  
Line 39: Line 39:
## data going to numeric displays
## data going to numeric displays
## rotation and rotational position sensing for certain instruments
## rotation and rotational position sensing for certain instruments
[[Category:Cockpit building]]

Revision as of 06:53, 23 July 2016

The panel consists of a number of physical switches, rotary encoders, meter movements, numeric and alphanumeric displays, led indicators, rotation sensors. Even a small plane such as the C172P contains over 100 distinct items that must communicate with the simulator.

A way is needed to communicate changes for each of these elements to the appropriate item in the property tree in the running simulator.

From the hardware perspective this communication involves

  1. Physical cockpit hardware: switches, encoders, instrument movements etc.
  2. Low level interfaces to gather or distribute raw data for the cockpit hardware
  3. A Master Client to
    1. interpret between raw and simulator data
    2. handle communication between the cockpit and the simulator software

For the complete C172p there are:

  • 12 volume controls
  • 9 multi position switches
  • 17 meter movements
  • 50 spst switches
  • 9 spdt switches
  • 17 rotary encoders
  • 7 instruments with rotational movement
  • 12 3 to 6 digit numbers
  • 4 3 letter Alpha displays
  • 23 on/off indications on radios and instruments

The simplest implementation would about 300 gpio pins to drive every hardware element. We can reduce this number greatly by thinking carefully about how to

Some low level interfaces can use an ATMega processor of some type, probably an ATMEGA8535 or ATMEGA8515. Each of these can handle inputs and outputs for specific controls, switches, instruments and radios. Because the number of pins on the microprocessors is limited, there will be several of them. Other interfaces such as the display of 7 and 16 segment Numbers and letters can be handled using a driver chip such as the Max7221. Another approach is to use I2c or SPI to aggregate data from multiple cockpit elements into a single message.


From a software perspective, we'll need programming for:

  1. a telnet client handling communicating between a raspberry pi and Flightgear
  2. managing communication between the raspberry pi and lower level interfaces
  3. interpreting various types of simulator properties
  4. handling raw data for
    1. single and multi position switch data
    2. data from rotary encoders
    3. data going to numeric displays
    4. rotation and rotational position sensing for certain instruments