Debian Codegraph @

Aircraft/Generic/DualControl/README.dual-control

raw
1 Dual control for FlightGear/CVS (copilot OSG only)
2 --------------------------------------------------
3
4 Anders Gidenstam (anders at gidenstam dot org)
5
6 This collection of Nasal code and instruments enables a pilot and
7 copilot to jointly fly an aircraft over the FlightGear multiplayer
8 network. Pilot and copilot can have shared control over primary
9 flight controls, throttle, mixture, elevator trim, flaps, brakes,
10 cockpit switches, part of the radio stack and instrument settings
11 and so on.
12
13 To use the system two "aircraft" needs to be created:
14 - The pilot uses the original aircraft (or a variant thereof).
15 The pilot need to specify the callsign of the copilot (other copilots
16 will be ignored).
17
18 Usage example:
19 fgfs --aircraft=ZLT-NT --prop:/sim/remote/pilot-callsign="copilot"
20
21 - The copilot uses a special "aircraft", <aircraft>-copilot, which
22 piggybacks on the designated pilot and captures the local control
23 inputs. A current limitation is that only the cockpit view
24 is jitter free. There is also a noticeable delay between control inputs
25 and effect, since they are passed via the the multiplayer protocol.
26 The severity of this delay depend on round trip time and some other
27 factors - the delay seems significantly longer than the round trip time
28 itself which is due to buffering in the MP protocol receiver.
29 That said, I have flown successfully as copilot in a setup with
30 100-120ms round trip time between both pilot and server and copilot and
31 server (total delay >500ms). Landing is a bit exciting in that
32 case, however.
33
34 Usage example:
35 fgfs --aircraft=ZLT-NT-copilot --prop:/sim/remote/pilot-callsign="pilot"
36
37 Visit http://www.gidenstam.org/FlightGear/DualControl/ for the latest
38 information.
39
40
41 Developer notes
42 ---------------
43
44 The dual control mechanism is divided into to several parts:
45 - the generic core modules in DualControl/ ;
46 - the 3d instrument sharing wrappers in DualControl/instruments/ ; and
47 - the aircraft specific configuration in Systems/ZLT-NT-dual-control.nas
48 and the ZLT-NT/-set/-copilot-set files.
49
50 See the ZLT-NT aircraft for an example how everything come together.
51
52 aircraft_dual_control
53 ---------------------
54
55 The aircraft specific dual control Nasal module MUST be loaded as
56 aircraft_dual_control and MUST define the following variables and
57 functions:
58
59 pilot_connect_copilot(copilot) : returns a list of DCT components
60 Does whatever initialization needed to connect the copilot and
61 returns a list of dual-control-tools components whose update() method will
62 be called (in list order) once per frame.
63 copilot is the node hash for the base of the multiplayer tree for the
64 copilot user.
65
66 pilot_disconnect_copilot() : void
67 Does whatever cleanup needed when the copilot disconnects.
68
69 copilot_connect_pilot(pilot) : returns a list of DCT components
70 Does whatever initialization needed to connect to the pilot and
71 returns a list of dual-control-tools components whose update() method will
72 be called (in list order) once per frame.
73 pilot is the node hash for the base of the multiplayer tree for the
74 pilot user.
75
76 copilot_disconnect_pilot() :
77 Does whatever cleanup needed when the pilot disconnects.
78
79
80 pilot_type : string
81 The identifying string of the pilot aircraft is the path of the
82 3d model XML file of the pilot aircraft (as found in sim/model/path
83 under the multiplayer entry).
84
85 copilot_type : string
86 The identifying string of the copilot aircraft is the path of the
87 3d model XML file of the copilot aircraft (as found in sim/model/path
88 under the multiplayer entry).
89
90