# Travelbook Objective XML Properties The `.xml` file goes in the *objectives* asset group that makes up the TravelBook package. Within this file you must define a main objective for the associated travel book page (defined using the [Travelbook Page XML Properties](travelbook-page-xml/)), and - optionally - include additional *bonus* objectives. The nature of these optional bonus objectives will depend on the aircraft being used and the theme of the travel book page.   This file is formatted using [XML](../../../devmode/editors/project-editor/file-formats/xml-files/) and can be edited by using any text editor. The general format for the file is as follows: ``` xml   [TITLE] [DESCRIPTION] [ADDITIONAL INFORMATION [IMAGE] [TRAVELBOOK PAGE ID]     [WEATHER PRESET]   [NAME] [LIVERY] TRUE [MAIN OBJECTIVE TITLE] [Additional Information]   ```   Here you *must* include the `` element and it's `type` needs to be "Photo Objective". You would then add the `` element and everything required for defining the objectives within that element. Below you can find information on the different sections used in the `.xml` file as well as what parameters and values are expected within them.   For more information on how this file should be used, please see here: - [Travelbook Setup (World Photographer Missions)](travelbook-setup/)     ### <SimBase.Document> This is the main parent element that is used to contain the travelbook page objective data. This element must have the following sub-element: 1. ``   This element also has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|----------------------------------------------------------------------------------------------------|--------|:--------:| | `type` | The type of SimBase file. Should always be "Photo Objective" for the world photography objectives. | String | Yes | | `version` | The file version, must be 1.0. | Float | No | {{< /table-wrapper >}}     ### <TravelBook.Objective> This is the main container element for all the sub-elements required to define the travelbook main and bonus objectives. The element has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The unique ID for the objective, as a {{< glossterm >}}guid{{< /glossterm >}} enclosed in `{}`. You can find more information on GUID's here: [GUIDs](../../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}   This element can contain the following sub-elements: 1. `` 2. `<Descr>` 3. `<Trivia>` 4. `<Picture>` 5. `<PageId>` 6. `<ObjectiveType>` 7. `<ObjectiveWorldData>` 8. `<WeatherPreset>` 9. `<DateRecommended>` 10. `<TimeOfDayRecommended>` 11. `<AircraftRecommended>` 12. `<Requirements>`     ### <Title> This is a sub-element of `<TravelBook.Objective>` and `<Requirement>`, has no attributes, and is used to either:   - Give the title of the Travelbook page. It will be used in the simulation UI for the page, as shown in the images below, and can be localised: {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_3_objectivetitle1.png" alt="Page Title On The Main Page Screen In The Simulation" >}} {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_3_objectivetitle2.png" alt="Page Title On The Objective Screen In The Simulation" >}}   - Give the title of an objective or bonus objective. It will be used in the simulation UI for the Objective, as shown in the images below, and can be localised: {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_9_reqtitle_1.png" alt="Main Objective Title On The Page Screen In The Simulation" >}} {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_9_reqtitle_2.png" alt="Bonus Objective Title On The Page Screen In The Simulation" >}}   For example: ``` xml <Title>Moonrise On Christ The Redeemer ```     ### <Descr> This is a sub-element of `` and ``, has no attributes, and is used to either:   - Provide a description for the objective page. This is *not* shown in the simulation, but should still be included as a way to identify what the objective is. - Provide a description of a *bonus* objective (this is not used for the *mandatory* objective, but should still be included). This text is usually used to provide helpful information that tells the user how the bonus objective may be achieved. {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_10_reqdescr.png" alt="The Bonus Objective Description In The Simulation UI" >}}     ### <Trivia> This is a sub-element of `` and is used to provide a brief bit of information and trivia about the location/object that is the objective, and it can be localised. It will be shown on the main screen for the objective, as shown in the image below: {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_4_objectivetrivia.png" alt="An Example Of Trivia Text In The SImulation UI" >}}   For example: ``` xml This was once a pilgrimage location for worshiping pagan divinities, but now it's a popular tourist location surrounded by lush forests and tranquil lakes. ```     ### <Picture> This is a sub-element of `` and is used to define a picture that will be used to illustrate the objective. It should be representative of what the user will be doing or where the user will be going, and is a `*.jpg` image authored using a 16:9 aspect ratio (recommended size is 2560x1440px). Note that the path you supply here - much like for the page `Picture` attribute - should start from the top level of the *built* package, not the sources folder.   In the simulation it will be used here: {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_5_objectiveimage.png" alt="The Picture Element As Shown In The Simulation UI" >}}   For example: ``` xml TravelBook\Objectives\MyCompany\Objectives\Pictures\Objective_1.jpg ```     ### <PageId> This is a sub-element of `` and is used to identify the travelbook page that the objective belongs to. This is supplied as a {{< glossterm >}}guid{{< /glossterm >}} enclosed in `{}` and comes from the page `InstanceID` attribute.   For example: ``` xml {35BC559B-E4C3-6F02-871C-A144BECEA03A} ```     ### <ObjectiveType> This is a sub-element of `` and is used to set what type of objective is being defined. There are three to choose from, and each one will modify the sub-elements used in the objective, as well as the "flow" of the travelbook mission: - **Position** - Used for objectives with a main subject in a fixed position in the world. Displays a “subject” card on the world map. Requires the `` element to be defined if used. If no `` element is used, then this will be the default type. - **Traffic** - The Objective will use the flow for plane spotting, and display defined airplanes on the worldmap. Requires at least 1 `` to be defined in the world data to be able to work. - **Polygon** - The Objective will use the flow for fauna objectives and display spawning areas for the defined species on the world. Requires at least 1 `` to be defined in the world data to be able to work.   For example: ``` xml Traffic ```     ### <ObjectiveWorldData> This is a sub-element of `` and is used to supply data related to the location of the travelbook objective. The element has no attributes, and can take the following sub-elements.   1. `` 2. `` 3. `` 4. ``     #### <ObjectiveWorldPosition> This is a sub-element of `` and is a container element used to set the *general* position of the main objective in the world. This element has no attributes and requires the following sub-elements: 1. `` 2. `` 3. ``   For example: ``` xml S34* 44' 19.44",E167* 33' 55.21",+16063761.21 0.0001 0.01 ```     ##### <WorldPosition> This is a sub-element of ``, ``, ``, ``, and ``. It defines a position in the world where:   - When used in `` and the `` is set to **Location**, it is the *general* location for the objective, normally somewhere between the location of the photographic subject and the location where the flight starts. It is shown on the main world map with a marker, as shown in the image below: {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_6_objectivelocation.png" alt="Location Marker Using World Position In The Simulation UI" >}}   - When used in `` it is the *exact* location of the subject to be photographed, and is also where the subject title card will be placed, as shown in the image below. {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_7_objectivesubjectloc.png" alt="Location Marker Using Subject Position In The Simulation UI" >}}   - When used in `` it is the *initial* location for the user when they start the flight, which will be shown the first time the select an objective, as shown in the image below. {{< image-center src="images/5_Content_Config/Missions/travelbooks/tb_xml_8_objectivestart.png" alt="Location Marker Using Subject Position In The Simulation UI" >}}   - When used with the `` element, it defines the *center* of the box.   - When used with the `` element, it defines the *center* of the sphere.   The element has no attributes, and it takes a string of data using the format: <Latitude \[CompassDirection\]\[Degrees\*\]\[Minutes'\]\[Seconds"\]>, <Longitude \[CompassDirection\]\[Degrees\*\]\[Minutes'\]\[Seconds"\]>, <Altitude+/->   For example: ``` xml N35* 11' 48.42",W106* 35' 53.15",+00200.05 ```   Note that the altitude value can be modified for {{< glossterm >}}agl{{< /glossterm >}} or {{< glossterm >}}msl{{< /glossterm >}} with the `` element.     ##### <WorldMapZoomRatio> This is a sub-element of `` and defines the zoom level for the camera when the objective is selected (between 0 and 1). However, **this is not used by the simulation but *the element is still required***. For example: ``` xml 0.01 ```     ##### <AltitudeIsAGL> This is a sub-element of `` and `` and defines whether the `` altitude should be based on {{< glossterm >}}agl{{< /glossterm >}} (True) or {{< glossterm >}}msl{{< /glossterm >}} (False). For example: ``` xml True ```     #### <ObjectiveSubjectWorldData> This is a sub-element of `` and is used to and is only used when the `` is set to **Location**. This is used to set the location of the "subject" card in the world, ie: the exact location of the subject to be photographed. This can be achieved using two different methods: 1. Using the `` and `` sub-elements. 2. Using the `` sub-element.   For example: ``` xml SUBJECT TITLE N35* 5' 17.95",W106* 38' 28.91", 000 {1DBD3AD9-7104-49E2-9BA3-6506235112A0} ```     ##### <Name> This is a sub-element of various other objective XML elements, and has no attributes and can be localised. It can be used in the following: 1. `` - Give the *location subject* a name string. 2. `` - Give a *filter criteria* from: - a species {{< glossterm >}}guid{{< /glossterm >}} for **Animal** filters (see the [Animal GUIDs](travelbook-lists/#animal-guid) section). - an aircraft type {{< glossterm >}}icao{{< /glossterm >}} for **Aircraft** filters (listed here: [Aircraft Variations And Liveries](travelbook-lists/#variations)). 3. `` - Give the name of an *aircraft variation* as the recommended aircraft (see the [Aircraft Variations And Liveries](travelbook-lists/#variations) section). 4. `` - Give the name of the SimObject that forms the subject of the objective, so it can be displayed in the simulation.     ##### <WorldLocationName> This is a sub-element of `` and is used to define a subject marker using either the {{< glossterm >}}guid{{< /glossterm >}} (enclosed in `{}`) of {{< glossterm >}}poi{{< /glossterm >}} in the world, or an {{< glossterm >}}icao_code{{< /glossterm >}}. The subject card name will then be extracted from this for display.     #### <ObjectiveRecommendedDeparture> This is a sub-element of `` and is used to define a recommended departure point for the objective (the user can change this if they wish). This should be somewhere near the subject, but still require some flying and positioning to get to the location and get the photograph. The element has no attributes and requires the following sub-elements: 1. `` 2. `` 3. `` 4. ``   For example: ``` xml N36* 58' 31.58",W110* 4' 45.85",+006212.00 FALSE 0,0,-11 0,0,0 ```     ##### <LocalOrientation> This is a sub-element of `` and is used to set the orientation of the aircraft. The element has no attributes and requires three values - pitch, bank, heading - separated by commas.     ##### <LocalOffsetXYZ> This is a sub-element of `` and is used to offset the aircraft starting location relative to the recommended departure position. The element has no attributes and requires three values - X-axis, Y-axis, Z-axis - separated by commas.     #### <ObjectiveFilter> This is a sub-element of `` and is *required* if the `` is set to **Polygon** or **Traffic**. Filters are used to narrow down locations in the world where you can find the objective of the mission. The element has no attributes but requires the following sub-elements: 1. `` 2. ``   For example: ``` xml Animal {2FEA1AE1-1B3A-483E-B4B9-E9043AFF3BDA} ```     ##### <FilterType> This is a sub-element of `` and is used to set one or more filters to be used when the `` is set to **Polygon** or **Traffic**. If more than one filter is supplied, then multiple areas in the world may be highlighted, as long as they match the given filter. The element has no attributes and can be one of the following strings: - **Animal** - Used with the *polygon* objective type to define areas where a given animal can be found. Animals should be defined in the accompanying `` element using their {{< glossterm >}}guid{{< /glossterm >}} (see [Animal GUIDs And Container Titles](travelbook-lists/#animal-guid)). - **Aircraft** - Used with the *traffic* objective type to define an aircraft to be spotted. You should use the aircraft ICAO in the accompanying `` element to identify the aircraft (see [Aircraft Variations And Liveries](travelbook-lists/#variations)).     ### <WeatherPreset> This is a sub-element of `` and is used to define the weather preset XML to use as default for the objective. The element has no attributes and requires the `` sub-element. For example: ``` xml TravelBook\Objectives\MyCompany\Objectives\WeatherPresets\ThisObjectiveWeather.wpr ```   Note that if this element is omitted, the objective will use the current **Live Weather** for the objective location.     #### <File> This is a sub-element of `` and is used to assign a [Weather XML (\*.WPR)](../weather-xml-properties/) to the objective to set up the default weather (this can be changed by the user). Note that the path you supply here - much like for the page `Picture` attribute - should start from the top level of the *built* package, not the sources folder.     ### <DateRecommended> This is a sub-element of `` and is used to define the default date on which the objective flight takes place (this can be changed by the user). This element requires no sub-elements, and has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------------------------------------------------------|---------|:--------:| | `Day` | This is the day of the month that the flight starts on, expressed as an integer value between 1 and 31 (inclusive). | Integer | Yes | | `Month` | This is the day of the month that the flight starts on, expressed as an integer value between 1 and 12 (inclusive). | Integer | Yes | | `Year` | Thisis the year that the flight takes place on. | Integer | No | {{< /table-wrapper >}}   Note that if this element is omitted, the objective will use the current date.     ### <TimeOfDayRecommended> This is a sub-element of `` and is used to define the default time at which the objective flight takes place (this can be changed by the user). This element requires no sub-elements, and has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|-------------------------------------------------------------------------------------------------------------------|---------|:--------:| | `Hour` | This is the hour of the day at which the objective takes place, expressed as an integer from 1 to 24 (inclusive). | Integer | Yes | | `Minute` | This is the minute at which the objective takes place, expressed as an integer from 0 to 59 (inclusive). | Integer | Yes | | `Second` | This is the second at which the objective takes place, expressed as an integer from 0 to 59 (inclusive). | Integer | No | {{< /table-wrapper >}}   Note that if this element is omitted, the objective will use the current time.     ### <AircraftRecommended> This is a sub-element of `` and is used to define the recommended aircraft for a specific objective (this can be changed by the user). The element has no attributes and uses the following sub-tags to define the aircraft variation and (optionally) the livery it should use: 1. `` 2. ``   For example: ``` xml XCub Passengers OFFICIAL_STATIC_01 ```     #### <Livery> This is a sub-element of `` and is used to define the livery used by the recommended aircraft. This is an optional element and if it's not included, then the default livery will be used. If you do include it, then the name supplied here is the **livery ID**, which can be found using either the [Aircraft Selector](../../../devmode/menus/tools/#aircraft_selector) or the table on the [Travelbook Lists](travelbook-lists/) page.     ### <Requirements> This is a sub-element of `` and is a container element used to hold the definitions of the different mission requirements. For each objective there *must* be at least one requirement, which is the *main* objective, and then you can add additional *bonus* requirements. This element has no attributes and acts as a container element for one or more `` sub-elements.     #### <Requirement> This is a sub-element of `` and is used to define a specific requirement for an objective or a bonus objective. You must have at least one **mandatory** requirement, which is the main objective, and then you may have additional requirements for the bonus objectives. This element has no attributes and can contain the following sub-elements: 1. `` 2. `` 3. `<Descr>` 4. `<Subjects>` 5. `<Contexts>` 6. `<Constraints>`   For example: ``` xml <Requirement> <IsMandatory>TRUE</IsMandatory> <Title>TT:OBJECTIVE.GENERIC.TIMEOFDAY.DESC</Descr> <Subjects> <Weather Id="Sun"> <WeatherSubject>Sun</WeatherSubject> </Weather> </Subjects> <Contexts> <Conditions> <Period Id="Winter"> <From day="21" month="12" /> <To day="31" month="12" /> </Period> <Period Id="Winter2"> <From day="1" month="1" /> <To day="21" month="3" /> </Period> <TimeOfDay> <Id>Time Dusk</Id> <TimeOfDayType>Dusk</TimeOfDayType> </TimeOfDay> <RotationConstraint Id="FacingWest"> <RelativeAxis> <ZMin>225</ZMin> <ZMax>315</ZMax> </RelativeAxis> </RotationConstraint> </Conditions> <Formula> (X:Winter) (X:Winter2) or (X:Time Dusk) and (X:FacingWest) and </Formula> </Contexts> </Requirement> ```     #### <IsMandatory> This is a sub-element of `<Requirement>` and has no attributes. It is used to define whether the objective is *mandatory* or not. Every objective page requires **one mandatory objective**, which is set using this element set to "TRUE" (this element can be set to "FALSE" or omitted for bonus objectives), for example: ``` xml <IsMandatory>TRUE</IsMandatory> ```     ### <Subjects> This is a container sub-element of `<Requirement>` and is used to define one or more subjects to be used as part of the requirements for an objective. This element is mandatory for the *main* objective, but may not be necessary for the bonus objectives. This element has no attributes, and can have the following sub-elements: 1. `<User>` 2. `<SimObject>` 3. `<Airport>` 4. `<POI>` 5. `<Weather>` 6. `<SubSubject>`     #### <User> This is a sub-element of `<Subjects>` and has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------|--------|:--------:| | `Id` | This is a string used to identify the subject elsewhere in the XML. | String | Yes | {{< /table-wrapper >}}   It is used to detect the user as a subject for the photograph objective (whether it's the avatar or the aircraft), and can have the following sub-elements: 1. `<Count />` 2. `<ScreenSize />` 3. `<Conditions>` 4. `<Formula>`   For example: ``` xml <User Id="PlayerCharacter"> <ScreenSize MinSize="0.05"/> <Conditions> <InBox> <Id>IsOverSouthRidge</Id> <SizeXYZ>700, 30000, 6000</SizeXYZ> <Orientation>0, 0, -13.670</Orientation> <WorldPosition>N36* 39' 23.36",W108* 49' 54.40",+006921.54</WorldPosition> </InBox> </Conditions> </User> ```     ##### <Count /> This is a self-closing sub-element of the subject elements (`<User>`, `<SimObject>`, `<Airport>`, `<Location>`, `<POI>`, `<Weather>`, and `<SubSubject>`), and is used to define how many instances of this subject must be visible on screen. The element has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |------------|------------------------------------------------------------------------|---------|:--------:| | `MinCount` | The minimum number of this subject required to validate the objective. | Integer | No | | `MaxCount` | The maximum number of this subject required to validate the objective. | Integer | No | {{< /table-wrapper >}}   It should be noted that if this element is not included in the subject definition, then it will default to a minimum count of 1, and that neither of the attributes is required (if a minimum is supplied and no maximum, then any number over the minimum will validate, and if a maximum is supplied and no minimum, then any number from 1 to the maximum will validate).   For example: ``` xml <Count MinCount="1" MaxCount="5" /> ```     ##### <ScreenSize /> This is a self-closing sub-element of the subject elements (`<User>`, `<SimObject>`, `<Airport>`, `<Location>`, `<POI>`, `<Weather>`, and `<SubSubject>`), and is used to define the minimum size the subject should be on screen. It has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------------------------------------------------------|-------|:--------:| | `MinSize` | This is the minimum size that the subject should be when it's being displayed on the screen for it to be validated. | Float | Yes | {{< /table-wrapper >}}   For example: ``` xml <ScreenSize MinSize="10"/> ```     ##### <Formula> This element has no attributes and can be used as a sub-element of the following: 1. `<User>` 2. `<SimObject>` 3. `<Airport>` 4. `<Location>` 5. `<POI>` 6. `<Weather>` 7. `<SubSubject>` 8. `<Context>`   It is used to define a [Reverse Polish Notation](../../../programming-apis/reverse-polish-notation/) formula that will validate the subject or context. For example: ``` xml <Formula> (X:Plane1) (X:RaquetteLake_Polygon) and </Formula> ``` Note that if no formula is defined, the subject will require *all* parameters of the subject (and/or any conditions) to be true.     #### <SimObject> This is a sub-element of `<Subjects>` and has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------|--------|:--------:| | `Id` | This is a string used to identify the subject elsewhere in the XML. | String | Yes | {{< /table-wrapper >}}   It is used to detect a SimObject as a subject for the photograph objective, and can have the following sub-elements: 1. `<Name>` 2. `<Count />` 3. `<ScreenSize />` 4. `<UnicIdentifier>` 5. `<PartialIdentifier>` 6. `<AIType>` 7. `<Conditions>` 8. `<Formula>`   For example: ``` xml <SimObject Id="PassivePlane-1"> <AIType>Airplane</AIType> <ScreenSize MinSize="0.5"/> <Count MinCount="1"/> <UnicIdentifier>Asobo Passive B717 200</UnicIdentifier> </SimObject> ```     ##### <UnicIdentifier> This is a sub-element of `<SimObject>` and is used to give the title of the SimObject to be used as the subject (You can find a list of aircraft titles that can be used in this element for aircraft-spotting objectives here: [Passive Aircraft Container Titles](travelbook-lists/#passive-aircraft). You can find a list of animal titles that can be used in this element for animal-spotting objectives here: [Animal GUIDs And Container Titles](travelbook-lists/#animal-guid)). For example: ``` xml <UnicIdentifier>Asobo Passive B717 200</UnicIdentifier> ``` Note that if you do not know the full title, or wish to include multiple possible SimObjects as the subject, you can include only a part of the container title - eg: "giraffe" - and then use the `<PartialIdentifier>` element, set to "TRUE".     ##### <PartialIdentifier> This is a sub-element of `<SimObject>` and - when set to "TRUE" - is used to tell the simulation that the container title given in the `<UnicIdentifier>` element is a *partial* title. In this way you can target multiple SImObjects as the subject, as long as they all share the text given in the identifier element. For example: ``` xml <UnicIdentifier>A350</UnicIdentifier> <PartialIdentifier>True</PartialIdentifier> ```     ##### <AIType> This is a sub-element of `<SimObject>` and is used to define the type of AI that the SimObject subject should have. The AI Types available are: Aircraft\_Pilot Airplane AirplanePlayback AirportAmbient Airship Animal ApronControlVehicle BaggageCart BaggageLoader BoardingRamp Boat CateringTruck Container ControlTower FakeSim FlyingAnimal FuelTruck GroundPowerUnit GroundVehicle GroundVehicle\_Pilot Helicopter HotAirBalloon Human IdleWorker Jetway Linked\_Object Liquid LivingWorld Marshaller Mast OLSA ParachuteObject PushBack Server SimpleObjectSim SmallPushBack TowPlane Train VehicleFollower WanderBoat WaterTraffic Winch WingRunner   For example: ``` xml <AIType>Airplane</AIType> ```     #### <Airport> This is a sub-element of `<Subjects>` and has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |---------------------|---------------------------------------------------------------------------------------------|---------|:--------:| | `Id` | This is a string used to identify the subject elsewhere in the XML. | String | Yes | | `ICAO` | This is the {{< glossterm >}}icao{{< /glossterm >}} of the subject airport. | String | Yes | | `ControlTowerCount` | This is the minumum number of control towers that should be in the frame for the objective. | Integer | No | | `RunwayCount` | This is the minumum number of runways that should be in the frame for the objective. | Integer | No | | `HelipadCount` | This is the minumum number of helipads that should be in the frame for the objective. | Integer | No | | `ParkingCount` | This is the minumum number of parking spots that should be in the frame for the objective. | Integer | No | {{< /table-wrapper >}}   It is used to detect an airport as the subject for the photograph objective, and it can have the following sub-elements: 1. `<Name>` 2. `<Count />` 3. `<ScreenSize />` 4. `<Conditions>` 5. `<Formula>`   For example: ``` xml <Airport Id="PohnpeiAirport" ICAO="PTPN" RunwayCount="1"> <Name>@asobo-travelbook-airportspotting-pacific,TT:POHNPEI.SUBJECT1</Name> <ScreenSize MinSize="0.05"/> <Conditions> <PercentageVisible Id="PercentageAirportVisible"/> </Conditions> <Formula> (X:PercentageAirportVisible) 15 > </Formula> </Airport> ```     #### <POI> This is a sub-element of `<Subjects>` and has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------|--------|:--------:| | `Id` | This is a string used to identify the subject elsewhere in the XML. | String | Yes | {{< /table-wrapper >}}   It is used to detect one or more {{< glossterm >}}poi{{< /glossterm >}} as the subject for the objective, and can have the following sub-elements: 1. `<InstanceId>` 2. `<Count />` 3. `<ScreenSize />` 4. `<Conditions>` 5. `<Formula>`   For example: ``` xml <POI Id="Desert"> <InstanceId>{4A8ED5B9-C6EC-409A-BFEF-BD9D232F9DB1}</InstanceId> <ScreenSize MinSize="5"/> </POI> ```     ##### <InstanceId> This is a sub-element of `<POI>`, has no attributes, and is used to supply the {{< glossterm >}}guid{{< /glossterm >}} of a point of interest in the world (enclosed in `{}`). For example: ``` xml <InstanceId>{C94C574F-0603-458A-BE91-B2686A0111EC}</InstanceId> ```     #### <Weather> This is a sub-element of `<Subjects>` and has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------|--------|:--------:| | `Id` | This is a string used to identify the subject elsewhere in the XML. | String | Yes | {{< /table-wrapper >}}   It is used to detect the a weather phenomenon as a subject for the frame of an abjective, and can have the following sub-elements: 1. `<WeatherSubject>` 2. `<Count />` 3. `<ScreenSize />` 4. `<Conditions>` 5. `<Formula>`   For example: ``` xml <Weather Id="Sun"> <WeatherSubject>Sun</WeatherSubject> <Conditions> <PositionScreenConstraint Id="PlaneAndSunAligned"> <RelativeAxis> <XMin>-8</XMin> <XMax>8</XMax> <YMin>-8</YMin> <YMax>8</YMax> </RelativeAxis> <ListName>A330TakingOff</ListName> </PositionScreenConstraint> </Conditions> </Weather> ```     ##### <WeatherSubject> This is a sub-element of `<Weather>` and is used to give the name of the weather phenomenon that should be included as part of the frame for the objective. It can be one of the following strings: 1. Sun 2. Moon 3. Tornado     #### <SubSubject> This is a sub-element of `<Subjects>` and has the following attribute:   <table><thead><tr class="header"><th>Attribute</th><th>Description</th><th>Type</th><th>Required</th></tr></thead><tbody><tr class="odd"><td><code>Id</code></td><td>This is a string used to identify the sub-subject elsewhere in the XML.</td><td>String</td><td>Yes</td></tr><tr class="even"><td><code>SubjectReference</code></td><td><p>This is a reference string that takes the <code>Id</code> of another subject.</p><p><strong>IMPORTANT!</strong> This reference must be for a subject that has <strong>already been declared in the XML</strong>, ie: You can’t link a subject that is declared after this element in the XML file.</p></td><td>String</td><td>Yes</td></tr></tbody></table>   It is used to reference a pre-existing subject and adds or modifies detection parameters for the objective using conditions and/or formulas. for example, if you have an animal subject in the main objective for "photograph animal", you can have the same animal subject as sub-subject for the bonus objective "photograph the same animal, but in close-up". It can have the ifollowing sub-elements: 1. `<Count />` 2. `<ScreenSize />` 3. `<Conditions>` 4. `<Formula>`   For example: ``` xml <Subjects> <SubSubject Id="AnimalSubject01_x1" SubjectReference="AnimalSubject01"> <Count MinCount="1"/> </SubSubject> <SubSubject Id="AnimalSubject02_x1" SubjectReference="AnimalSubject02"> <Count MinCount="1"/> </SubSubject> <SubSubject Id="AnimalSubject03_x1" SubjectReference="AnimalSubject03"> <Count MinCount="1"/> </SubSubject> <Formula> (X:AnimalSubject01_x1) + (X:AnimalSubject02_x1) + (X:AnimalSubject03_x1) 1 > </Formula> </Subjects> ```     ### <Contexts> This is a sub-element of `<Requirement>` and is used to add specific context details to the objective, *regardless* of the subject. For example, if you require the objective to be framed during a specific time of day or during a specific weather event, or even from a specific altitude. This element has no attributes and can have the following sub-elements: 1. `<Conditions>` 2. `<Formula>`   For example: ``` xml <Contexts> <Conditions> <RotationConstraint Id="TopDown"> <RelativeAxis> <XMin>50</XMin> </RelativeAxis> </RotationConstraint> </Conditions> <Formula> (X:TopDown) </Formula> </Contexts> ```     ### <Constraints> This is a sub-element of `<Requirement>` which has no attributes and is used to define some very specific constraints for the objective, regardless of the subject. Constraints are defined using the following sub-elements: 1. `<BufferedTime>` 2. `<LiveWeather>` 3. `<LiveTime>`   For example: ``` xml <Constraints> <BufferedTime>TRUE</BufferedTime> </Constraints> ```     #### <BufferedTime> This is a sub-element of `<Constraints>`, has no attributes, and is used to constrain the time settings to be within the simulation buffered time, which is 24hours. If used, then it should be set to "TRUE" to use buffered time, or "FALSE" to not use it (which is the default behaviour if the element is omitted).     #### <LiveWeather> This is a sub-element of `<Constraints>`, has no attributes, and is used to set the live weather constraint. If set to "TRUE" then the objective should be performed using Live Weather, and if set to "FALSE" then it shouldn't (this is the default behaviour if the element is omitted).     #### <LiveTime> This is a sub-element of `<Constraints>`, has no attributes, and is used to set the live time constraint. If set to "TRUE" then the objective should be performed using Live Time, and if set to "FALSE" then it shouldn't (this is the default behaviour if the element is omitted).     ### <Conditions> This element has no attributes and can be used as a sub-element of the following: 1. `<User>` 2. `<SimObject>` 3. `<Airport>` 4. `<Location>` 5. `<POI>` 6. `<Weather>` 7. `<SubSubject>` 8. `<Context>`   This element is used to define additional parameters that can be assigned to either **subjects** or **contexts** which can then be used in their **formulas**, where: - if assigned to a subject, the condition typically applies to the subject itself - If assigned to a context, the condition applies to something that isn't the subject (most commonly the camera). For example, the `<InBox>` condition applied to a *subject* will require the subject itself to be in the defined box, with the camera can be outside of it. If `<InBox>` is applied to a *context*, then it's the camera that needs to be in the box. The available sub-elements that can be used in conditions are listed below, grouped by which parent element they can be applied to:   - **Context Only** 1. `<TimeOfDay>` 2. `<WeatherContext>` 3. `<CameraPointOfView>` 4. `<WindSpeedKTS>` 5. `<Period>` 6. `<LocalTime>`   - **Subject Only** 1. `<PercentageVisible>` 2. `<Aircraft>`   - **Context And Subject** 1. `<AltitudeAGLMeter>` 2. `<AltitudeMeter>` 3. `<InBox>` 4. `<InSphere>` 5. `<InAirport>` 6. `<InPolygon>` 7. `<Cabin>` 8. `<PositionScreenConstraint>` 9. `<PositionConstraint>` 10. `<RotationConstraint>`     #### <TimeOfDay> This is a sub-element of `<Conditions>` (context only) and is used to check if the time of day for the objective falls within one of the given day phases. The element has no attributes and requires the following two elements: 1. `<Id>` 2. `<TimeOfDayType>`   For example: ``` xml <TimeOfDay> <Id>Time Dusk</Id> <TimeOfDayType>Dusk</TimeOfDayType> </TimeOfDay> ```     ##### <TimeOfDayType> This is a sub-element of `<TimeOfDay>` and simply checks the time of day to see if it falls within one of the the given general *phases*. The possible strings that can be used for the phases of the day are as follows: - **Day** - **Dusk** - **Dawn** - **Night**     #### <WeatherContext> This is a sub-element of `<Conditions>` (context only), has no attributes, and is used to detect if the weather for the flight falls within one of the given general categories. The element requires the following two sub-elements: 1. `<Id>` 2. `<WeatherConditionType>`   For example: ``` xml <WeatherContext> <Id>WeatherClear</Id> <WeatherConditionType>WEATHER_CLEAR_SKY</WeatherConditionType> </WeatherContext> ```     ##### <WeatherConditionType> This is a sub-element of `<WeatherContext>`, has no attributes, and simply checks the current weather to see if it falls within one of the the given general *categories*. The possible strings that can be used are as follows: - **WEATHER\_CLEAR\_SKY** - **WEATHER\_FEW\_CLOUDS** - **WEATHER\_BROKEN\_CLOUDS** - **WEATHER\_SCATTERED** - **WEATHER\_OVERCAST** - **WEATHER\_HIGH\_CLOUDS** - **WEATHER\_RAIN** - **WEATHER\_STORM**     #### <CameraPointOfView> This is a sub-element of `<Conditions>` (context only) and is used to check if the camera point of view is correct for the objective. The element has no attributes and requires the following two elements: 1. `<Id>` 2. `<PointOfView>`   For example: ``` xml <CameraPointOfView> <Id>Point Of View</Id> <PointOfView>Drone</PointOfView> </CameraPointOfView> ```     ##### <PointOfView> This is a sub-element of `<CameraPointOfView>`, has no attributes, and simply checks the current camera setting to see if it falls within one of the given camera types. The possible strings that can be used are as follows: - **Cockpit** - **Drone**     #### <WindSpeedKTS> This is a sub-element of `<Conditions>` (context only) and is used to retrieve the current windspeed, in {{< glossterm >}}knots{{< /glossterm >}}. The element has no attributes and requires the following element: 1. `<Id>`   For example: ``` xml <WindSpeedKTS> <Id>Time Dusk</Id> </WindSpeedKTS> ```     #### <Period> This is a sub-element of `<Conditions>` (context only) and is used to check if the time of day for the objective falls within one of the given day phases. Note that the date period can be only *from*, or only *to*, or be a range between the *to* and *from* dates given, and you do not have to supply a year or a month for the period (in those cases the check will be done yearly/monthly). {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} These checks are constrained to be between Jan 1st to Dec 31. If you want to check a period that spans accross the New Year, you’ll need to set up 2 period conditions - one ending at the end of the year, and the other one starting at the start of the next year. {{< /callout >}}   The element has no attributes and requires the following three sub-elements: 1. `<Id>` 2. `<From>` 3. `<To>`   For example: ``` xml <Contexts> <Conditions> <Period> <Id>Winter</Id> <From day="20" month="12" /> <To day="31" month="12" /> </Period> <Period> <Id>Winter2</Id> <From day="01" month="1" /> <To day="20" month="3" /> </Period> </Conditions> <Formula> (X:Winter) (X:Winter2) or </Formula> </Contexts> ```     ##### <From> This is a sub-element of `<Period>` and is used to define the *from* date of the period. It has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|----------------------------------------------|---------|----------| | day | The day of the month to use (from 1 to 31). | Integer | Yes | | month | The month of the year to use (from 1 to 12). | Integer | No | | year | The year to use. | Integer | No | {{< /table-wrapper >}}     ##### <To> This is a sub-element of `<Period>` and is used to define the *to* date of the period. It has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|----------------------------------------------|---------|----------| | day | The day of the month to use (from 1 to 31). | Integer | Yes | | month | The month of the year to use (from 1 to 12). | Integer | No | | year | The year to use. | Integer | No | {{< /table-wrapper >}}     #### <LocalTime> This is a sub-element of `<Conditions>` (context only) and is used to get the local time (in seconds) of the flight to be used in a formula. The element has no attributes and requires the following sub-element: 1. `<Id>`   For example: ``` xml <Conditions> <LocalTime> <Id>TimeOfDay</Id> </LocalTime> </Conditions> <Formula> (X:TimeOfDay) 43200 < </Formula> ```     #### <PercentageVisible> This is a sub-element of `<Conditions>` (subject only) and is used to retrieve the amount of the subject currently visible on-screen, expressed as a percentage. The element has no attributes and requires the following sub-element: 1. `<Id>`   For example: ``` xml <Conditions> <PercentageVisible> <Id>PADKVisible</Id> <PercentageVisible> </Conditions> <Formula> (X:PADKVisible) 50 > </Formula> ```     #### <Aircraft> This is a sub-element of `<Conditions>` (subject only) and is used to check specific details related to an aircraft. It should be noted that when using this, the `<Id>` element is obligatory, and there *must be at least **one** other element* included to setup the condition. Additionally, you can only check aircraft that are of the following `Object_Class` types: Airplane, Helicopter, Glider, Balloon, Airship, Gyroplane, TiltRotor.   The element has no attributes and has the following possible sub-elements: 1. `<Id>` 2. `<Cabin>` 3. `<AtcId>` 4. `<TypeRole>` 5. `<IcaoType>` 6. `<IcaoManufacturer>` 7. `<IcaoModel>` 8. `<IcaoEngineType>` 9. `<IcaoEngineCount>` 10. `<IcaoEWTC>` 11. `<IcaoAirline>` 12. `<IsGeneric>`   For example: ``` xml <Conditions> <Aircraft> <Id>Plane-1</Id> <IcaoType>B38M</IcaoType> <Cabin> <Tag Value="COF-PCC"/> </Cabin> </Aircraft> </Conditions> <Formula>(X:Plane-1) </Formula> ```     ##### <AtcId> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the registration number of the aircraft, as defined in the `atc_id` parameter. For example: ``` xml <AtcId>F-JACF</AtcId> ```     ##### <TypeRole> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the typical aircraft role assigned to the aircraft, as defined in the `ui_typerole` parameter. For example: ``` xml <TypeRole>Single Engine Prop</TypeRole> ```     ##### <IcaoType> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO type designator of the aircraft (all possible values are available from the [ICAO official database](https://www2023.icao.int/publications/doc8643/pages/search.aspx), and those recognised by the simulation can be found on the [Aircraft Variations And Liveries](travelbook-lists/#variations) page). The value checked here is that defined in the `icao_type_designator` parameter. For example: ``` xml <IcaoType>F-JACF</IcaoType> ```     ##### <IcaoManufacturer> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO designated manufacturer of the aircraft, as defined in the `icao_manufacturer` parameter. For example: ``` xml <IcaoManufacturer>CESSNA</IcaoManufacturer> ```     ##### <IcaoModel> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO designated model name of the aircraft, as defined in the `icao_model` parameter. For example: ``` xml <IcaoModel>208 Grand Caravan</IcaoModel> ```     ##### <IcaoEngineType> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO designated engine type of the aircraft, as defined in the `icao_engine_type` parameter. For example: ``` xml <AtcId>Turboprop/Turboshaft</AtcId> ```     ##### <IcaoEngineCount> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO designated engine count of the aircraft, as defined in the `icao_engine_count` parameter. For example: ``` xml <IcaoEngineCount>2</IcaoEngineCount> ```     ##### <IcaoEWTC> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO designated weight category of the aircraft, as defined in the `icao_WTC` parameter. For example: ``` xml <IcaoEWTC>L</IcaoEWTC> ```     ##### <IcaoAirline> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted using the ICAO designator of the airline for aircraft variation/livery, as defined in the `icao_airline` parameter. For example: ``` xml <IcaoAirline>Wizzair</IcaoAirline> ```     ##### <IsGeneric> This is a sub-element of `<Aircraft>`, with no attributes, which is used to help filter the aircraft being targeted based on whether it's a "generic" - ie: passive - aircraft (TRUE) or not (FALSE), as defined in the `icao_generic` parameter. For example: ``` xml <IsGeneric>TRUE</IsGeneric> ```     #### <AltitudeAGLMeter> This is a sub-element of `<Conditions>` (subject or context) and is used to retrieve either: - The height of the *subject* {{< glossterm >}}agl{{< /glossterm >}}(when the reference is a subject). - The height of the *camera* {{< glossterm >}}agl{{< /glossterm >}} (when the reference is a context). The element has no attributes and requires the following sub-element: 1. `<Id>`   For example: ``` xml <Conditions> <AltitudeAGLMeter> <Id>AGL</Id> </AltitudeAGLMeter> </Conditions> <Formula> (X:AGL) 120 < </Formula> ```     #### <AltitudeMeter> This is a sub-element of `<Conditions>` (subject or context) and is used to retrieve either: - The height of the *subject* above {{< glossterm >}}msl{{< /glossterm >}} (when the reference is a subject). - The height of the *camera* above {{< glossterm >}}msl{{< /glossterm >}} (when the reference is a context). The element has no attributes and requires the following sub-element: 1. `<Id>`   For example: ``` xml <Conditions> <AltitudeMeter> <Id>MSLAlt</Id> </AltitudeMeter> </Conditions> <Formula>(X:MSLAlt) 5000 ></Formula> ```     #### <InBox> This is a sub-element of `<Conditions>` (subject or context) and is used to check either: - The *subject* is inside the box being defined (when the reference is a subject). - The *camera* is inside the box being defined (when the reference is a context). The element has no attributes and requires the following sub-elements: 1. `<Id>` 2. `<SizeXYZ>` 3. `<Orientation>` 4. `<WorldPosition>`   For example: ``` xml <InBox> <Id>Box</Id> <SizeXYZ>50, 10, 50</SizeXYZ> <Orientation>0, 0, 0</Orientation> <WorldPosition>N48° 51' 30.132", E2° 17' 40.132", +000220.00</WorldPosition> </InBox> ```     ##### <SizeXYZ> This is a sub-element of `<InBox>` and is used to define the dimensions of the box area that is being used for the check. Requires three values, separated by a comma, expressed in meters. The element has no attributes.     ##### <Orientation> This is a sub-element of `<InBox>` and is used to define the orientation of the box area that is being used for the check. Requires three values, separated by a comma, expressed in degrees (pitch, bank, heading). The element has no attributes.     #### <InSphere> This is a sub-element of `<Conditions>` (subject or context) and is used to check if the time of day for the objective falls within one of the given day phases. The element has no attributes and requires the following two elements: 1. `<Id>` 2. `<Radius>` 3. `<WorldPosition>`   For example: ``` xml <InSphere> <Id>Sphere</Id> <Radius>50</SizeXYZ> <WorldPosition>N48° 51' 30.132", E2° 17' 40.132", +000220.00</WorldPosition> </InSphere> ```     ##### <Radius> This is a sub-element of `<InSphere>` and is used to define the radius of the sphere to be used for the checks, expressed in meters. The element has no attributes.     #### <InAirport> This is a sub-element of `<Conditions>` (subject or context) and is used to check either: - The *subject* is inside the area of the given airport (when the reference is a subject). - The *camera* is inside the area of the given airport (when the reference is a context). The element has no attributes and requires the following sub-elements: 1. `<Id>` 2. `<Icao>`   For example: ``` xml <InAirport> <Id>InAirportCondition</Id> <Icao>PADK</Icao> </InAirport> ```     ##### <Icao> This is a sub-element of `<InAirport>` and is used to define the {{< glossterm >}}icao{{< /glossterm >}} of the airport that you want to use in the check. The element has no attributes.     #### <InPolygon> This is a sub-element of `<Conditions>` (subject or context) and is used to check a polygonal area. The element has no attributes and requires the following two elements: 1. `<Id>` 2. `<Height>` 3. `<PointList>`   For example: ``` xml <InPolygon> <Id>Poly1</Id> <Height>100</height> <PointList> <Point>N48° 51' 30.132", E2° 17' 40.132", +000220.00</Point> <Point>N48° 51' 30.132", E2° 17' 40.132", +000220.00</Point> <Point>N48° 51' 30.132", E2° 17' 40.132", +000220.00</Point> </PointList> </InPolygon> ```     ##### <Height> This is a sub-element of `<InPolygon>` and is used to define the height     ##### <PointList> This is a sub-element of `<InPolygon>` and is used to define the     ##### <Point> This is a sub-element of `<PointList>` and is used to define the     #### <Cabin> This is a sub-element of `<Conditions>` (subject or context) and `<Aircraft>` and is used to check if the SimObject has one or more of the specified cabin elements. The element has no attributes and requires the following two sub-elements: 1. `<Id>` 2. `<Tag>`   For example: ``` xml <Cabin> <Id>CabinTags</Id> <Tag>CAR-PSO</Tag> <Tag>CAR-PLC</Tag> <Tag>CAR-PCC</Tag> <Tag>CAR-PVO</Tag> </Cabin> ```     ##### <Tag> This is a sub-element of `<Cabin>` and is used to define a cabin tag to check for. You can have multiple of these sub-elements, with each one giving a separate tag to use, and this tag will be checked against the `targeted_specializations` defined for the aircraft.     ### <PositionScreenConstraint> This is a sub-element of `<Conditions>` and is used to check the relative position of two objects within the screen space. The element has no attributes and requires the following sub-elements: 1. `<Id>` 2. `<ListName>` 3. `<RelativeAxis>`   The following is an explicit example of how this element can be used to check two different objects are on the screen, using a specific set of bounding boxes (in this case the "sun" object and the "tori gate" object bounding boxes): ``` xml <Weather Id="Sun"> <WeatherSubject>Sun</WeatherSubject> <Conditions> <PositionScreenConstraint> <Id>FrontAlignedwithBoudingBoxLeft</Id> <RelativeAxis> <YMax>0.75</YMax> <XMax>0.75</XMax> </RelativeAxis> <ListName>Isukushima_ToriGate_TopLeft_BoundingBox</ListName> </PositionScreenConstraint> <PositionScreenConstraint> <Id>FrontAlignedwithBoudingBoxRight</Id> <RelativeAxis> <XMin>0.75</XMin> </RelativeAxis> <ListName>Isukushima_ToriGate_BottomRight_BoundingBox</ListName> </PositionScreenConstraint> <PositionScreenConstraint <Id>BackAlignedwithBoudingBoxRight</Id> <RelativeAxis> <XMin>-0.75</XMin> <YMax>0.75</YMax> </RelativeAxis> <ListName>Isukushima_ToriGate_TopLeft_BoundingBox</ListName> </PositionScreenConstraint> <PositionScreenConstraint> <Id>BackAlignedwithBoudingBoxLeft</Id> <RelativeAxis> <XMax>0.75</XMax> </RelativeAxis> <ListName>Isukushima_ToriGate_BottomRight_BoundingBox</ListName> </PositionScreenConstraint> </Conditions> <Formula> (X:FrontAlignedwithBoudingBoxLeft) (X:FrontAlignedwithBoudingBoxRight) and (X:BackAlignedwithBoudingBoxLeft) (X:BackAlignedwithBoudingBoxRight) and or </Formula> </Weather> ```     #### <ListName> This is a sub-element of `<PositionScreenConstraint>`, `<PositionConstraint>`, and `<RotationConstraint>`, and is used to give the ID name of a *previously defined* reference subject (ie: the reference subject must have been defined above this in the XML). It has no attributes.     #### <RelativeAxis> This is a sub-element of `<PositionScreenConstraint>`, `<PositionConstraint>`, and `<RotationConstraint>`, and is a container element for the various offset values used to define the constraint. The constraint being setup and the sub-elements required will depend on the parent elements, where:   - `<PositionScreenConstraint>` - With this parent element, it compares the position of two subjects on the X and Y axis, then yields an offset value (expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}} of screen), where: - The value for the offset on the X-axis is *positive* when the subject is on the **right** of the reference subject. - The value for the offset on the X-axis is *negative* when the subject is on the **left** of the reference subject. - The value for the offset on the Y-axis is *positive* when the subject is **above** the reference subject. - The value for the offset on the Y-axis is *negative* when the subject is **below** the reference subject. It requires at least one of the following sub-elements: 1. `<XMin>` 2. `<XMax>` 3. `<YMin>` 4. `<YMax> `   - `<PositionConstraint>` - With this parent element, it compares the position of the subjects on the X, Y and Z axis, yielding an offset value (in meters). When *relative* to the camera: - the X offset value is *positive* when the subject is on the **right** of the reference subject. - the X offset value is *negative* when the subject is on the **left** of the reference subject. - the Y offset value is *positive* when the subject is **above** the reference subject. - the Y offset value is *negative* when the subject is **below** the reference subject. - the Z offset value is *positive* when the subject is *further away* from the camera than the reference subject. - the Z offset value is *negative* when the subject is *closer* to the camera than the reference subject. - the A offset is the value of the angle formed by the *Subject*, the *Camera*, and the *Reference subject*. When *not* relative to the camera, the comparisons will be relative to the **Default world axis**, where the Z-axis is the *vertical* axis. It requires at least one the following sub-elements: 1. `<XMin>` 2. `<XMax>` 3. `<YMin>` 4. `<YMax> ` 5. `<ZMin>` 6. `<ZMax>` 7. `<AMin>` 8. `<AMax>`   - `<RotationConstraint>` - With this parent element, it compares the orientation of the subject / camera to a reference point. It requires at least one the following sub-elements: 1. `<XMin>` 2. `<XMax>` 3. `<YMin>` 4. `<YMax> ` 5. `<ZMin>` 6. `<ZMax>`   Note that at least one sub-element is mandatory in all cases, and if one boundary (along each axis) is not set, then the following will happen: - up *to* the maximum with no minimum set - up *from* the minimum with no maximum set     ##### <XMin> This is a sub element of `<RelativeAxis>`, and has no attributes. The value required will depend on the parent elements, where:   - `<PositionScreenConstraint>` - It defines the minimal value of the X-axis offset value for the constraint to validate (expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}}). - `<PositionConstraint>` - It defines the minimal value of the X-axis offset value for the constraint to validate (expressed in meters). - `<RotationConstraint>` - It defines the minimal angle for the X-axis for the constraint to validate (expressed in degrees).     ##### <XMax> This is a sub element of `<RelativeAxis>`, and has no attributes. The value required will depend on the parent elements, where:   - `<PositionScreenConstraint>` - It defines the maximal value of the X-axis offset value for the constraint to validate (expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}}). - `<PositionConstraint>` - It defines the maximal value of the X-axis offset value for the constraint to validate (expressed in meters). - `<RotationConstraint>` - It defines the maximal angle for the X-axis for the constraint to validate (expressed in degrees).     ##### <YMin> This is a sub element of `<RelativeAxis>`, and has no attributes. The value required will depend on the parent elements, where:   - `<PositionScreenConstraint>` - It defines the minimal value of the Y-axis offset value for the constraint to validate (expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}}). - `<PositionConstraint>` - It defines the minimal value of the Y-axis offset value for the constraint to validate (expressed in meters). - `<RotationConstraint>` - It defines the minimal angle for the Y-axis for the constraint to validate (expressed in degrees).     ##### <YMax> This is a sub element of `<RelativeAxis>`, and has no attributes. The value required will depend on the parent elements, where:   - `<PositionScreenConstraint>` - It defines the maximal value of the Y-axis offset value for the constraint to validate (expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}}). - `<PositionConstraint>` - It defines the maximal value of the Y-axis offset value for the constraint to validate (expressed in meters). - `<RotationConstraint>` - It defines the maximal angle for the Y-axis for the constraint to validate (expressed in degrees).     ##### <ZMin> This is a sub element of `<RelativeAxis>`, and has no attributes. The value required will depend on the parent elements, where:   - `<PositionConstraint>` - It defines the minimal value of the Z-axis offset value for the constraint to validate (expressed in meters). - `<RotationConstraint>` - It defines the minimal angle for the Z-axis for the constraint to validate (expressed in degrees).     ##### <ZMax> This is a sub element of `<RelativeAxis>`, and has no attributes. The value required will depend on the parent elements, where:   - `<PositionConstraint>` - It defines the maximal value of the Z-axis offset value for the constraint to validate (expressed in meters). - `<RotationConstraint>` - It defines the maximal angle for the Z-axis for the constraint to validate (expressed in degrees).     ##### <AMin> This is a sub element of `<RelativeAxis>`, and has no attributes. It is only used with the `<PositionConstraint>` parent element and defines the minimal value of the angle offset for the constraint to validate (expressed in *degrees*).     ##### <AMax> This is a sub element of `<RelativeAxis>`, and has no attributes. It is only used with the `<PositionConstraint>` parent element and defines the maximal value of the angle offset for the constraint to validate (expressed in *degrees*).     ### <PositionConstraint> This is a sub-element of `<Conditions>` and is used to check the relative position of two objects within the world. The element has no attributes and requires the following sub-elements: 1. `<Id>` 2. `<ListName>` 3. `<RelativeToCamera>` 4. `<RelativeAxis>`   For example: ``` xml <Weather Id="Sun"> <WeatherSubject>Sun</WeatherSubject> <Conditions> <PositionConstraint Id="AlignedwithSphinx_RightShoulder"> <RelativeAxis> <AMax>1.5</AMax> </RelativeAxis> <ListName>Sphinx_RightShoulder_Boundingbox</ListName> </PositionConstraint> </Conditions> <Formula>(X:AlignedwithSphinx_RightShoulder)</Formula> </Weather> ```     #### <RelativeToCamera> This is a sub element of `<PositionScreenConstraint>`, `<PositionConstraint>`, and `<RotationConstraint>`, and has no attributes. It will work as follows, depending on the parent-element: - `<PositionConstraint>` - Indicates that this condition is relative to the camera position. If "TRUE", offset positions are calculated relative to the camera position. If "FALSE" (the default value), they will be calculated relative to the world axis, where Z is *vertical*. - `<RotationConstraint>` - Indicates that this condition is relative to the camera angle. If "TRUE", the orientation will be calculated relative to the camera orientation. If "FALSE" (the default value), it will be calculated relative to the world.     ### <RotationConstraint> This is a sub-element of `<Conditions>` and is used to detect the orientation of the subject or camera compared to a reference point. The element has no attributes and requires the following two elements: 1. `<Id>` 2. `<ListName>` 3. `<RelativeToCamera>` 4. `<RelativeAxis>`   For example: ``` xml <Conditions> <RotationConstraint> <Id>LowAngle</Id> <RelativeAxis> <XMin>190</XMin> <XMax>350</XMax> </RelativeAxis> </RotationConstraint> </Conditions> <Formula> (X:LowAngle) </Formula> ```     ### <Id> This element is used to assign an ID string to a condition. This ID string is then used in the `<Formula>` element [RPN](../../../programming-apis/reverse-polish-notation/) code as a parameter. This element can be used in the following: `<TimeOfDay><WeatherContext><CameraPointOfView><WindSpeedKTS><Period><LocalTime><PercentageVisible><Aircraft><AltitudeAGLMeter><AltitudeMeter><InBox><InSphere><InAirport><InPolygon><Cabin><PositionScreenConstraint><PositionConstraint><RotationConstraint>`   For example: ``` xml <Subjects> <SimObject Id="PassivePlane-1"> <AIType>Airplane</AIType> <ScreenSize MinSize="0.5"/> <Count MinCount="1"/> <UnicIdentifier>Asobo Passive B717 200</UnicIdentifier> </SimObject> <SimObject Id="PassivePlane-2"> <AIType>Airplane</AIType> <ScreenSize MinSize="2.1"/> <ScreenSize MinSize="0.5"/> <Conditions> <Aircraft> <Id>Plane-1</Id> <IcaoType>B712</IcaoType> </Aircraft> </Conditions> </SimObject> <Formula>(X:PassivePlane-1) (X:PassivePlane-2) or </Formula> </Subjects> ```