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 = 23;
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 elevator_trim; // -1 ... 1
41 double rudder; // -1 ... 1
42 double flaps; // 0 ... 1
44 // Aero control faults
45 bool flaps_power; // true = power available
49 int num_engines; // number of valid engines
50 bool master_bat[FG_MAX_ENGINES];
51 bool master_alt[FG_MAX_ENGINES];
52 int magnetos[FG_MAX_ENGINES];
53 bool starter_power[FG_MAX_ENGINES]; // true = starter power
54 double throttle[FG_MAX_ENGINES]; // 0 ... 1
55 double mixture[FG_MAX_ENGINES]; // 0 ... 1
56 double condition[FG_MAX_ENGINES]; // 0 ... 1
57 bool fuel_pump_power[FG_MAX_ENGINES];// true = on
58 double prop_advance[FG_MAX_ENGINES]; // 0 ... 1
61 bool engine_ok[FG_MAX_ENGINES];
62 bool mag_left_ok[FG_MAX_ENGINES];
63 bool mag_right_ok[FG_MAX_ENGINES];
64 bool spark_plugs_ok[FG_MAX_ENGINES]; // false = fouled plugs
65 int oil_press_status[FG_MAX_ENGINES]; // 0 = normal, 1 = low, 2 = full fail
66 bool fuel_pump_ok[FG_MAX_ENGINES];
69 int num_tanks; // number of valid tanks
70 bool fuel_selector[FG_MAX_TANKS]; // false = off, true = on
75 double copilot_brake_left;
76 double copilot_brake_right;
80 bool gear_handle; // true=gear handle down; false= gear handle up
85 // wind and turbulance
88 double turbulence_norm;
94 // other information about environment
95 double hground; // ground elevation (meters)
96 double magvar; // local magnetic variation in degs.
99 bool icing; // icing status could me much
100 // more complex but I'm
101 // starting simple here.
103 // simulation control
104 int speedup; // integer speedup multiplier
105 int freeze; // 0=normal
112 #endif // _NET_CTRLS_HXX