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 = 23;
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 double condition[FG_MAX_ENGINES]; // 0 ... 1
56 bool fuel_pump_power[FG_MAX_ENGINES];// true = on
57 double prop_advance[FG_MAX_ENGINES]; // 0 ... 1
60 bool engine_ok[FG_MAX_ENGINES];
61 bool mag_left_ok[FG_MAX_ENGINES];
62 bool mag_right_ok[FG_MAX_ENGINES];
63 bool spark_plugs_ok[FG_MAX_ENGINES]; // false = fouled plugs
64 int oil_press_status[FG_MAX_ENGINES]; // 0 = normal, 1 = low, 2 = full fail
65 bool fuel_pump_ok[FG_MAX_ENGINES];
68 int num_tanks; // number of valid tanks
69 bool fuel_selector[FG_MAX_TANKS]; // false = off, true = on
74 double copilot_brake_left;
75 double copilot_brake_right;
79 bool gear_handle; // true=gear handle down; false= gear handle up
84 // wind and turbulance
87 double turbulence_norm;
93 // other information about environment
94 double hground; // ground elevation (meters)
95 double magvar; // local magnetic variation in degs.
98 bool icing; // icing status could me much
99 // more complex but I'm
100 // starting simple here.
102 // simulation control
103 int speedup; // integer speedup multiplier
104 int freeze; // 0=normal
111 #endif // _NET_CTRLS_HXX