1 // net_ctrls.hxx -- defines a common net I/O interface to the flight
4 // Written by Curtis Olson - curt@flightgear.com, started July 2001.
6 // This file is in the Public Domain, and comes with no warranty.
11 #ifndef _NET_CTRLS_HXX
12 #define _NET_CTRLS_HXX
16 # error This library requires C++
19 const int FG_NET_CTRLS_VERSION = 19;
22 // Define a structure containing the control parameters
28 int version; // increment when data values change
37 double aileron; // -1 ... 1
38 double elevator; // -1 ... 1
39 double elevator_trim; // -1 ... 1
40 double rudder; // -1 ... 1
41 double flaps; // 0 ... 1
43 // Aero control faults
44 bool flaps_power; // true = power available
48 int num_engines; // number of valid engines
49 int magnetos[FG_MAX_ENGINES];
50 bool starter_power[FG_MAX_ENGINES]; // true = starter power
51 double throttle[FG_MAX_ENGINES]; // 0 ... 1
52 double mixture[FG_MAX_ENGINES]; // 0 ... 1
53 bool fuel_pump_power[FG_MAX_ENGINES];// true = on
54 double prop_advance[FG_MAX_ENGINES]; // 0 ... 1
57 bool engine_ok[FG_MAX_ENGINES];
58 bool mag_left_ok[FG_MAX_ENGINES];
59 bool mag_right_ok[FG_MAX_ENGINES];
60 bool spark_plugs_ok[FG_MAX_ENGINES]; // false = fouled plugs
61 int oil_press_status[FG_MAX_ENGINES]; // 0 = normal, 1 = low, 2 = full fail
62 bool fuel_pump_ok[FG_MAX_ENGINES];
65 int num_tanks; // number of valid tanks
66 bool fuel_selector[FG_MAX_TANKS]; // false = off, true = on
74 bool gear_handle; // true=gear handle down; false= gear handle up
81 // wind and turbulance
84 double turbulence_norm;
90 // other information about environment
91 double hground; // ground elevation (meters)
92 double magvar; // local magnetic variation in degs.
95 int speedup; // integer speedup multiplier
96 int freeze; // 0=normal
103 #endif // _NET_CTRLS_HXX