FScockpit  HOME

What’s new ?

FS Cockpit changes

Find your way into flight simulator cockpit construction

FScockpit  HOME.

1: EXAMPLES.

2: COMMUNITY.

- An impression.

- User groups and forums.

- Links to other cockpit builders.

- Links to suppliers.

3: HOW TO GET STARTED.

- Building blocks of a flight simul....

- The 5 questions to ask .

- Cockpit specifications .

- Panel construction.

- Hull construction.

4: GAME PC.

- Microsoft Flight Simulator.

- Interface software.

- Mouse simulation.

5: COCKPIT INTERFACE.

- Keyboard emulator.

- Special interface solutions.

- PC and interface cards.

- Micro controllers.

- Data communication.

6: COCKPIT ELEMENTS.

- Various switches.

- Panel mounted indicators.

- Mechanical gauges.

- CRT-based gauges.

- Radio and navigation instruments.

- Flight controls.

- Display system.

- Sound system.

- Speech system.

- Vibration system.

- Motion system.

- G-force system.

- Ventilation system.

- Complementary simulation.

7: FINAL REMARKS.

-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -.

Word from the author.

What's new ?.

Acknowledgements.

Copyright & Disclaimer.

Contact information.

4.2 Interface software

 

The designation "interface software" is used here for the logical connection between the Microsoft Flight Simulator and the flight simulator cockpit. Basically there are 2 groups of interfacing software:

 

  1. Interfacing software that directly controls cockpit elements. The most obvious example is the software that comes with ready made cockpit parts like a joystick or the pedals. But there are also interface boards that are recognized as an a standard device (e.g. the 32 digital input controller (SIMKITS) is recognized under Windows as a standard Game Controller without any additional driver software).
  2. Interfacing software that communicates Microsoft Flight Simulator data to a controller. It is the task of the controller (a separate device) to drive the various cockpit devices. The controller contains the actual programming logic for this (as described in section 5). Thus the interfacing software focuses only on the communication of Microsoft Flight Simulator data to an other computing device and vice versa.

 

Note that not all interfacing has to be done by means of software as described above. The input for Microsoft Flight Simulator that can be done by means of a keyboard, can also be done by means of keyboard emulation (discussed in section 5).

 

The table below gives an overview of the approaches that can be followed to interface the Microsoft Flight Simulator from a software technology point of view. A number of suppliers of interface devices (discussed in section 5) offer easy to use software to control their interface boards and prevent that a cockpit builder has to write his own interfacing software.

 

Device driver

 

A device driver is typically used by suppliers of joysticks, pedals and yokes. See the Windows Driver Development Kit for details on this issue. There is no formal Microsoft Flight Simulator specific documentation on device drivers.

 

Module in Microsoft Flight Simulator

 

This is a separate developed DLL that when included in the Microsoft Flight Simulator "module directory" automatically is recognized and activated. There is little information about how to construct a module for Microsoft Flight Simulator. The subject is discussed on some of the larger forums, there you can also ask around for details. In the Dai Griffiths gauges development tutorial (search for it on avsim.com) the source code of the FSSound module by Daniel Steiner is included and gives at least a hint on how to proceed for FS2000. With the facilities provided by SimConnect in FSX this route does not seem logical any more for most of the applications.

 

Separate program

 

With respect to flight simulator cockpit development a separate program on the Game PC that communicates with the Microsoft Flight Simulator seems to be the golden route at this moment. Up to and including FS2004 most of these programs used the additional module FSUIPC developed by Peter Dowson to gain access to Microsoft Flight Simulator. However with FSX Microsoft introduced a formally supported interface module called SimConnect. Both are described in the next sections. There are some other parties that developed interface software for FS2004 or earlier versions, but given the availability of SimConnect since FSX these are not considered any more in this text.

 

4.2.1 The Dowson route: FSUIPC

 

If there would be a Nobel Price for Flight Simulation, one of the holders would be Peter Dowson for his very fundamental and significant contribution to interfacing with the Microsoft Flight Simulator and opening up the market for serious add-on development. Until the introduction of FSX he offered the only serious programming interface for the Microsoft Flight Simulator, facilitating a large add-on community including cockpit builders. His interfacing software FSUIPC (Peter Dowson) is a module that has to be included with the Microsoft Flight Simulator and facilitates the exchange of data with the Microsoft Flight Simulator for programs written by third parties. Based on FSUIPC utilities, programs and gauges interfacing with the Microsoft Flight Simulator are developed by Dowson and many others. Some of this software supports flight simulator cockpit development and will be addressed in other parts of this text. In this section we will focus on the use of the FSUIPC module for interfacing purposes, but it should be said that FSUIPC contains a substantial set of additional features.

 

