50 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode1_Pull_Up &&
56 else if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode1_Sink_Rate &&
66 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode2a_Pull_Up &&
72 else if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode2a_Terrain_Terrain &&
76 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode2a_Terrain_Terrain;
83 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode2b_Pull_Up &&
89 else if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode2b_Terrain_Terrain &&
93 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode2b_Terrain_Terrain;
102 if (oldradioaltitude < 0.04572f && bus->RadioAltitudeKm >= 0.04572f)
127 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode4a_Too_Low_Terrain;
132 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode4a_Too_Low_Gear;
143 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode4b_Too_Low_Terrain;
148 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode4b_Too_Low_Flaps;
169 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode5a_Glideslope)
171 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode5a_Glideslope;
177 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode5b_Glideslope)
179 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode5b_Glideslope;
187 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode6_Bank_Angle &&
192 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_Bank_Angle;
210 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_One_Hundred;
212 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_Two_Hundred;
214 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_Five_Hundred;
216 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_One_Thousand;
227 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_Minimums_Minimums;
234 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode6_Rotate)
245 if (
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode6_Positive_Rate)
246 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode6_Positive_Rate;
259 if (UpdraftFpm < (-750.0f * knotsPerSecond - 1750.0f) &&
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode7_Windshear_Warning)
260 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode7_Windshear_Warning;
261 else if (UpdraftFpm > (-750.0f * knotsPerSecond + 1750) &&
bus->
GPWS.
Alert > Bus::Gpws::GpwsEnum::Mode7_Windshear_Caution)
262 bus->
GPWS.
Alert = Bus::Gpws::GpwsEnum::Mode7_Windshear_Caution;
273 case Bus::Gpws::GpwsEnum::Mode5a_Glideslope:
274 case Bus::Gpws::GpwsEnum::Mode5b_Glideslope:
277 newCommand.
name =
"GPWSGlideslope";
282 case Bus::Gpws::GpwsEnum::Mode1_Pull_Up:
283 case Bus::Gpws::GpwsEnum::Mode2a_Pull_Up:
284 case Bus::Gpws::GpwsEnum::Mode2b_Pull_Up:
287 newCommand.
name =
"GPWSPullUp";
292 case Bus::Gpws::GpwsEnum::Mode2a_Terrain_Terrain:
293 case Bus::Gpws::GpwsEnum::Mode2b_Terrain_Terrain:
296 newCommand.
name =
"GPWSTerrainTerrain";
301 case Bus::Gpws::GpwsEnum::Mode4a_Too_Low_Terrain:
302 case Bus::Gpws::GpwsEnum::Mode4b_Too_Low_Terrain:
303 case Bus::Gpws::GpwsEnum::Mode4c_Too_Low_Terrain:
306 newCommand.
name =
"GPWSTooLowTerrain";
311 case Bus::Gpws::GpwsEnum::Mode4a_Too_Low_Gear:
314 newCommand.
name =
"GPWSTooLowGear";
319 case Bus::Gpws::GpwsEnum::Mode4b_Too_Low_Flaps:
322 newCommand.
name =
"GPWSTooLowFlaps";
327 case Bus::Gpws::GpwsEnum::Mode1_Sink_Rate:
330 newCommand.
name =
"GPWSSinkRate";
338 newCommand.
name =
"GPWSBankAngle";
343 case Bus::Gpws::GpwsEnum::Mode6_Retard:
346 newCommand.
name =
"GPWSMode6Retard";
351 case Bus::Gpws::GpwsEnum::Mode6_Ten:
354 newCommand.
name =
"GPWSMode6Ten";
355 newCommand.
ttl = 0.339f;
360 case Bus::Gpws::GpwsEnum::Mode6_Twenty:
363 newCommand.
name =
"GPWSMode6Twenty";
364 newCommand.
ttl = 0.431f;
369 case Bus::Gpws::GpwsEnum::Mode6_Thirty:
372 newCommand.
name =
"GPWSMode6Thirty";
373 newCommand.
ttl = 0.449f;
378 case Bus::Gpws::GpwsEnum::Mode6_Forty:
381 newCommand.
name =
"GPWSMode6Forty";
382 newCommand.
ttl = 0.473f;
387 case Bus::Gpws::GpwsEnum::Mode6_Fifty:
388 newCommand.
name =
"GPWSMode6Fifty";
389 newCommand.
ttl = 0.443f;
393 case Bus::Gpws::GpwsEnum::Mode6_One_Hundred:
394 newCommand.
name =
"GPWSMode6OneHundred";
398 case Bus::Gpws::GpwsEnum::Mode6_Two_Hundred:
399 newCommand.
name =
"GPWSMode6TwoHundred";
403 case Bus::Gpws::GpwsEnum::Mode6_Minimums_Minimums:
404 newCommand.
name =
"GPWSMode6Minimums";
408 case Bus::Gpws::GpwsEnum::Mode6_Positive_Rate:
409 newCommand.
name =
"GPWSMode6PositiveRate";
413 case Bus::Gpws::GpwsEnum::Mode6_Five_Hundred:
414 newCommand.
name =
"GPWSMode6FiveHundred";
418 case Bus::Gpws::GpwsEnum::Mode6_One_Thousand:
419 newCommand.
name =
"GPWSMode6OneThousand";
423 case Bus::Gpws::GpwsEnum::Mode6_Rotate:
424 newCommand.
name =
"GPWSMode6Rotate";
428 case Bus::Gpws::GpwsEnum::Mode3_Dont_Sink:
431 newCommand.
name =
"GPWSMode3DontSink";
436 case Bus::Gpws::GpwsEnum::Mode7_Windshear_Warning:
439 newCommand.
name =
"GPWSMode7WindshearWarning";
444 case Bus::Gpws::GpwsEnum::Mode7_Windshear_Caution:
447 newCommand.
name =
"GPWSMode7WindshearCaution";
enum Bus::Gpws::GpwsEnum Alert
std::vector< Command > commandStream
std::vector< int > flapSettings
s_network_objects playerships[MAX_SCAN]
float RollAttitudeRadians
void FrameMove(float fElapsedTime) override
Gpws(Bus *prmBus, Logger *prmLogger)
float GlideslopeDeviationRadians
float IndicatedAirspeedKms
float TrailingEdgeFlapsPosition
float oldIndicatedAirspeedKms
float PitchAttitudeRadians
float EngineThrustLever[MAX_ENGINES]