Blackbox

From FSAirlinesWiki
Jump to navigation Jump to search

Just like in real world the Blackbox records different events during the flight to allow a better flight analysis. These events include for example time of gear or flaps retraction, but there are a lot more events which can be recorded. Additionally the Client makes it possible to play user-defined sounds during flight. You can for example play a "Welcome on board" sound when the boarding is finished. The exact criteria when an event is recorded can be defined in a XML-file. In this article the structure of the file will be explained so everybody can adapt it to his own needs and add his own ideas.

Configuration

The configuration of the Blackbox is saved in the blackbox.xml file which resides in the Client data folder. This xml file can be freely edited with any text-editor using the following commands.

General structure

The blackbox.xml basically only consists of a couple of event tags encapsulated by the blackbox tag. Each of these event tags contains attributes describing the event to record. The following example is the standard blackbox.xml coming with every Client release:

<blackbox>
  <event var="landinglights" value="1" method="equal" multiple="1" text="Landing Lights on" />
  <event var="landinglights" value="0" method="equal" multiple="1" text="Landing Lights off" />
  <event var="gear" value="1" method="equal" multiple="1" text="Gear down" />
  <event var="gear" value="0" method="equal" multiple="1" text="Gear up" />
  <event var="flaps" value="1" method="equal" multiple="1" text="Flaps 100%" />
  <event var="flaps" value="0.5" method="equal" multiple="1" text="Flaps 50%" />
  <event var="flaps" value="0" method="equal" multiple="1" text="Flaps retracted" />
</blackbox>

Event criteria

As you can see in the example above each event tag consists of several attributes defining when to activate the event. Let's take the first line as an example:

<event var="landinglights" value="1" method="equals" multiple="1" text="Landing Lights on" />

First of all there is var, defining which Flight Simulator variable is tested. In this case the value is landinglights which means that the Client checks the landing lights status. The following attribute is value. This is the reference value for the Client. Together with the method attribute the Client can then test the current status of the variable to see if the event has to be activated. So, the first three attributes can be read as: "If the status of the landing lights equals 1, then activate the event".

There are additional attributes for more control over the event activation. These are multiple and flightstate. If multiple is set to 1, then the event can be activated several times. So in this case each time the landing lights are turned on, the event gets executed. Setting this value to 0 would only allow this event to be activated the first time the landing lights are turned on. The flightstate attribute restricts the event activation to a single flightstate. Hence if you only want the event to be activated during take off you could set this to takeoff.

Event actions

The final step is to tell the Client what happens when the event is executed. There are two possibilities: Text output to the log or immediate sound output. If you add the text attribute, the text will be shown in the log on the website.

If you add a sound attribute, the defined sound will be immediately played when the event is activated. The Client can play any .wav file which is located in the Client's sound directory. If you want to publish a blackbox.xml to your pilots don't forget to send them the required sound files. Let's give a little example here: Say you want to play a sound file called FL100.wav when the airplane climbs above FL100. First you create a folder for all your personal sound files inside your Client sound directory. This not mandatory but we recommend to do it this way so the different sound files don't get mixed up. We call it my_va. The Client sound folder looks like this then:

sounds/en/*.wav
sounds/my_va/FL100.wav

In the blackbox.xml we have to tell the Client to play this sound when the aircraft climbs above 10,000ft the first time. The final event tag looks like this:

<event var="altitudestd" value="10000" method="greater" multiple="0" sound="my_va/FL100.wav" />

Overview

This section contains two tables giving you a quick overview over all the variables and options you can add to your own blackbox.xml.

Event attributes

attribute possible values standard value
var altitudeagl
altitudestd
flaps
gear
ias
landinglights
vs
ias
value depends on variable (see table below) 0
method less
equal
greater
equal
multiple 0
1
0
flightstate boarding
taxi
takeoff
climb
cruise
descent
landed
undefined
text any text up to 255 characters undefined
sound relative path from Client sound directory to .wav file undefined

Event variables

Variable Values Description
landinglights 0 or 1 Status of the landing lights. 1 = on, 0 = off.
gear 0 or 1 Status of the gear. 1 = down, 0 = up.
flaps 0.0 - 1.0 Status of the flaps. 0 = fully retracted, 1 = fully extended.
ias 0 - 9999 Indicated airspeed (knots).
vs -9999 - 9999 Vertical speed (fpm).
altitudestd 0 - 999999 Altitude above 1013.25hP (Standard atmosphere) in feet.
altitudeagl 0 - 999999 Altitude above ground level (feet).