Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. namespace F4SharedMem.Headers
  6. {
  7. [ComVisible(true)]
  8. [Flags]
  9. [Serializable]
  10. public enum LightBits : int
  11. {
  12. MasterCaution = 0x1, // Left eyebrow
  13.  
  14. // Brow Lights
  15. TF = 0x2, // Left eyebrow
  16. OBS = 0x4, // Not used
  17. OXY_BROW = 0x4, // repurposed for eyebrow OXY LOW (was OBS, unused)
  18. ALT = 0x8, // Caution light; not used
  19. EQUIP_HOT = 0x8, // Caution light; repurposed for cooling fault (was: not used)
  20. WOW = 0x10, // True if weight is on wheels: this is not a lamp bit!
  21. ENG_FIRE = 0x20, // Right eyebrow; upper half of split face lamp
  22. CONFIG = 0x40, // Stores config, caution panel
  23. HYD = 0x80, // Right eyebrow; see also OIL (this lamp is not split face)
  24. OIL = 0x100, // Right eyebrow; see also HYD (this lamp is not split face)
  25. Flcs_ABCD=0x100, // TEST panel FLCS channel lamps; repurposed, was OIL (see HYD; that lamp is not split face)
  26. DUAL = 0x200, // Right eyebrow; block 25, 30/32 and older 40/42
  27. FLCS = 0x200,// Right eyebrow; was called DUAL which matches block 25, 30/32 and older 40/42
  28. CAN = 0x400, // Right eyebrow
  29. T_L_CFG = 0x800, // Right eyebrow
  30.  
  31. // AOA Indexers
  32. AOAAbove = 0x1000,
  33. AOAOn = 0x2000,
  34. AOABelow = 0x4000,
  35.  
  36. // Refuel/NWS
  37. RefuelRDY = 0x8000,
  38. RefuelAR = 0x10000,
  39. RefuelDSC = 0x20000,
  40.  
  41. // Caution Lights
  42. FltControlSys = 0x40000,
  43. LEFlaps = 0x80000,
  44. EngineFault = 0x100000,
  45. Overheat = 0x200000,
  46. FuelLow = 0x400000,
  47. Avionics = 0x800000,
  48. RadarAlt = 0x1000000,
  49. IFF = 0x2000000,
  50. ECM = 0x4000000,
  51. Hook = 0x8000000,
  52. NWSFail = 0x10000000,
  53. CabinPress = 0x20000000,
  54.  
  55. AutoPilotOn = 0x40000000, // TRUE if is AP on. NB: This is not a lamp bit!
  56. TFR_STBY = -2147483648, //0x80000000, // MISC panel; lower half of split face TFR lamp
  57.  
  58. // Used with the MAL/IND light code to light up "everything"
  59. // please update this is you add/change bits!
  60. AllLampBitsOn = -1073741841//0xBFFFFFEF
  61. };
  62.  
  63. [ComVisible(true)]
  64. [Flags]
  65. [Serializable]
  66. public enum LightBits2 : int
  67. {
  68. // Threat Warning Prime
  69. HandOff = 0x1,
  70. Launch = 0x2,
  71. PriMode = 0x4,
  72. Naval = 0x8,
  73. Unk = 0x10,
  74. TgtSep = 0x20,
  75.  
  76. // EWS
  77. Go = 0x40, // On and operating normally
  78. NoGo = 0x80, // On but malfunction present
  79. Degr = 0x100, // Status message: AUTO DEGR
  80. Rdy = 0x200, // Status message: DISPENSE RDY
  81. ChaffLo = 0x400, // Bingo chaff quantity reached
  82. FlareLo = 0x800, // Bingo flare quantity reached
  83.  
  84. // Aux Threat Warning
  85. AuxSrch = 0x1000,
  86. AuxAct = 0x2000,
  87. AuxLow = 0x4000,
  88. AuxPwr = 0x8000,
  89.  
  90. // ECM
  91. EcmPwr = 0x10000,
  92. EcmFail = 0x20000,
  93.  
  94. // Caution Lights
  95. FwdFuelLow = 0x40000,
  96. AftFuelLow = 0x80000,
  97.  
  98. EPUOn = 0x100000, // EPU panel; run light
  99. JFSOn = 0x200000, // Eng Jet Start panel; run light
  100.  
  101. // Caution panel
  102. SEC = 0x400000,
  103. OXY_LOW = 0x800000,
  104. PROBEHEAT = 0x1000000,
  105. SEAT_ARM = 0x2000000,
  106. BUC = 0x4000000,
  107. FUEL_OIL_HOT = 0x8000000,
  108. ANTI_SKID = 0x10000000,
  109.  
  110. TFR_ENGAGED = 0x20000000, // MISC panel; upper half of split face TFR lamp
  111. GEARHANDLE = 0x40000000, // Lamp in gear handle lights on fault or gear in motion
  112. ENGINE = -2147483648, //0x80000000, // Lower half of right eyebrow ENG FIRE/ENGINE lamp
  113.  
  114. // Used with the MAL/IND light code to light up "everything"
  115. // please update this is you add/change bits!
  116. AllLampBits2On = -4033//0xFFFFF03F //ATARIBABY EWS CMDS bits excluded from test lamps
  117. };
  118.  
  119. [ComVisible(true)]
  120. [Flags]
  121. [Serializable]
  122. public enum LightBits3 : int
  123. {
  124. // Elec panel
  125. FlcsPmg = 0x1,
  126. MainGen = 0x2,
  127. StbyGen = 0x4,
  128. EpuGen = 0x8,
  129. EpuPmg = 0x10,
  130. ToFlcs = 0x20,
  131. FlcsRly = 0x40,
  132. BatFail = 0x80,
  133.  
  134. // EPU panel
  135. Hydrazine = 0x100,
  136. Air = 0x200,
  137.  
  138. // Caution panel
  139. Elec_Fault = 0x400,
  140. Lef_Fault = 0x800,
  141.  
  142. Power_Off = 0x1000, // Set if there is no electrical power. NB: not a lamp bit
  143. Eng2_Fire = 0x2000, // Multi-engine
  144. Lock = 0x4000, // Lock light Cue; non-F-16
  145. Shoot = 0x8000, // Shoot light cue; non-F16
  146. NoseGearDown = 0x10000, // Landing gear panel; on means down and locked
  147. LeftGearDown = 0x20000, // Landing gear panel; on means down and locked
  148. RightGearDown = 0x40000, // Landing gear panel; on means down and locked
  149.  
  150. // Used with the MAL/IND light code to light up "everything"
  151. // please update this is you add/change bits!
  152. AllLampBits3On = 0x0007EFFF
  153. };
  154.  
  155. [ComVisible(true)]
  156. [Flags]
  157. [Serializable]
  158. public enum Bms4LightBits3 : int
  159. {
  160. // Elec panel
  161. FlcsPmg = 0x1,
  162. MainGen = 0x2,
  163. StbyGen = 0x4,
  164. EpuGen = 0x8,
  165. EpuPmg = 0x10,
  166. ToFlcs = 0x20,
  167. FlcsRly = 0x40,
  168. BatFail = 0x80,
  169.  
  170. // EPU panel
  171. Hydrazine = 0x100,
  172. Air = 0x200,
  173.  
  174. // Caution panel
  175. Elec_Fault = 0x400,
  176. Lef_Fault = 0x800,
  177.  
  178. OnGround = 0x1000, // weight-on-wheels
  179. FlcsBitRun = 0x2000, // FLT CONTROL panel RUN light (used to be Multi-engine fire light)
  180. FlcsBitFail = 0x4000, // FLT CONTROL panel FAIL light (used to be Lock light Cue; non-F-16)
  181. Shoot = 0x8000, // Shoot light cue; non-F16
  182. NoseGearDown = 0x10000, // Landing gear panel; on means down and locked
  183. LeftGearDown = 0x20000, // Landing gear panel; on means down and locked
  184. RightGearDown = 0x40000, // Landing gear panel; on means down and locked
  185. ParkBrakeOn = 0x100000, // Parking brake engaged; NOTE: not a lamp bit
  186. Power_Off = 0x200000, // Set if there is no electrical power. NB: not a lamp bit
  187.  
  188. // Caution panel
  189. cadc = 0x400000,
  190.  
  191. // Used with the MAL/IND light code to light up "everything"
  192. // please update this if you add/change bits!
  193. AllLampBits3On = 0x0047EFFF
  194. };
  195.  
  196. [ComVisible(true)]
  197. [Flags]
  198. [Serializable]
  199. public enum HsiBits : int
  200. {
  201. ToTrue = 0x01, // HSI_FLAG_TO_TRUE
  202. IlsWarning = 0x02, // HSI_FLAG_ILS_WARN
  203. CourseWarning = 0x04, // HSI_FLAG_CRS_WARN
  204. Init = 0x08, // HSI_FLAG_INIT
  205. TotalFlags = 0x10, // HSI_FLAG_TOTAL_FLAGS; never set
  206. ADI_OFF = 0x20, // ADI OFF Flag
  207. ADI_AUX = 0x40, // ADI AUX Flag
  208. ADI_GS = 0x80, // ADI GS FLAG
  209. ADI_LOC = 0x100, // ADI LOC FLAG
  210. HSI_OFF = 0x200, // HSI OFF Flag
  211. BUP_ADI_OFF = 0x400, // Backup ADI Off Flag
  212. VVI = 0x800, // VVI OFF Flag
  213. AOA = 0x1000, // AOA OFF Flag
  214. AVTR = 0x2000, // AVTR Light
  215.  
  216. OuterMarker = 0x4000, // MARKER beacon light for outer marker
  217. MiddleMarker = 0x8000, // MARKER beacon light for middle marker
  218. FromTrue = 0x10000, // HSI_FLAG_TO_TRUE == 2, FROM
  219.  
  220. Flying = -2147483648, //0x80000000, // true if player is attached to an aircraft (i.e. not in UI state). NOTE: Not a lamp bit
  221. // Used with the MAL/IND light code to light up "everything"
  222. // please update this is you add/change bits!
  223. AllLampHsiBitsOn = 0xE000
  224. };
  225.  
  226. [ComVisible(false)]
  227. [Serializable]
  228. [StructLayout(LayoutKind.Sequential, Pack=1)]
  229. public struct DED_PFL_LineOfText
  230. {
  231. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)]
  232. public sbyte[] chars;
  233. }
  234.  
  235. // MFD On Screen Button Labels(OF)
  236. [ComVisible(false)]
  237. [Serializable]
  238. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  239. public struct OSBLabel
  240. {
  241. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
  242. public sbyte[] Line1;
  243. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
  244. public sbyte[] Line2;
  245. [MarshalAs(UnmanagedType.I1)]
  246. public bool Inverted;
  247. }
  248.  
  249. // BMS3/Open Falcon Flight Data Model
  250. [ComVisible(false)]
  251. [Serializable]
  252. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  253. public struct BMS3FlightData
  254. {
  255. // These are outputs from the sim
  256. public float x; // Ownship North (Ft)
  257. public float y; // Ownship East (Ft)
  258. public float z; // Ownship Down (Ft)
  259. public float xDot; // Ownship North Rate (ft/sec)
  260. public float yDot; // Ownship East Rate (ft/sec)
  261. public float zDot; // Ownship Down Rate (ft/sec)
  262. public float alpha; // Ownship AOA (Degrees)
  263. public float beta; // Ownship Beta (Degrees)
  264. public float gamma; // Ownship Gamma (Radians)
  265. public float pitch; // Ownship Pitch (Radians)
  266. public float roll; // Ownship Roll (Radians)
  267. public float yaw; // Ownship Yaw (Radians)
  268. public float mach; // Ownship Mach number
  269. public float kias; // Ownship Indicated Airspeed (Knots)
  270. public float vt; // Ownship True Airspeed (Ft/Sec)
  271. public float gs; // Ownship Normal Gs
  272. public float windOffset; // Wind delta to FPM (Radians)
  273. public float nozzlePos; // Ownship engine nozzle percent open (0-100)
  274. // public float nozzlePos2; // Ownship engine nozzle2 percent open (0-100)
  275. public float internalFuel; // Ownship internal fuel (Lbs)
  276. public float externalFuel; // Ownship external fuel (Lbs)
  277. public float fuelFlow; // Ownship fuel flow (Lbs/Hour)
  278. public float rpm; // Ownship engine rpm (Percent 0-103)
  279. // public float rpm2; // Ownship engine rpm2 (Percent 0-103)
  280. public float ftit; // Ownship Forward Turbine Inlet Temp (Degrees C)
  281. // public float ftit2; // Ownship Forward Turbine Inlet Temp2 (Degrees C)
  282. public float gearPos; // Ownship Gear position 0 = up, 1 = down;
  283. public float speedBrake; // Ownship speed brake position 0 = closed, 1 = 60 Degrees open
  284. public float epuFuel; // Ownship EPU fuel (Percent 0-100)
  285. public float oilPressure; // Ownship Oil Pressure (Percent 0-100)
  286. public uint lightBits; // Cockpit Indicator Lights, one bit per bulb. See enum
  287.  
  288. // These are inputs. Use them carefully
  289. // NB: these do not work when TrackIR device is enabled
  290. public float headPitch; // Head pitch offset from design eye (radians)
  291. public float headRoll; // Head roll offset from design eye (radians)
  292. public float headYaw; // Head yaw offset from design eye (radians)
  293.  
  294. // new lights
  295. public uint lightBits2; // Cockpit Indicator Lights, one bit per bulb. See enum
  296. public uint lightBits3; // Cockpit Indicator Lights, one bit per bulb. See enum
  297.  
  298. // chaff/flare
  299. public float ChaffCount; // Number of Chaff left
  300. public float FlareCount; // Number of Flare left
  301.  
  302. // landing gear
  303. public float NoseGearPos; // Position of the nose landinggear; caution: full down values defined in dat files
  304. public float LeftGearPos; // Position of the left landinggear; caution: full down values defined in dat files
  305. public float RightGearPos; // Position of the right landinggear; caution: full down values defined in dat files
  306.  
  307. // ADI values
  308. public float AdiIlsHorPos; // Position of horizontal ILS bar
  309. public float AdiIlsVerPos; // Position of vertical ILS bar
  310.  
  311. // HSI states
  312. public int courseState; // HSI_STA_CRS_STATE
  313. public int headingState; // HSI_STA_HDG_STATE
  314. public int totalStates; // HSI_STA_TOTAL_STATES; never set
  315.  
  316. // HSI values
  317. public float courseDeviation; // HSI_VAL_CRS_DEVIATION
  318. public float desiredCourse; // HSI_VAL_DESIRED_CRS
  319. public float distanceToBeacon; // HSI_VAL_DISTANCE_TO_BEACON
  320. public float bearingToBeacon; // HSI_VAL_BEARING_TO_BEACON
  321. public float currentHeading; // HSI_VAL_CURRENT_HEADING
  322. public float desiredHeading; // HSI_VAL_DESIRED_HEADING
  323. public float deviationLimit; // HSI_VAL_DEV_LIMIT
  324. public float halfDeviationLimit; // HSI_VAL_HALF_DEV_LIMIT
  325. public float localizerCourse; // HSI_VAL_LOCALIZER_CRS
  326. public float airbaseX; // HSI_VAL_AIRBASE_X
  327. public float airbaseY; // HSI_VAL_AIRBASE_Y
  328. public float totalValues; // HSI_VAL_TOTAL_VALUES; never set
  329.  
  330. public float TrimPitch; // Value of trim in pitch axis, -0.5 to +0.5
  331. public float TrimRoll; // Value of trim in roll axis, -0.5 to +0.5
  332. public float TrimYaw; // Value of trim in yaw axis, -0.5 to +0.5
  333.  
  334. // HSI flags
  335. public uint hsiBits; // HSI flags
  336.  
  337. //DED Lines
  338. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  339. public DED_PFL_LineOfText[] DEDLines; //25 usable chars
  340. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  341. public DED_PFL_LineOfText[] Invert; //25 usable chars
  342.  
  343. //PFL Lines
  344. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  345. public DED_PFL_LineOfText[] PFLLines; //25 usable chars
  346. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  347. public DED_PFL_LineOfText[] PFLInvert; //25 usable chars
  348.  
  349. //TacanChannel
  350. public int UFCTChan;
  351. public int AUXTChan;
  352. //RWR
  353. public int RwrObjectCount;
  354. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  355. public int[] RWRsymbol;
  356. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  357. public float[] bearing;
  358. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  359. public uint[] missileActivity;
  360. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  361. public uint[] missileLaunch;
  362. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  363. public uint[] selected;
  364. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  365. public float[] lethality;
  366. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  367. public uint[] newDetection;
  368.  
  369. //fuel values
  370. public float fwd;
  371. public float aft;
  372. public float total;
  373.  
  374. public int VersionNum; //Version of Mem area
  375.  
  376. // public float headX; // Head X offset from design eye (feet)
  377. // public float headY; // Head Y offset from design eye (feet)
  378. // public float headZ; // Head Z offset from design eye (feet)
  379. // public int MainPower;
  380.  
  381. }
  382. [ComVisible(false)]
  383. [Serializable]
  384. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  385. public struct OSBData
  386. {
  387. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  388. public OSBLabel[] leftMFD;
  389. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  390. public OSBLabel[] rightMFD;
  391. }
  392. [ComVisible(false)]
  393. [Serializable]
  394. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  395. public struct FlightData2
  396. {
  397. float nozzlePos2; // Ownship engine nozzle2 percent open (0-100)
  398. float rpm2; // Ownship engine rpm2 (Percent 0-103)
  399. float ftit2; // Ownship Forward Turbine Inlet Temp2 (Degrees C)
  400. float oilPressure2; // Ownship Oil Pressure2 (Percent 0-100)
  401. byte navMode; // current mode selected for HSI/eHSI (added in BMS4)
  402. }
  403. [ComVisible(false)]
  404. [Serializable]
  405. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  406. public struct BMS2FlightData
  407. {
  408. // These are outputs from the sim
  409. public float x; // Ownship North (Ft)
  410. public float y; // Ownship East (Ft)
  411. public float z; // Ownship Down (Ft)
  412. public float xDot; // Ownship North Rate (ft/sec)
  413. public float yDot; // Ownship East Rate (ft/sec)
  414. public float zDot; // Ownship Down Rate (ft/sec)
  415. public float alpha; // Ownship AOA (Degrees)
  416. public float beta; // Ownship Beta (Degrees)
  417. public float gamma; // Ownship Gamma (Radians)
  418. public float pitch; // Ownship Pitch (Radians)
  419. public float roll; // Ownship Roll (Radians)
  420. public float yaw; // Ownship Yaw (Radians)
  421. public float mach; // Ownship Mach number
  422. public float kias; // Ownship Indicated Airspeed (Knots)
  423. public float vt; // Ownship True Airspeed (Ft/Sec)
  424. public float gs; // Ownship Normal Gs
  425. public float windOffset; // Wind delta to FPM (Radians)
  426. public float nozzlePos; // Ownship engine nozzle percent open (0-100)
  427. public float nozzlePos2; // Ownship engine nozzle2 percent open (0-100)
  428. public float internalFuel; // Ownship internal fuel (Lbs)
  429. public float externalFuel; // Ownship external fuel (Lbs)
  430. public float fuelFlow; // Ownship fuel flow (Lbs/Hour)
  431. public float rpm; // Ownship engine rpm (Percent 0-103)
  432. public float rpm2; // Ownship engine rpm2 (Percent 0-103)
  433. public float ftit; // Ownship Forward Turbine Inlet Temp (Degrees C)
  434. public float ftit2; // Ownship Forward Turbine Inlet Temp2 (Degrees C)
  435. public float gearPos; // Ownship Gear position 0 = up, 1 = down;
  436. public float speedBrake; // Ownship speed brake position 0 = closed, 1 = 60 Degrees open
  437. public float epuFuel; // Ownship EPU fuel (Percent 0-100)
  438. public float oilPressure; // Ownship Oil Pressure (Percent 0-100)
  439. public float oilPressure2; // Ownship Oil Pressure2 (Percent 0-100)
  440. public uint lightBits; // Cockpit Indicator Lights, one bit per bulb. See enum
  441.  
  442. // These are inputs. Use them carefully
  443. // NB: these do not work when TrackIR device is enabled
  444. public float headPitch; // Head pitch offset from design eye (radians)
  445. public float headRoll; // Head roll offset from design eye (radians)
  446. public float headYaw; // Head yaw offset from design eye (radians)
  447.  
  448. // new lights
  449. public uint lightBits2; // Cockpit Indicator Lights, one bit per bulb. See enum
  450. public uint lightBits3; // Cockpit Indicator Lights, one bit per bulb. See enum
  451.  
  452. // chaff/flare
  453. public float ChaffCount; // Number of Chaff left
  454. public float FlareCount; // Number of Flare left
  455.  
  456. // landing gear
  457. public float NoseGearPos; // Position of the nose landinggear; caution: full down values defined in dat files
  458. public float LeftGearPos; // Position of the left landinggear; caution: full down values defined in dat files
  459. public float RightGearPos; // Position of the right landinggear; caution: full down values defined in dat files
  460.  
  461. // ADI values
  462. public float AdiIlsHorPos; // Position of horizontal ILS bar
  463. public float AdiIlsVerPos; // Position of vertical ILS bar
  464.  
  465. // HSI states
  466. public int courseState; // HSI_STA_CRS_STATE
  467. public int headingState; // HSI_STA_HDG_STATE
  468. public int totalStates; // HSI_STA_TOTAL_STATES; never set
  469.  
  470. // HSI values
  471. public float courseDeviation; // HSI_VAL_CRS_DEVIATION
  472. public float desiredCourse; // HSI_VAL_DESIRED_CRS
  473. public float distanceToBeacon; // HSI_VAL_DISTANCE_TO_BEACON
  474. public float bearingToBeacon; // HSI_VAL_BEARING_TO_BEACON
  475. public float currentHeading; // HSI_VAL_CURRENT_HEADING
  476. public float desiredHeading; // HSI_VAL_DESIRED_HEADING
  477. public float deviationLimit; // HSI_VAL_DEV_LIMIT
  478. public float halfDeviationLimit; // HSI_VAL_HALF_DEV_LIMIT
  479. public float localizerCourse; // HSI_VAL_LOCALIZER_CRS
  480. public float airbaseX; // HSI_VAL_AIRBASE_X
  481. public float airbaseY; // HSI_VAL_AIRBASE_Y
  482. public float totalValues; // HSI_VAL_TOTAL_VALUES; never set
  483.  
  484. public float TrimPitch; // Value of trim in pitch axis, -0.5 to +0.5
  485. public float TrimRoll; // Value of trim in roll axis, -0.5 to +0.5
  486. public float TrimYaw; // Value of trim in yaw axis, -0.5 to +0.5
  487.  
  488. // HSI flags
  489. public uint hsiBits; // HSI flags
  490.  
  491. //DED Lines
  492. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  493. public DED_PFL_LineOfText[] DEDLines; //25 usable chars
  494. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  495. public DED_PFL_LineOfText[] Invert; //25 usable chars
  496.  
  497. //PFL Lines
  498. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  499. public DED_PFL_LineOfText[] PFLLines; //25 usable chars
  500. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  501. public DED_PFL_LineOfText[] PFLInvert; //25 usable chars
  502.  
  503. //TacanChannel
  504. public int UFCTChan;
  505. public int AUXTChan;
  506.  
  507. //RWR
  508. public int RwrObjectCount;
  509. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  510. public int[] RWRsymbol;
  511. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  512. public float[] bearing;
  513. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  514. public uint[] missileActivity;
  515. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  516. public uint[] missileLaunch;
  517. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  518. public uint[] selected;
  519. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  520. public float[] lethality;
  521. // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
  522. // public uint[] newDetection;
  523.  
  524. //fuel values
  525. public float fwd;
  526. public float aft;
  527. public float total;
  528.  
  529. public int VersionNum; //Version of Mem area
  530. // public float headX; // Head X offset from design eye (feet)
  531. // public float headY; // Head Y offset from design eye (feet)
  532. // public float headZ; // Head Z offset from design eye (feet)
  533. // public int MainPower;
  534.  
  535. }
  536. [ComVisible(false)]
  537. [Serializable]
  538. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  539. public struct AFFlightData
  540. {
  541. // These are outputs from the sim
  542. public float x; // Ownship North (Ft)
  543. public float y; // Ownship East (Ft)
  544. public float z; // Ownship Down (Ft)
  545. public float xDot; // Ownship North Rate (ft/sec)
  546. public float yDot; // Ownship East Rate (ft/sec)
  547. public float zDot; // Ownship Down Rate (ft/sec)
  548. public float alpha; // Ownship AOA (Degrees)
  549. public float beta; // Ownship Beta (Degrees)
  550. public float gamma; // Ownship Gamma (Radians)
  551. public float pitch; // Ownship Pitch (Radians)
  552. public float roll; // Ownship Roll (Radians)
  553. public float yaw; // Ownship Yaw (Radians)
  554. public float mach; // Ownship Mach number
  555. public float kias; // Ownship Indicated Airspeed (Knots)
  556. public float vt; // Ownship True Airspeed (Ft/Sec)
  557. public float gs; // Ownship Normal Gs
  558. public float windOffset; // Wind delta to FPM (Radians)
  559. public float nozzlePos; // Ownship engine nozzle percent open (0-100)
  560. // public float nozzlePos2; // Ownship engine nozzle2 percent open (0-100)
  561. public float internalFuel; // Ownship internal fuel (Lbs)
  562. public float externalFuel; // Ownship external fuel (Lbs)
  563. public float fuelFlow; // Ownship fuel flow (Lbs/Hour)
  564. public float rpm; // Ownship engine rpm (Percent 0-103)
  565. // public float rpm2; // Ownship engine rpm2 (Percent 0-103)
  566. public float ftit; // Ownship Forward Turbine Inlet Temp (Degrees C)
  567. // public float ftit2; // Ownship Forward Turbine Inlet Temp2 (Degrees C)
  568. public float gearPos; // Ownship Gear position 0 = up, 1 = down;
  569. public float speedBrake; // Ownship speed brake position 0 = closed, 1 = 60 Degrees open
  570. public float epuFuel; // Ownship EPU fuel (Percent 0-100)
  571. public float oilPressure; // Ownship Oil Pressure (Percent 0-100)
  572. // public float oilPressure2; // Ownship Oil Pressure2 (Percent 0-100)
  573. public uint lightBits; // Cockpit Indicator Lights, one bit per bulb. See enum
  574.  
  575. // These are inputs. Use them carefully
  576. // NB: these do not work when TrackIR device is enabled
  577. public float headPitch; // Head pitch offset from design eye (radians)
  578. public float headRoll; // Head roll offset from design eye (radians)
  579. public float headYaw; // Head yaw offset from design eye (radians)
  580.  
  581. // new lights
  582. public uint lightBits2; // Cockpit Indicator Lights, one bit per bulb. See enum
  583. public uint lightBits3; // Cockpit Indicator Lights, one bit per bulb. See enum
  584.  
  585. // chaff/flare
  586. public float ChaffCount; // Number of Chaff left
  587. public float FlareCount; // Number of Flare left
  588.  
  589. // landing gear
  590. public float NoseGearPos; // Position of the nose landinggear; caution: full down values defined in dat files
  591. public float LeftGearPos; // Position of the left landinggear; caution: full down values defined in dat files
  592. public float RightGearPos; // Position of the right landinggear; caution: full down values defined in dat files
  593.  
  594. // ADI values
  595. public float AdiIlsHorPos; // Position of horizontal ILS bar
  596. public float AdiIlsVerPos; // Position of vertical ILS bar
  597.  
  598. // HSI states
  599. public int courseState; // HSI_STA_CRS_STATE
  600. public int headingState; // HSI_STA_HDG_STATE
  601. public int totalStates; // HSI_STA_TOTAL_STATES; never set
  602.  
  603. // HSI values
  604. public float courseDeviation; // HSI_VAL_CRS_DEVIATION
  605. public float desiredCourse; // HSI_VAL_DESIRED_CRS
  606. public float distanceToBeacon; // HSI_VAL_DISTANCE_TO_BEACON
  607. public float bearingToBeacon; // HSI_VAL_BEARING_TO_BEACON
  608. public float currentHeading; // HSI_VAL_CURRENT_HEADING
  609. public float desiredHeading; // HSI_VAL_DESIRED_HEADING
  610. public float deviationLimit; // HSI_VAL_DEV_LIMIT
  611. public float halfDeviationLimit; // HSI_VAL_HALF_DEV_LIMIT
  612. public float localizerCourse; // HSI_VAL_LOCALIZER_CRS
  613. public float airbaseX; // HSI_VAL_AIRBASE_X
  614. public float airbaseY; // HSI_VAL_AIRBASE_Y
  615. public float totalValues; // HSI_VAL_TOTAL_VALUES; never set
  616.  
  617. public float TrimPitch; // Value of trim in pitch axis, -0.5 to +0.5
  618. public float TrimRoll; // Value of trim in roll axis, -0.5 to +0.5
  619. public float TrimYaw; // Value of trim in yaw axis, -0.5 to +0.5
  620.  
  621. // HSI flags
  622. public uint hsiBits; // HSI flags
  623.  
  624. //DED Lines
  625. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  626. public DED_PFL_LineOfText[] DEDLines; //25 usable chars
  627. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  628. public DED_PFL_LineOfText[] Invert; //25 usable chars
  629.  
  630. //PFL Lines
  631. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  632. public DED_PFL_LineOfText[] PFLLines; //25 usable chars
  633. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
  634. public DED_PFL_LineOfText[] PFLInvert; //25 usable chars
  635.  
  636. //TacanChannel
  637. public int UFCTChan;
  638. public int AUXTChan;
  639.  
  640. //RWR
  641. public int RwrObjectCount;
  642. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  643. public int[] RWRsymbol;
  644. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  645. public float[] bearing;
  646. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  647. public uint[] missileActivity;
  648. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  649. public uint[] missileLaunch;
  650. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  651. public uint[] selected;
  652. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  653. public float[] lethality;
  654. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
  655. public uint[] newDetection;
  656.  
  657. //fuel values
  658. public float fwd;
  659. public float aft;
  660. public float total;
  661.  
  662. public int VersionNum; //Version of Mem area
  663. public float headX; // Head X offset from design eye (feet)
  664. public float headY; // Head Y offset from design eye (feet)
  665. public float headZ; // Head Z offset from design eye (feet)
  666. public int MainPower;
  667. }
  668.  
  669.  
  670. }