1 // net_ctrls.hxx -- defines a common net I/O interface to the flight
4 // Written by Curtis Olson - http://www.flightgear.org/~curt
7 // This file is in the Public Domain, and comes with no warranty.
12 #ifndef _NET_CTRLS_HXX
13 #define _NET_CTRLS_HXX
17 # error This library requires C++
20 const int FG_NET_CTRLS_VERSION = 24;
23 // Define a structure containing the control parameters
29 int version; // increment when data values change
38 double aileron; // -1 ... 1
39 double elevator; // -1 ... 1
40 double rudder; // -1 ... 1
41 double aileron_trim; // -1 ... 1
42 double elevator_trim; // -1 ... 1
43 double rudder_trim; // -1 ... 1
44 double flaps; // 0 ... 1
46 // Aero control faults
47 bool flaps_power; // true = power available
51 int num_engines; // number of valid engines
52 bool master_bat[FG_MAX_ENGINES];
53 bool master_alt[FG_MAX_ENGINES];
54 int magnetos[FG_MAX_ENGINES];
55 bool starter_power[FG_MAX_ENGINES]; // true = starter power
56 double throttle[FG_MAX_ENGINES]; // 0 ... 1
57 double mixture[FG_MAX_ENGINES]; // 0 ... 1
58 double condition[FG_MAX_ENGINES]; // 0 ... 1
59 bool fuel_pump_power[FG_MAX_ENGINES];// true = on
60 double prop_advance[FG_MAX_ENGINES]; // 0 ... 1
63 bool engine_ok[FG_MAX_ENGINES];
64 bool mag_left_ok[FG_MAX_ENGINES];
65 bool mag_right_ok[FG_MAX_ENGINES];
66 bool spark_plugs_ok[FG_MAX_ENGINES]; // false = fouled plugs
67 int oil_press_status[FG_MAX_ENGINES]; // 0 = normal, 1 = low, 2 = full fail
68 bool fuel_pump_ok[FG_MAX_ENGINES];
71 int num_tanks; // number of valid tanks
72 bool fuel_selector[FG_MAX_TANKS]; // false = off, true = on
77 double copilot_brake_left;
78 double copilot_brake_right;
82 bool gear_handle; // true=gear handle down; false= gear handle up
87 // wind and turbulance
90 double turbulence_norm;
96 // other information about environment
97 double hground; // ground elevation (meters)
98 double magvar; // local magnetic variation in degs.
101 bool icing; // icing status could me much
102 // more complex but I'm
103 // starting simple here.
105 // simulation control
106 int speedup; // integer speedup multiplier
107 int freeze; // 0=normal
114 #endif // _NET_CTRLS_HXX