This is an add-on for the open source flight simulator FlightGear that adds basic support for shared control of an aircraft over the FlightGear multiplayer network. The main part is a set of generic Nasal modules and modified instrument files that form the core of the networked shared control functionality.
Note: The Open Scene Graph based FlightGear/CVS (developer's version) is needed to use this add-on. The aircraft will load in FlightGear 1.0.0 too but the copilot cannot see or touch anything in the cockpit.
Feel free to drop me an e-mail (see bottom of page for the address) if you find some of this software useful or have other comments, suggestions or questions.
The tar.gz archive for each aircraft should be extracted in $FG_ROOT/Aircraft/. You can find archives for all aircraft below in the hangar.
Currently there are two aircraft with dual control support.
The latest version of this aircraft is available in FlightGear/CVS.
Users of the latest FlightGear release should get the aircraft from
Pilot's Notes at the FlightGear wiki.
More information on airships in FlightGear.
See below for dual control usage instructions.
Download c172p Skyhawk with
dual control for FlightGear/git (former FlightGear/CVS)
Download c172p Skyhawk with dual control for FlightGear 2.0.0
This aircraft is based on David Megginson's c172p single control c172p.
The aircraft enables a pilot and copilot to jointly fly the aircraft over the FlightGear multiplayer network. Pilot and copilot currently have shared control over primary flight controls, throttle, mixture, elevator trim, flaps, brakes, cockpit switches, part of the radio stack and some instrument settings. The copilot has a subset of the full instrumentation, including airspeed, altimeter, VSI, HSI, turn coordinator, engine RPM and the radio stack. NavComm 1 and the first VOR indicator is best controlled by the pilot, while NavComm 2 and the corresponding VOR indicator is faster for the copilot.
The system consists of two "aircraft":
The pilot uses a special variant of the c172p, c172p-pilot.
The pilot need to specify the callsign of the copilot (other copilots
will be ignored).
Pilot usage example:
fgfs --aircraft=c172p-pilot --prop:/sim/remote/pilot-callsign="someone"
The copilot uses a special "aircraft", c172p-copilot, which
piggybacks on the designated pilot and captures the local control
inputs. A current limitation is that only the cockpit view (ctrl-v)
is jitter free. There is also a noticeable delay between control inputs
and effect, since they are passed via the the multiplayer protocol.
The severity of this delay depend on round trip time and some other
factors - the delay seems significantly longer than the round trip time
itself which is due to buffering in the MP protocol receiver.
That said, I have flown successfully as copilot in a setup with
100-120ms round trip time between both pilot and server and copilot and
server (total delay >500ms). Landing is a bit exciting in that
Copilot usage example:
fgfs --aircraft=c172p-copilot --prop:/sim/remote/pilot-callsign="anybody"
Note: The copilot will want to reset the view (ctrl-v) to avoid jitter as external views are jitter prone (this will be fixed later).
Status: Beta, perfectly flyable but some functions are not yet shared between the pilot and co-pilot.
The dual control mechanism is divided into to several parts:
- the generic core modules in DualControl/ ;
- the 3d instrument sharing wrappers in DualControl/instruments/ ; and
- the aircraft specific configuration in Nasal/c172p-dual-control.nas
and the c172p-co//pilot-set.xml files.
See the c172p-dual-control aircraft for an example how everything come together.
The aircraft specific dual control Nasal module MUST be loaded as aircraft_dual_control and MUST define the following variables and functions:
pilot_connect_copilot(copilot) : returns a list of DCT components
Does whatever initialization needed to connect the copilot and returns a list of dual-control-tools components whose update() method will be called (in list order) once per frame. copilot is the node hash for the base of the multiplayer tree for the copilot user.
pilot_disconnect_copilot() : void
Does whatever cleanup needed when the copilot disconnects.
copilot_connect_pilot(pilot) : returns a list of DCT components
Does whatever initialization needed to connect to the pilot and returns a list of dual-control-tools components whose update() method will be called (in list order) once per frame. pilot is the node hash for the base of the multiplayer tree for the pilot user.
Does whatever cleanup needed when the pilot disconnects.
pilot_type : string
The identifying string of the pilot aircraft is the path of the 3d model XML file of the pilot aircraft (as found in sim/model/path under the multiplayer entry).
copilot_type : string
The identifying string of the copilot aircraft is the path of the 3d model XML file of the copilot aircraft (as found in sim/model/path under the multiplayer entry).
back to Anders' FlightGear page
back to Anders' home page
Copyright (C) 2007 - 2009 Anders Gidenstam