Condividi tramite


Overview

Weather Systems

There are a number of tools in the SDK for manipulating both the simulated weather, and the rendering of specific weather systems such as thermals and ridge lift. Weather can be programmatically retrieved and specified using the SimConnect programming interface. Weather systems can also be added to specific Missions. This document describes two XML files that specify the physical appearance of thermals and ridge lift (the AirObjectVisuals.xml file) and the appropriate values to use for thermals depending on the type of terrain (the ThermalDescriptions.xml file). Both these files can be found in the root directory of ESP. Some weather information is also in the flight files.

See Also

Table of Contents

  • The AirObjectsVisuals File
  • The ThermalDescriptions File
  • The Weather Section of Flight Files

The AirObjectVisuals File

This file specifies which graphical model to use for thermals and ridge lift. Both can have two variations, natural and schematic, so there can be up to four rendering models. ESP does not come with models for ridge lift, so only two models are actually supplied with the product. Any number of new models for both thermals and ridge lift can be added to the simulation, by amending this file appropriately. The following table shows the initial XML file:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AceXML" version="1,0" id="AirObjectVisuals">
<Descr>AceXML Document</Descr>
<Filename>AirObjectVisuals.XML</Filename>
<SimMission.AirObjectVisuals>
 
<AirObjectVisual id = "{A600A1CE-8BEE-438f-828A-3562CBE897AE}">
<AirObjectModelGuid>{00000000-0000-0000-0000-000000000000}</AirObjectModelGuid>
<ScaleModel>FALSE</ScaleModel>
</AirObjectVisual>
 
<AirObjectVisual id = "{A600A1CD-8BEE-438f-828A-3562CBE897AE}">
<AirObjectModelGuid>{61ff499a-6e71-46ab-bb59-e10f7f457674}</AirObjectModelGuid>
<ScaleModel>FALSE</ScaleModel>
</AirObjectVisual>
 
<AirObjectVisual id = "{A600A1CC-8BEE-438f-828A-3562CBE897AE}">
<AirObjectModelGuid>{4d59805f-7a43-490d-b997-33e8b883716d}</AirObjectModelGuid>
<ScaleModel>TRUE</ScaleModel>
</AirObjectVisual>
 
<!-- 'Natural' visualizations for thermals -->
<Autogen.Grouping id = "{320AF327-20D0-4f69-974C-0D2633A81050}">
<ReferenceEntry>
<TargetGuid>{A600A1CD-8BEE-438f-828A-3562CBE897AE}</TargetGuid>
<RelativeWeight>100</RelativeWeight>
</ReferenceEntry>
</Autogen.Grouping>
 
<!-- 'Schematic' visualizations for thermals -->
<Autogen.Grouping id = "{9BFAFE66-7915-4afc-AB5C-CBADFFCE1762}">
<ReferenceEntry>
<TargetGuid>{A600A1CC-8BEE-438f-828A-3562CBE897AE}</TargetGuid>
<RelativeWeight>100</RelativeWeight>
</ReferenceEntry>
</Autogen.Grouping>
 
<!-- 'Natural' visualizations for ridge lift -->
<Autogen.Grouping id = "{31605B25-7B2E-4e92-AA69-53042298D530}">
<ReferenceEntry>
<TargetGuid>{A600A1CE-8BEE-438f-828A-3562CBE897AE}</TargetGuid>
<RelativeWeight>100</RelativeWeight>
</ReferenceEntry>
</Autogen.Grouping>
 
<!-- 'Schematic' visualizations for ridge lift -->
<Autogen.Grouping id = "{45B8B708-5A7F-4f12-9437-AE1791E543CA}">
<ReferenceEntry>
<TargetGuid>{A600A1CE-8BEE-438f-828A-3562CBE897AE}</TargetGuid>
<RelativeWeight>100</RelativeWeight>
</ReferenceEntry>
</Autogen.Grouping>
</SimMission.AirObjectVisuals>
</SimBase.Document>

The following table describes the main entries in the file.

