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 = 21;
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 bool master_bat[FG_MAX_ENGINES];
50 bool master_alt[FG_MAX_ENGINES];
51 int magnetos[FG_MAX_ENGINES];
52 bool starter_power[FG_MAX_ENGINES]; // true = starter power
53 double throttle[FG_MAX_ENGINES]; // 0 ... 1
54 double mixture[FG_MAX_ENGINES]; // 0 ... 1
55 bool fuel_pump_power[FG_MAX_ENGINES];// true = on
56 double prop_advance[FG_MAX_ENGINES]; // 0 ... 1
59 bool engine_ok[FG_MAX_ENGINES];
60 bool mag_left_ok[FG_MAX_ENGINES];
61 bool mag_right_ok[FG_MAX_ENGINES];
62 bool spark_plugs_ok[FG_MAX_ENGINES]; // false = fouled plugs
63 int oil_press_status[FG_MAX_ENGINES]; // 0 = normal, 1 = low, 2 = full fail
64 bool fuel_pump_ok[FG_MAX_ENGINES];
67 int num_tanks; // number of valid tanks
68 bool fuel_selector[FG_MAX_TANKS]; // false = off, true = on
76 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 bool icing; // icing status could me much
96 // more complex but I'm
97 // starting simple here.
100 int speedup; // integer speedup multiplier
101 int freeze; // 0=normal
108 #endif // _NET_CTRLS_HXX