
Find your way into flight simulator cockpit construction
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:
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-
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-
|
|
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-
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-
SimConnect is based on a client-
SimConnect uses asynchronous communication because it is more safe for use in multi-
The recommended method of writing an add-
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.