The FSUIPC module comes with a SDK that allows developers to interact with this module. It is possible to address FSUIPC from within a self developed module to be included with the Microsoft Flight Simulator, but it is also possible to address FSUIPC from within a separate program. This software can be more or less written in the programming language of your choice. Included are instructions for C/C++, Delphi, Visual Basic, ASM and Borland C++. The actual interfacing by this program is made very simple and limited to 5 instructions as shown in the table below.

FSUIPC_Open

 

Open the interface to FSUIPC from calling program.

 

FSUIPC_Close

 

Close the interface to FSUIPC from calling program.

 

FSUIPC_Read

 

Write value to Microsoft Flight Simulator. This is done referring to an offset that again refers to a variable in Microsoft Flight Simulator (this is a heritage from the Microsoft Flight Simulator 98 era).

FSUIPC_Read( <offset>,<size of data>,<pointer to result>,<error flag> )

 

FSUIPC_Write

 

Read value from Microsoft Flight Simulator. This is done referring to an offset that again refers to a variable in Microsoft Flight Simulator (this is a heritage from the Microsoft Flight Simulator 98 era).

FSUIPC_Write( <offset>,<size of data>,<pointer to input>,<error flag> )

 

FSUIPC_Process

This is the call which actually operates the interface. All the requests accumulated using the Read and Write calls are processed. So an ongoing communication with Microsoft Flight Simulator consists out of a repetition of Read/Write and Process.

 

Included in the documentation is a long list of offsets (30+ pages) which provides access to almost all relevant variables within Microsoft Flight Simulator. Example:

 

Offset

 

Size

 

Use

 

0020

 

4

 

Ground altitude in Meters x 256. (see also offset 0B4C)

 

0024

 

varies

 

Zero terminated string giving the Start-Up situation or flight name, including the path from the FS folder (usually PILOTS\ …)

 

etc.

 

etc.

 

etc.

 

For running applications using FSUIPC on a separate PC in a network (IPX/SPX or TCP/IP) WideFS (Peter Dowson) was developed. WideFS comes with 2 programs: WideServer and WideClient. The concept of WideFS is that the Microsoft Flight Simulator runs on the server machine also containing WideServer. The program WideClient, together with the utility program runs on an other machine in the network (for programs that place their windows within the Microsoft Flight Simulator window the windows are placed in the WideClient window). In principle one should not notice any effect on frame rates at all. Each server can serve many clients, but each client only talks to one server. WideFS can be used by any utility that uses FSUIPC, it requires the setup of a network, but does not require any programming activities.

 

For users of the Microsoft Flight Simulator add-on Level-D 767 there is specific software called FSCONV by Nico Kaan that provides new FSUIPC offsets for the Level-D add-on by bridging FSUIPC and the Level-D SDK.

 

4.2.2 The Microsoft route: SimConnect

 

In order for third party software to access data and events internal to Flight Simulator X SimConnect is developed. This has been a very significant step in making the Microsoft Flight Simulator a truly open platform. Add-on components for FSX can be written in C, C++, or if the managed API calls are being used, any Microsoft .NET language such as C#.net or VB.net. Typically the components will perform one or more of the following:

 

 

SimConnect is based on a client-server architecture and sees the Flight Simulator as a server. The data, events, and system calls available via the SimConnect interface support the vast majority of data and events that exist inside FSX.

 

SimConnect uses asynchronous communication because it is more safe for use in multi-processor or multi threaded applications, it uses processing cycles more efficiently and provides greater server application stability. A publish/subscribe method is used where the client will request a data packet or send an event, and the server will process that request at a time commensurate with the priority level of the request. The process is, however, considered asynchronous since it is never handed over to the client application.

 

The recommended method of writing an add-on is to build it out-of-process, as an application (an .exe file) rather than in-process, as a library (a .dll file). This is because out-of-process applications provide more stability, if they crash they will typically will not crash FSX, and are easier to build, test and debug. Out-of-process also supports managed code, and therefore applications can be written in .NET languages. The .EXE can be executed (with the same code) on both the same PC as Flight Simulator X or on a different PC using a TCP/IP connection. The TCP/IP communication is handled completely by SimConnect.

 

The SimConnect SDK including detailed documentation and example code is included with the deluxe edition of FSX. Examples of other sources of information regarding the use of SimConnect are: FSdeveloper, In the pipe and AVSIM SimConnect forum.

 

When you need to write your own software to interface with FSX then SimConnect is the preferred route to go. It is supported by Microsoft and in the coming period you will see an increase in publications and example source files spread over internet.