AirObjectVisual id An internal GUID identifying a visual model. Note that if this is all zeros, there is no visual model. Add a new entry for each new 3D model of one of the weather systems.
AirObjectModelGuid A GUID referencing the actual 3D model to render in the simulation. Refer to the Using Modeling Tools documentation for more details on creating an animated model. The model will need to be compiled into a bgl file, using the BGL Compiler, and then placed in an appropriate directory, such as Add-on scenery/scenery.
ScaleModel Set this to True if the model can be scaled to fit the size of the thermal, or False if it should not be scaled. Obviously a model containing images of birds, for example, should not be scaled, whereas a model containing only cloud type images can successfully be scaled.
Autogen.Grouping id This references an internal GUID, do not change this.
ReferenceEntry There can be any number of ReferenceEntry entries within one Autogen Grouping id . Add a new entry for each new 3D model of one of the weather systems.
TargetGuid This references the AirObjectVisual id for each of the four visualizations (natural and schematic thermals and ridge lift).
RelativeWeight If there are multiple ReferenceEntry objects, each should be given a weighting. The actual model rendered will be randomly selected depending on the ratio of the weight entered here, with the total of the relative weights.

The ThermalDescriptions File

The thermal descriptions file describes the size and physical properties of thermals. Initially the file contains two descriptions, one null and one default thermal. Any number of new thermal descriptions can be added. The null thermal is used to indicate that no thermal should be created (which is appropriate for certain land classes).

The following table shows the two initial descriptions. For details of what each parameter means, refer to the SimConnect_WeatherCreateThermal function described in the SimConnect documentation. A minimum and maximum value provides a range from which a value is chosen at random.

<ThermalDescription id = "{4f5e0000-1e81-11db-9897-001372201444}">
<RadiusMin>0</RadiusMin>
</ThermalDescription>
 
<ThermalDescription id = "{4f5e0001-1e81-11db-9897-001372201444}">
<RadiusMin>1500</RadiusMin>
<RadiusMax>4000</RadiusMax>
<HeightMin>4000</HeightMin>
<HeightMax>6000</HeightMax>
<CoreRateMin>3.5</CoreRateMin>
<CoreRateMax>8.5</CoreRateMax>
<CoreTurbulenceMin>0.02</CoreTurbulenceMin>
<CoreTurbulenceMax>0.08</CoreTurbulenceMax>
<SinkRateMin>0.5</SinkRateMin>
<SinkRateMax>1.5</SinkRateMax>
<SinkTurbulenceMin>.2</SinkTurbulenceMin>
<SinkTurbulenceMax>1</SinkTurbulenceMax>
<CoreSizeMin>0.80</CoreSizeMin>
<CoreSizeMax>0.80</CoreSizeMax>
<CoreTransitionSizeMin>0.1</CoreTransitionSizeMin>
<CoreTransitionSizeMax>0.1</CoreTransitionSizeMax>
<SinkSizeMin>0.15</SinkSizeMin>
<SinkSizeMax>0.15</SinkSizeMax>
<SinkTransitionSizeMin>0.1</SinkTransitionSizeMin>
<SinkTransitionSizeMax>0.1</SinkTransitionSizeMax>
</ThermalDescription>

The second section of the file includes one entry for each of the Olson Land Classification values (refer to the Terrain and Scenerydocumentation for a list and description of these values). The actual value of the land class is coded into the TargetGuid, note that the last four digits of the first entry in the GUID go from 0000 to 0094. For example, 0002 refers to Low Sparse Grassland. The following table describes the entries in the XML file:

Autogen Grouping id These are coded GUIDs for internal use, so do not change them.
ReferenceEntry There can be any number of ReferenceEntry entries within one Autogen Grouping id. Add a new entry for each new thermal description that can be used for this type of land classification.
TargetGuid This GUID must reference one of the ThermalDescription id entries.
RelativeWeight If there are multiple ReferenceEntry objects, each should be given a weighting. The actual model rendered will be randomly selected depending on the ratio of the weight entered here, with the total of the relative weights.

The Weather Section of Flight Files

Flight files are text files, and can be edited by hand, or by a program, to add or change values. After a simple flight the weather section of the saved flight file will look similar to this:

[Weather] WeatherType=0 ThemeName=weather\themes\fair.WTB ThemeTime=117

The following table describes these, and additional optional settings.

WeatherType One of the four settings from the weather dialog:
0: weather themes
1: real world weather (static)
2: real world weather (updated)
3: user-defined weather
ThemeName Path to the current weather theme.
ThemeTime Unused.
DynamicWeatherOverride The dynamic weather setting (how fast weather morphs based on temperature/dewpoint etc.) is set via the Weather slider of the Settings dialog (not the Weather dialog), and is saved in the ESP.cfg file. To allow individual lessons, flights, or missions to override that default setting, add this entry to a saved flight file. The value can be one of:
-1: no override
0 to 4: corresponds to the five positions of the Weather slider.