<SimMission.Calculator>

This is a container element that is used to hold any calculations required for the mission. This element is used as part of the XML file used to generate a mission. Full information on this file can be found here:


This element has the following attributes:

 

Attribute Description Type Required
id The ID string that names the calculator String Yes
InstanceId The unique ID for the calculator, as a GUID enclosed in {}. String Yes
VRDependency When set to TRUE, this sets the calculator as being VR dependent. Default is FALSE. Bool No
OnActivatedValue The initial value on activating the calculator. Float/Int No
OnDeactivatedValue The final value on deactivating the calculator. Float/Int No

 

It can contain the following sub-elements: <Descr>, <Activated><StartValue>, <CalculatorFormula>, <CalculatorParameterList><OnActivationCalculatorActions>, <OnDeactivationCalculatorActions>, and <CalculatorActions>.

 

 

<StartValue>

This sets the start value for the calculations being done in the calculator element. This element is a sub-element of <SimMission.Calculator> and has no attributes. The default value for this element is 0.

 

 

<CalculatorParameterList>

This is a container element has no attributes, and is used to define the parameters for use within <CalculatorFormula>, <SimMission.Calculator>, and <SimMission.AirportCalculator> elements. The parameters it contains are defined using the <FormulaParameter>, <ReferenceParameter>, <InputParameter> and <RunwayParameter> elements.

 

<FormulaParameter>

This is a sub-element of the <CalculatorParameterList> element and is used to create parameters that will be used within the calculator. The element is a container for a <CalculatorFormula> which what will perform the calculation and the result of it will be stored in the parameter, and it may also contain a <StartValue> element. The formula parameter name can be used in other RPN formulas using the X: variable identifier.

 

The element has the following attributes:

 

Attribute Description Type Required
NameInFormula The ID string that names the parameter to be used in the RPN calculator formula. String Yes
OnActivatedValue The value when the calculator using the parameter is activated. Float/Int No
StartValue The initial value for the parameter. The default value is 0. Float/Int No

 

<ReferenceParameter>

This is a sub-element of the <CalculatorParameterList> element and is uses to create parameters that will be used within the calculator. The element has the following attributes:

 

Attribute Description Type Required
id   String  
UniqueRefId   String  
TemplateInstanceId   String  
NameInFormula The ID string that names the parameter to be used in the RPN calculator formula. String Yes
ReferenceParameterName   String  

 

<InputParameter>

This is a sub-element of the <CalculatorParameterList> element and is uses to create a parameter based on the value of a specific input event ID. The element has the following attributes:

 

Attribute Description Type Required
NameInFormula The ID string that names the parameter to be used in the RPN calculator formula. String Yes
InputKey The input Event IDs to use as a parameter. String False

 

<RunwayParameter>

This is a sub-element of the <CalculatorParameterList> element and is only used for calculations within the main <SimMission.AirportCalculator> element. This is used to retrieve a value from an airport runway, which is done by including the sub elements <RunwayNumber>, <RunwayDesignator>, <RunwayPercent>, <WantedParameter>, and <WantedAxis>. The element has the following attributes:

 

Attribute Description Type Required
NameInFormula The ID string that names the parameter to be used in the RPN calculator formula. String Yes

 

<RunwayNumber>

This element is used to tell the simulation what runway number to get the required parameter value from. This is a sub-element of the <RunwayParameter> element and has no attributes.

 

<RunwayDesignator>

This element is used to tell the simulation the designator for the runway that is being used to retrieve the parameter from. This is a sub-element of the <RunwayParameter> element and has no attributes.

 

<RunwayPercent>

This element is used to tell the simulation what runway number to get the required parameter value from. This is a sub-element of the <RunwayParameter> element and has no attributes.

 

<WantedParameter>

This element is used to define the kind of parameter that will be retrieved from the airport runway for use in calculation. Can be one of the following:

  • RelativeDistanceToRunwayPercent
  • RelativePlaneOrientation
  • RunwayOrientation
  • RunwaySize
  • OverRunwayArea

This is a sub-element of the <RunwayParameter> element and has no attributes.

 

<WantedAxis>

This element defines the axis of the parameter to be retrieved. It can be any one of the following:

  • AxisX
  • AxisY
  • AxisZ
  • AxisPitch
  • AxisBank
  • AxisHeading

This is a sub-element of the <RunwayParameter> element and has no attributes.

 

 

<CalculatorFormula>

This container element is used to create an RPN formula that will generally resolve to TRUE or FALSE, depending on the main element that is calling it. This element has no attributes and can be used within the following elements: <SimMission.Calculator>, <SimMission.AirportCalculator><CalculatorAction> , <FormulaParameter>.

 

 

<CalculatorActions>

This element has no attributes and is used to contain one or more <CalculatorAction> elements. It is a sub-element of the main <CalculatorFormula>, <SimMission.Calculator>, and <SimMission.AirportCalculator> elements.

 

 

<OnActivationCalculatorActions>

This element has no attributes and is used to contain one or more <CalculatorAction> elements. It is a sub-element of the main <SimMission.Calculator>, and is used to define the actions to be performed when the calculator is activated.

 

 

<OnDeactivationCalculatorActions>

This element has no attributes and is used to contain one or more <CalculatorAction> elements. It is a sub-element of the main <SimMission.Calculator>, and is used to define the actions to be performed when the calculator is deactivated.

 

 

<CalculatorAction>

This is a container element that is used to define a single calculator action, usually as part of a larger list of <CalculatorActions>. It must contain at least a <CalculatorFormula> sub-element and an <Actions> sub-element (with at least one <SimMission.ObjectReference />). The formula within the calculator action will be performed and if it resolves as TRUE then the action(s) will be performed. This element has the following attributes:

 

Attribute Description Type Required
NameInFormula The ID string that names the parameter to be used in the RPN calculator formula. String Yes
StartValue The initial value for the parameter. The default value is 0. Float/Int No
OnActivatedValue The value when the calculator using the parameter is activated. Float/Int No
OnDeactivatedValue The final value on deactivating the calculator. Float/Int No

 

The element can have any of the following additional sub-elements: <Actions>, <CalculatorFormula>, <DeactivateAfterExecution>, <OnActionCompleteFormula>.

 

<Actions>

This container element is used to define one or more <SimMission.ObjectReference /> elements as the action(s) to be performed when a <CalculatorFormula> resolves as TRUE. It has no attributes, and is included as a sub-element of <CalculatorAction>.

 

<DeactivateAfterExecution>

This sub-element of <CalculatorAction> is used to set whether the action container should be deactivated (set to TRUE) after the calculation has been performed or not (set to FALSE). This element has no attributes, and the default value is FALSE.

 

<OnActionCompleteFormula>

This sub-element of <CalculatorAction> is used to define the RPN formula that should be executed at the end of the queued up actions. The element has no attributes and no default value.