Flight Simulator 98 simulates several types of aircraft system failures. System failures are listed in the FAILURE_KEY enum values; for details, see the table included in this topic. The following code is a sample element failure record.
FAILURE_RECORD fail_vertical_speed[] =
{
{FAIL_GAUGE_VERTICAL_SPEED, FAIL_ACTION_FREEZE},
{FAIL_SYSTEM_PITOT_STATIC, FAIL_ACTION_ZERO},
{FAIL_NONE, FAIL_ACTION_NONE}
};
typedef enum FAILURE_KEY
{
FAIL_NONE = 0,
FAIL_SYSTEM_ELECTRICAL,
FAIL_SYSTEM_ENGINE,
FAIL_SYSTEM_PITOT_STATIC,
FAIL_SYSTEM_VACUUM,
FAIL_GAUGE_ADF,
FAIL_GAUGE_AIRSPEED,
FAIL_GAUGE_ALTIMETER,
FAIL_GAUGE_ATTITUDE,
FAIL_GAUGE_COMMUNICATIONS,
FAIL_GAUGE_FUEL_INDICATORS,
FAIL_GAUGE_GYRO_HEADING,
FAIL_GAUGE_MAGNETIC_COMPASS,
FAIL_GAUGE_NAVIGATION,
FAIL_GAUGE_NAVIGATION_VOR1,
FAIL_GAUGE_NAVIGATION_VOR2,
FAIL_GAUGE_NAVIGATION_BOTH,
FAIL_GAUGE_TRANSPONDER,
FAIL_GAUGE_TURN_COORDINATOR,
FAIL_GAUGE_VERTICAL_SPEED,
FAIL_KEY_MAX
} FAILURE_KEY, *PFAILURE_KEY, **PPFAILURE_KEY;
The FAILURE_KEY enum values for Flight Simulator 98 are described in the following table:
Enum values | Description |
FAIL_NONE | Used to mark the end of a failure record. |
FAIL_SYSTEM_ELECTRICAL | Specifies an electrical system failure. |
FAIL_SYSTEM_ENGINE | Specifies an engine system failure. |
FAIL_SYSTEM_PITOT_ STATIC | Specifies a pitot static system failure. |
FAIL_SYSTEM_VACUUM | Specifies a vacuum system failure. |
FAIL_GAUGE_ADF | Specifies an ADF gauge system failure. |
FAIL_GAUGE_AIRSPEED | Specifies an airspeed gauge system failure. |
FAIL_GAUGE_ALTIMETER | Specifies an altimeter gauge system failure. |
FAIL_GAUGE_ATTITUDE | Specifies an attitude gauge system failure. |
FAIL_GAUGE_ COMMUNICATIONS | Specifies a communication gauge system failure. |
FAIL_GAUGE_FUEL_ INDICATORS | Specifies a fuel indicators gauge system failure. |
FAIL_GAUGE_GYRO_ HEADING | Specifies a gyro heading gauge system failure. |
FAIL_GAUGE_MAGNETIC_ COMPASS | Specifies a magnetic compass gauge system failure. |
FAIL_GAUGE_NAVIGATION | Specifies a navigation gauge system failure. |
FAIL_GAUGE_NAVIGATION_ VOR1 | Specifies a navigation VOR1 gauge system failure. |
FAIL_GAUGE_NAVIGATION_ VOR2 | Specifies a navigation VOR2 gauge system failure. |
FAIL_GAUGE_NAVIGATION_ BOTH | Specifies a complete failure of the navigation radio. |
FAIL_GAUGE_ TRANSPONDER | Specifies a transponder gauge system failure. |
FAIL_GAUGE_TURN_ COORDINATOR | Specifies a turn coordinator gauge system failure. |
FAIL_GAUGE_VERTICAL_ SPEED | Specifies a vertical speed indicator gauge system failure. |
FAIL_KEY_MAX | Not used. |
You can set up a gauge element to react to one or more of the system failures shown in the following code example, defined by the FAILURE_ACTION enum values:
typedef enum FAILURE_ACTION
{
FAIL_ACTION_NONE = 0,
FAIL_ACTION_FREEZE,
FAIL_ACTION_ZERO,
FAIL_ACTION_NO_DRAW,
FAIL_ACTION_COVER,
FAIL_ACTION_MAX
} FAILURE_ACTION, *PFAILURE_ACTION, **PPFAILURE_ACTION;
The FAIL_ACTION enum values for Flight Simulator 98 are described in the following table:
Member | Description |
FAIL_ACTION_NONE | No action taken. This type of failure record is typically used as the background static image for covering a gauge. |
FAIL_ACTION_FREEZE | The element MODULE_VAR variable(s) will not be updated. The gauge element freezes at its last updated position. |
FAIL_ACTION_ZERO | Sets the element MODULE_VAR variable(s) to 0. |
FAIL_ACTION_NO_DRAW | Erases the element and doesn't draw it again. |
FAIL_ACTION_COVER | Return value indicating that the user has chosen to cover this gauge in the aircraft settings menu. This value generally won’t be used in failure records. |
FAIL_ACTION_MAX | Not used. |