| 1 |
// format dfescription: https://www.omg.org/spec/IDL/4.2/PDF |
| 2 |
|
| 3 |
// Adapted from net_ctrls.hxx |
| 4 |
module FG |
| 5 |
{ |
| 6 |
|
| 7 |
// defining it this way also generates accompanying #defines in the header file. |
| 8 |
|
| 9 |
const short DDS_CTRLS_VERSION = 1; |
| 10 |
|
| 11 |
const short DDS_ENGINES = 4; |
| 12 |
const short DDS_WHEELS = 16; |
| 13 |
const short DDS_TANKS = 8; |
| 14 |
|
| 15 |
struct DDS_Ctrls |
| 16 |
{ |
| 17 |
short id; // DDS id |
| 18 |
short version; // packet version |
| 19 |
|
| 20 |
// Aero controls |
| 21 |
// net_ctrl.hxx defines doubles but flouts do have enough precission |
| 22 |
float aileron; // -1 ... 1 |
| 23 |
float elevator; // -1 ... 1 |
| 24 |
float rudder; // -1 ... 1 |
| 25 |
float aileron_trim; // -1 ... 1 |
| 26 |
float elevator_trim; // -1 ... 1 |
| 27 |
float rudder_trim; // -1 ... 1 |
| 28 |
float flaps; // 0 ... 1 |
| 29 |
float spoilers; |
| 30 |
float speedbrake; |
| 31 |
|
| 32 |
// Aero control faults |
| 33 |
char flaps_power; // true = power available |
| 34 |
char flap_motor_ok; |
| 35 |
|
| 36 |
// Engine controls |
| 37 |
unsigned short num_engines; // number of valid engines |
| 38 |
char master_bat[DDS_ENGINES]; |
| 39 |
char master_alt[DDS_ENGINES]; |
| 40 |
unsigned long magnetos[DDS_ENGINES]; |
| 41 |
unsigned long starter_power[DDS_ENGINES]; // true = starter power |
| 42 |
float throttle[DDS_ENGINES]; // 0 ... 1 |
| 43 |
float mixture[DDS_ENGINES]; // 0 ... 1 |
| 44 |
float condition[DDS_ENGINES]; // 0 ... 1 |
| 45 |
unsigned long fuel_pump_power[DDS_ENGINES]; // true = on |
| 46 |
float prop_advance[DDS_ENGINES]; // 0 ... 1 |
| 47 |
unsigned short feed_tank_to[4]; |
| 48 |
char reverse[4]; |
| 49 |
|
| 50 |
|
| 51 |
// Engine faults |
| 52 |
char engine_ok[DDS_ENGINES]; |
| 53 |
char mag_left_ok[DDS_ENGINES]; |
| 54 |
char mag_right_ok[DDS_ENGINES]; |
| 55 |
char spark_plugs_ok[DDS_ENGINES]; // false = fouled plugs |
| 56 |
unsigned short oil_press_status[DDS_ENGINES];// 0 = normal, 1 = low, 2 = full fail |
| 57 |
char fuel_pump_ok[DDS_ENGINES]; |
| 58 |
|
| 59 |
// Fuel management |
| 60 |
unsigned short num_tanks; // number of valid tanks |
| 61 |
unsigned short fuel_selector[DDS_TANKS]; // false = off, true = on |
| 62 |
// unsigned short xfer_pump[5]; // specifies transfer from array |
| 63 |
// value tank to tank specified |
| 64 |
// by int value |
| 65 |
char cross_feed; // false = off, true = on |
| 66 |
|
| 67 |
// Brake controls |
| 68 |
float brake_left; |
| 69 |
float brake_right; |
| 70 |
float copilot_brake_left; |
| 71 |
float copilot_brake_right; |
| 72 |
float brake_parking; |
| 73 |
|
| 74 |
// Landing Gear |
| 75 |
char gear_handle; // true=gear handle down; false= gear handle up |
| 76 |
|
| 77 |
// Switches |
| 78 |
char master_avionics; |
| 79 |
|
| 80 |
// nav and Comm |
| 81 |
float comm_1; |
| 82 |
float comm_2; |
| 83 |
float nav_1; |
| 84 |
float nav_2; |
| 85 |
|
| 86 |
// wind and turbulance |
| 87 |
float wind_speed_kt; |
| 88 |
float wind_dir_deg; |
| 89 |
float turbulence_norm; |
| 90 |
|
| 91 |
// temp and pressure |
| 92 |
float temp_c; |
| 93 |
float press_inhg; |
| 94 |
|
| 95 |
// other information about environment |
| 96 |
float hground; // ground elevation (meters) |
| 97 |
float magvar; // local magnetic variation in degs. |
| 98 |
|
| 99 |
// hazards |
| 100 |
char icing; // icing status could me much |
| 101 |
// more complex but I'm |
| 102 |
// starting simple here. |
| 103 |
|
| 104 |
// simulation control |
| 105 |
unsigned long speedup; // integer speedup multiplier |
| 106 |
unsigned short freeze; // 0=normal |
| 107 |
// 0x01=master |
| 108 |
// 0x02=position |
| 109 |
// 0x04=fuel |
| 110 |
}; |
| 111 |
#pragma keylist DDS_Ctrls id |
| 112 |
|
| 113 |
}; // module FG |