<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lisbellaw</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lisbellaw"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Lisbellaw"/>
	<updated>2026-04-08T02:57:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Creating_new_Nasal_scripts&amp;diff=97217</id>
		<title>Creating new Nasal scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Creating_new_Nasal_scripts&amp;diff=97217"/>
		<updated>2016-04-18T08:43:02Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* User specific Nasal scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Nasal Navigation}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Editing code files ==&lt;br /&gt;
&lt;br /&gt;
Note that there is currently no way to tell FlightGear to reload Nasal scripts from the global Nasal directory at runtime, so in order to see changes take effect, you will have to exit and restart FlightGear for the time being. Note that there are some workarounds available, see: [[Nasal_scripting_language#Loading.2Freloading_Nasal_code_without_re-starting_FlightGear|reloading Nasal code without re-starting FlightGear]].&lt;br /&gt;
&lt;br /&gt;
Also, note that as of 05/2009, Nasal in FlightGear does not yet support any form of dependency resolution. In other words, there's no &amp;quot;import&amp;quot;, &amp;quot;require&amp;quot; or &amp;quot;include&amp;quot; directive - this is also why most code in FlightGear is wrapped inside a _setlistener() call instead, which in turn waits for a FlightGear signal before executing the code (see below for details).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating new Scripts ==&lt;br /&gt;
&lt;br /&gt;
Nasal scripts need to be plain text files, saved with a *.nas extension.&lt;br /&gt;
They can be created and written using a conventional plain text editor like notepad, gedit, kate etc.&lt;br /&gt;
But you can also use a programming text editor with syntax lighting support, see [[Howto:Syntax highlighting for Nasal]].&lt;br /&gt;
&lt;br /&gt;
We are also currently planning to add some very basic syntax highlighting support to the built-in [[Nasal Console]] using the new [[Canvas]] system.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft specific Nasal code ===&lt;br /&gt;
&lt;br /&gt;
Generally, aircraft specific Nasal scripts reside in the corresponding aircraft's folder (or a corresponding /Nasal subfolder) where they are usually included by adding a corresponding &amp;lt;nasal&amp;gt; tag to the [[aircraft-set.xml]] file (see [[Writing simple scripts in %22nasal%22|Writing simple scripts in &amp;quot;nasal&amp;quot;]]). Also see the section on [[Nasal scripting language#Namespaces|namespaces]] which contains more specific examples.&lt;br /&gt;
&lt;br /&gt;
=== Instrument specific Nasal code ===&lt;br /&gt;
&lt;br /&gt;
While instrument specific scripts are saved within the instrument's folder (as previously mentioned, Nasal scripts can also be embedded in various other XML files), Nasal scripts driving shared instruments are generally stored in &amp;lt;tt&amp;gt;[[$FG ROOT]]/Aircraft/Generic/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Nasal code as bindings in XML files ===&lt;br /&gt;
Nasal scripts can also be used as &amp;quot;binding&amp;quot; objects, and can therefore appear anywhere in a configuration file (keyboard, mouse and joystick bindings, etc...) that accepts a &amp;lt;binding&amp;gt; tag. The relevant command type is &amp;quot;nasal&amp;quot;, and you place your Nasal code inside of the &amp;lt;script&amp;gt; tag: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;binding&amp;gt;&lt;br /&gt;
  &amp;lt;command&amp;gt;nasal&amp;lt;/command&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
   print(&amp;quot;Binding Invoked!&amp;quot;);&lt;br /&gt;
  &amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above invokes the print() function. This is a simple extension function that simply prints out its arguments, in order, to the FlightGear console as a single-line log entry. It is useful for debugging, but little else.&lt;br /&gt;
&lt;br /&gt;
=== System-wide Nasal code ===&lt;br /&gt;
&lt;br /&gt;
Nasal scripts that are not specific to certain aircraft, instruments or other uses, generally reside in the system-wide &amp;lt;tt&amp;gt;[[$FG ROOT]]/Nasal&amp;lt;/tt&amp;gt; directory. Scripts that are placed inside this directory (with a *.nas extension) are automatically loaded and run during FlightGear startup. &lt;br /&gt;
&lt;br /&gt;
=== Nasal sub modules ===&lt;br /&gt;
&lt;br /&gt;
As of 06/2011, FlightGear also supports so called Nasal &amp;quot;sub modules&amp;quot; which may reside in their own sub folder under [[$FG_ROOT]]/Nasal/ and which provide support for on-demand loading at runtime by toggling properties.&lt;br /&gt;
&lt;br /&gt;
Some advantages are:&lt;br /&gt;
&lt;br /&gt;
* Nasal files can be grouped neatly instead of all scripts being mixed up in a single fgdata/Nasal directory. Grouping makes a lot of sense for modules consisting of several scripts - local weather is the best example.&lt;br /&gt;
* Guaranteed loading sequence. Submodules are loaded _after_ the main fgdata/Nasal scripts, so they can rely on all fgdata/Nasal content to be already present. No more need for awkward listener callbacks, just to make sure that basic &amp;quot;props&amp;quot; or &amp;quot;gui&amp;quot; modules are available.&lt;br /&gt;
* Finally, users have the option to disable loading modules. Unfortunately, just loading scripts (code/data) into memory already causes certain _run-time_ performance effects - even if the Nasal code was never executed (so even when all listeners/timers were disabled).&lt;br /&gt;
&lt;br /&gt;
Please note that there is  a difference between the _individual_ Nasal files in fgdata/Nasal and files belonging to a common Nasal _module in general (no matter whether loaded at run-time or loaded at start-up using a &amp;quot;&amp;lt;nasal&amp;gt;&amp;quot; tag).&lt;br /&gt;
&lt;br /&gt;
The individual Nasal files in fgdata/Nasal have an own namespace _each_. The namespace get's the name of the Nasal file itself. So if you have a &amp;quot;gui.nas&amp;quot; in the directory, then you can reference a symbol &amp;quot;foo&amp;quot; using &amp;quot;gui.foo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Nasal modules also have a single namespace. But all files belonging to the module share this _single_ namespace. The name of their namespace is made from its directory (for the run-time loadable modules), or from the specific tag given below the &amp;lt;nasal&amp;gt; XML element, which are often used for a/c specific modules (e.g. &amp;lt;nasal&amp;gt;&amp;lt;ufo&amp;gt;...&amp;lt;/ufo&amp;gt;&amp;lt;/nasal&amp;gt; creates the ufo Nasal namespace in ufo-set.xml).&lt;br /&gt;
&lt;br /&gt;
'''So each Nasal file in a new Nasal &amp;quot;module&amp;quot; folder now shares the same namespace.'''&lt;br /&gt;
&lt;br /&gt;
Another important thing to keep in mind is that Nasal sub modules should preferably register a listener to handle initialization, because they are not necessarily loaded by default but rather &amp;quot;on demand&amp;quot;. The signal property to listen to will be in /nasal/MODULE_NAME/loaded - for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var init = func {&lt;br /&gt;
 # this is where you put all your startup code&lt;br /&gt;
 # to ensure that it will only be called&lt;br /&gt;
 # AFTER all sub modules have been processed&lt;br /&gt;
}&lt;br /&gt;
_setlistener(&amp;quot;/nasal/my_module/loaded&amp;quot;, init);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is why you need to wrap everything in a function and register a listener, so that the code is only invoked AFTER ALL sub module files have been LOADED - otherwise, you'll have unresolved references.&lt;br /&gt;
&lt;br /&gt;
As you can see in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Nasal/local_weather/compat_layer.nas&amp;lt;/tt&amp;gt; there's a sub module listener registered that will be fired once ALL source files in the sub module folder have been processed - this is basically the signal to fire off the callback, so that the code can actually start running. The local weather system doesn't use a separate function, but rather an anonymous func: {{fgdata url|path=Nasal/local_weather/compat_layer.nas|line=76}}&lt;br /&gt;
&lt;br /&gt;
The whole point of this technique is being able to tell when all files have been parsed by Nasal - so that you know that you can actually start running the code, and rely on all symbols being available in the module's namespace. &lt;br /&gt;
&lt;br /&gt;
All sub modules are automatically loaded AFTER [[$FG_ROOT]]/Nasal has been processed - so your sub modules only need to register their own &amp;quot;loaded&amp;quot; listener to make sure that the sub module code is only actually run once all files have been processed. Nasal core modules (such as gui.nas io.nas etc) are automatically available to every sub module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information on Nasal sub modules, please see:&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg31761.html&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg32657.html&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg33458.html&lt;br /&gt;
&lt;br /&gt;
=== User specific Nasal scripts ===&lt;br /&gt;
&lt;br /&gt;
It's also possible to put Nasal files into [[$FG_HOME]]/Nasal/, that is: ~/.fgfs/Nasal/ on Unix, and %APPDATA%\flightgear.org\Nasal\ on MS Windows. This has the following advantages:&lt;br /&gt;
&lt;br /&gt;
* one doesn't have to mix local extensions with standard files&lt;br /&gt;
* one is less likely to lose such local additions when upgrading&lt;br /&gt;
* one doesn't need write permission to [[$FG_ROOT]]/Nasal/ or&lt;br /&gt;
* one doesn't have to become &amp;quot;root&amp;quot; to edit such files&lt;br /&gt;
&lt;br /&gt;
The files are guaranteed to be read after all the files in [[$FG_ROOT]]/Nasal/, so one can safely use elements of files like props.nas (props.Node), or globals.nas (setlistener() without leading underscore).&lt;br /&gt;
&lt;br /&gt;
The files are guaranteed to be read in alphabetic order. So, if there are two files where one depends on the other, just name them appropriately.&lt;br /&gt;
&lt;br /&gt;
The contents of each file are added to a namespace derived from the filename. So, all functions and variables of a file ~/.fgfs/Nasal/local.nas will be added to nasal namespace &amp;quot;local&amp;quot;, and a function test() is globally accessible as local.test().&lt;br /&gt;
&lt;br /&gt;
It's possible to extend a standard module like &amp;quot;math&amp;quot; with definitions in ~/.fgfs/Nasal/math.nas, though this should, of course, not be exploited by code that is to be submitted to cvs.&lt;br /&gt;
&lt;br /&gt;
[[Category:Nasal]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97216</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97216"/>
		<updated>2016-04-18T08:40:59Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. This is possible via the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]), the [[Soaring#Wave lift|FGWaveLift]]  and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these systems are not independent because you can use for example the convective cloud system with a realistic distribution of thermals only in the Advanced Weather mode (see [[Soaring#Setting the weather|Soaring]]) but that shall not be a subject of this article. Instead, the following sections will clarify how these different approaches can generate a realistic contribution to the turbulent wind field. In addition, you need to be aware of the fact, that this subsystems mentioned above only produce low frequency wind fluctuations. That means they just modify the mean values of the wind. The exception to this are the clouds which can really influence the high frequency turbulence simulated by the FDM's.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97215</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97215"/>
		<updated>2016-04-18T08:39:56Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. This is possible via the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]), the [[Soaring#Wave lift|FGWaveLift]]  and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these systems are not independent because you can use for example the convective cloud system with a realistic distribution of thermals only in the Advanced Weather mode (see [[Soaring#Setting the weather|Soaring]]) but that shall not be a subject of this article. Instead, the following sections will clarify how these different approaches can generate a realistic contribution to the turbulent wind field. In addition, you need to be aware of the fact, that this subsystems mentioned above only produce low frequency wind fluctuations. That means they just modify the mean values of the wind. The exception to this are the clouds which really influence the high frequency turbulence simulated by the FDM's.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97214</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97214"/>
		<updated>2016-04-18T08:29:59Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. This is possible via the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]), the [[Soaring#Wave lift|FGWaveLift]]  and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these systems are not independent because you can use for example the convective cloud system with a realistic distribution of thermals only in the Advanced Weather mode (see [[Soaring#Setting the weather|Soaring]]) but that shall not be a subject of this article. Instead, the following sections will clarify how these different approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97213</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=97213"/>
		<updated>2016-04-18T08:22:58Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. This is possible via the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these systems are not independent because you can use for example the convective cloud system with a realistic distribution of thermals only in the Advanced Weather mode (see [[Soaring#Setting the weather|Soaring]]) but that shall not be a subject of this article. Instead, the following sections will clarify how these different approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96756</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96756"/>
		<updated>2016-04-07T12:17:01Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Weather pattern scales */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If ''terrain presampling'' is disabled, the boundary layer thickness is 600 feet above ground level. The definition of the ''wind direction'' and ''speed'' has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the height above ground level of 1.2 times &amp;quot;lowest aloft wind speed&amp;quot;/ 10.0 times boundary layer altitude, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses, that are typical for the predefined weather tiles. The airmass slider regulates the property /local-weather/config/large-scale-persistence. The values you can set through the silder vary between 0.5 (''small'') and 2.0 (''large''). It determines how long you are flying in a specific weather tile and if the weather tile will change while entering the tile border. A low value reduces the probability for staying in the same weather tile whereas a high value makes it very probably that the current weather tile does not change (see weather_tile_management.nas).   &lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96755</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96755"/>
		<updated>2016-04-07T12:16:18Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Weather pattern scales */correction airmass slider&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If ''terrain presampling'' is disabled, the boundary layer thickness is 600 feet above ground level. The definition of the ''wind direction'' and ''speed'' has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the height above ground level of 1.2 times &amp;quot;lowest aloft wind speed&amp;quot;/ 10.0 times boundary layer altitude, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses, that are typical for the predefined weather tiles. The airmass slider regulates the property /local-weather/config/large-scale-persistence. The values you can set through the silder vary between 0.5 (small) and 2.0 (large). It determines how long you are flying in a specific weather tile and if the weather tile will change while entering the tile border. A low value reduces the probability for staying in the same weather tile whereas a high value makes it very probably that the current weather tile does not change (see weather_tile_management.nas).   &lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96149</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96149"/>
		<updated>2016-03-22T15:24:22Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Wind settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If ''terrain presampling'' is disabled, the boundary layer thickness is 600 feet above ground level. The definition of the ''wind direction'' and ''speed'' has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the height above ground level of 1.2 times &amp;quot;lowest aloft wind speed&amp;quot;/ 10.0 times boundary layer altitude, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96148</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96148"/>
		<updated>2016-03-22T15:23:17Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Wind settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If &amp;quot;terrain presampling&amp;quot; is disabled, the boundary layer thickness is 600 feet above ground level. The definition of the ''wind direction'' and ''speed'' has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the height above ground level of 1.2 times &amp;quot;lowest aloft wind speed&amp;quot;/ 10.0 times boundary layer altitude, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96147</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96147"/>
		<updated>2016-03-22T15:21:31Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Wind settings */added content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If &amp;quot;terrain presampling&amp;quot; is disabled, the boundary layer thickness is 600 feet above ground level. The definition of the &amp;quot;wind direction&amp;quot; and &amp;quot;speed&amp;quot; has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the height above ground level of 1.2 times &amp;quot;lowest aloft wind speed&amp;quot;/ 10.0 times boundary layer altitude, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96146</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96146"/>
		<updated>2016-03-22T14:47:35Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Wind settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If &amp;quot;terrain presampling&amp;quot; is disabled, the boundary layer thickness is 600 feet above ground level. The definition of the &amp;quot;wind direction&amp;quot; and &amp;quot;speed&amp;quot; has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96145</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=96145"/>
		<updated>2016-03-22T14:46:45Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Wind settings */added content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind'' in a height convenient to the atmospheric boundary layer thickness. If &amp;quot;terrain presampling&amp;quot; is disabled, the boundary layer thickness is 600 feet. The definition of the &amp;quot;wind direction&amp;quot; and &amp;quot;speed&amp;quot; has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects.&lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
* [[Turbulence]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95526</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95526"/>
		<updated>2016-03-10T21:27:38Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these systems are not independent because you can use for example the convective cloud system with a realistic distribution of thermals only in the Advanced Weather mode (see [[Soaring#Setting the weather|Soaring]]) but that shall not be a subject of this article. Instead, the following sections will clarify how these different approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95525</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95525"/>
		<updated>2016-03-10T21:26:05Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these Systems are not independent because you can use for example the convective cloud system with a realistic distribution of thermals only in the Advanced Weather mode (see [[Soaring#Setting the weather|Soaring]]) but that shall not be a subject of this article. Instead, the following sections will clarify how these approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95524</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95524"/>
		<updated>2016-03-10T21:17:27Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these Systems are not independent because you can use for example FGRidgeLift only in the Advanced Weather mode but that shall not be a subject of this article. Instead, the following sections will clarify how these approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95522</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95522"/>
		<updated>2016-03-10T20:36:13Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring#Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these Systems are not independent because you can use for example FGRidgeLift only in the Advanced Weather mode but that shall not be a subject of this article. Instead, the following sections will clarify how these approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95521</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95521"/>
		<updated>2016-03-10T20:35:09Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced weather]] with its so called gust settings, the [[Soaring# Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism#Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these Systems are not independent because you can use for example FGRidgeLift only in the Advanced Weather mode but that shall not be a subject of this article. Instead, the following sections will clarify how these approaches can generate a realistic contribution to the turbulent wind field.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95520</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95520"/>
		<updated>2016-03-10T20:33:31Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Related content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced Weather]] with its so called gust settings, the [[Soaring# Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism# Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these Systems are not independent because you can use for example FGRidgeLift only in the Advanced Weather mode but that shall not be a subject of this article. Instead, the following sections will clarify how these approaches can generate a realistic contribution to the turbulent wind field.      &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&lt;br /&gt;
=== Mailing lists ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/34618077/ Turbulence and JSBSim soaring]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/31346370/ Cloud turbulence]&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/27782087/ Turbulence in YASim vs. JSBSim]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95519</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95519"/>
		<updated>2016-03-10T20:23:47Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: More Background&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
Apart from the Basic weather systems there are some more subsystems which can also generate wind fluctuations, especially vertical ones. In this context, the [[Advanced Weather]] with its so called gust settings, the [[Soaring# Ridge lift|FGRidgeLiftSoaring]] (see also [[Improving Glider Realism# Ridgelift|FGRidgeLiftGlider]]) and the [[Howto:Modelling clouds|Clouds/Thermals]] approach shall be mentioned. Of course these Systems are not independent because you can use for example FGRidgeLift only in the Advanced Weather mode but that shall not be a subject of this article. Instead, the following sections will clarify how these approaches can generate a realistic contribution to the turbulent wind field.      &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== Basic Weather ===&lt;br /&gt;
It is possible to specify the turbulence level during running FlightGear in the Basic Weather System where you have the choice between none, light, moderate, severe (see [[#Background|Background]]). Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; has a magnitude equal to the square of these values.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather ===&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95512</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95512"/>
		<updated>2016-03-10T19:45:13Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* FDMs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx).&lt;br /&gt;
&lt;br /&gt;
When you want to specify the turbulence level during running FlightGear in the Basic Weather System you have the choice between none, light, moderate, severe (see [[#Background|Background]]) . Through choosing one of these levels the above mentioned property &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; is set to a value that follows the subsequent procedure:&lt;br /&gt;
&lt;br /&gt;
*none = 0&lt;br /&gt;
*light = 1/3&lt;br /&gt;
*moderate = 2/3&lt;br /&gt;
*severe=1&lt;br /&gt;
&lt;br /&gt;
Accordingly, &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is the square of these values. The following lines should explain the further transfer of this quantity with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95460</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95460"/>
		<updated>2016-03-10T16:44:39Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear when your are using the Basic Weather system. In the menubar ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). In the appearing window you can set the turbulence to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95455</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=95455"/>
		<updated>2016-03-10T16:35:28Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Forum topics */ Some more posts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
This article will try explain how '''turbulence''' works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear in ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). You can set the turbulence there to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM.&lt;br /&gt;
&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[JSBSim]]&lt;br /&gt;
* [[Weather]]&lt;br /&gt;
* [[YASim]]&lt;br /&gt;
&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=25&amp;amp;t=24659 Turning off turbulence]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=69&amp;amp;t=28335 Turbulence numbers]&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28807 Processing the option --turbulence=n.n]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Source code ===&lt;br /&gt;
*&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94647</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94647"/>
		<updated>2016-03-03T18:35:47Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Basic Weather */ Modifying default values&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 5000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 10000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 18000ft, wind 320° at 30 kt&lt;br /&gt;
* Aloft layer, 24000ft, wind 330° at 50 kt&lt;br /&gt;
* Aloft layer, 30000ft, wind 340° at 70 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind''. It has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects. &lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94646</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94646"/>
		<updated>2016-03-03T18:15:52Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Basic Weather */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 3000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 6000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 9000ft, wind 320° at 30 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to start FlightGear with the default weather settings mentioned above you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind''. It has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects. &lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94645</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94645"/>
		<updated>2016-03-03T18:12:40Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Basic Weather */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 3000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 6000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 9000ft, wind 320° at 30 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to have this default settings after starting FlightGear you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;/tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind''. It has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects. &lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94644</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94644"/>
		<updated>2016-03-03T18:12:12Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Basic Weather */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 3000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 6000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 9000ft, wind 320° at 30 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to have this default settings after starting FlightGear you have to take care about disabling METAR Data (look into the &amp;lt;tt&amp;gt;environment.xml&amp;lt;\tt&amp;gt; file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind''. It has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects. &lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94643</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94643"/>
		<updated>2016-03-03T18:10:28Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Basic Weather */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 16093.4m, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 3000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 6000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 9000ft, wind 320° at 30 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button. When you want to have this default settings after starting FlightGear you have to take care about disabling METAR Data (look into the environment.xml file under metar-updates-... and set them to false).&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind''. It has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects. &lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94642</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94642"/>
		<updated>2016-03-03T17:38:14Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Written by: {{Usr|Lisbellaw}} (3/2016)&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear in ''Environment &amp;gt; Weather Conditions'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). You can set the turbulence there to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94628</id>
		<title>Weather</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Weather&amp;diff=94628"/>
		<updated>2016-03-03T17:02:35Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Basic Weather */ other path to default settings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear simulates '''weather''' through one of two weather engines, that provide real weather fetch, predefined weather scenarios, [[3D clouds]] and much more. Weather simulation is not easy, and setting up these systems for the most general needs will be explained below, as well as the features they provide.&lt;br /&gt;
[[File:Local_weather_0.85_01.jpg|thumb|450px|right|Advanced Weather clouds over the mountains]]&lt;br /&gt;
&lt;br /&gt;
== Fundamentals ==&lt;br /&gt;
[[File:Weather scenario selection.png|thumb|250px|Weather scenario selection in the main Weather dialog. You can also see where the METAR is shown, and can be edited in ''Manual input'' mode]]&lt;br /&gt;
[[File:Windboundaries.png|thumb|250px|A drawing giving an idea of what's the boundary/aloft layer separation (drawn in red)]]&lt;br /&gt;
[[File:ASW-20 landing configuration.png|thumb|350px|Advanced Weather can simulate the conditions for [[soaring]]]]&lt;br /&gt;
Weather is the state of the atmosphere, especially the {{wikipedia|troposphere}}, at a given time for a given place. Calculating the complete atmosphere or even a small part of it is extremely demanding in computing power. Hence, FlightGear calculates the state of the atmosphere only for a vertical line beginning at earth's center straight through your aircraft up to an appropriate altitude. For every point along this line, the following fundamental parameters are calculated:&lt;br /&gt;
* '''temperature''': usually in °C.&lt;br /&gt;
* '''{{wikipedia|dew point}}''': indicating at what temperature the air in that point would become a &amp;quot;cloud&amp;quot;. It gives an indication of the {{wikipedia|relative humidity}}.&lt;br /&gt;
* '''pressure''': in inches of mercury (inHg) or hectopascals (hPa)&lt;br /&gt;
* '''density''': this affects the behaviour of the aircraft.&lt;br /&gt;
* '''wind''': usually in knots (kt), includes the vertical component and any turbulence.&lt;br /&gt;
* '''visibility''': usually in meters or statute miles (''not'' nautical! 1 SM is ~1600 m), tries to define how far an object can be seen, horizontally.&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere layers ===&lt;br /&gt;
Like the real atmosphere, the simulated one is divided in layers. For what concerns flight, a first distinction is made with the ''boundary layer'' and the ''aloft layer''. The {{wikipedia|Planetary boundary layer|boundary layer}} is the thin one close to ground, where the atmosphere, mainly the wind, is affected by the earth's surface. Its thickness may vary depending on how rough the ground is (e.g. sea as opposed to Alps), but in general it's less than 600 ft AGL. The aloft layer is immediately above the boundary one, and is by definition not affected by ground, i.e. there is free to flow air.&lt;br /&gt;
&lt;br /&gt;
Within these layers, there are other sub-layers that can be defined, because the atmosphere still changes a lot, especially in the aloft layer. These sub-layers in FlightGear define the state of the fundamental parameters above, and can specifically define the presence of clouds. For the points in between, the values are calculated by interpolation, e.g. if you're halfway between two, the values will be set to the average.&lt;br /&gt;
&lt;br /&gt;
=== Clouds ===&lt;br /&gt;
Real life clouds are humidity that become visible when dew point and temperature match, that is when air is saturated. Computing this for the whole atmosphere would be very realistic, and would need, again, some supercomputers, some patience and a huge amount of real data.&lt;br /&gt;
&lt;br /&gt;
Clouds are therefore simulated by specifying at what altitudes they should be, their kind (fluffy, flat, cotton balls...) and other cloud-related phenomenons (precipitations, thermals...) To make things realistic one must either know very well what to do (Basic Weather) or rely on some advanced algorithms (Advanced weather.) Or use a preset scenario.&lt;br /&gt;
&lt;br /&gt;
=== Scenarios and METAR ===&lt;br /&gt;
Defining weather can be a tedious task, as setting all the parameters for each layer is not everybody's fun. For this reason, in the in-sim dialog ''Environment &amp;gt; Weather Conditions'' you can choose what is called a ''weather scenario''. Scenarios are presets of weather conditions.&lt;br /&gt;
&lt;br /&gt;
Besides scenarios, FlightGear has a built in [[METAR]] interpreter. This can read the coded weather information from a METAR and apply a more or less reasonable weather, that matches the conditions described in the METAR. Since a METAR ''only describes the weather at a station on the ground'', many parameters, esp. for the higher atmosphere are ''just plain guesses'' which just try to be reasonable.&lt;br /&gt;
&lt;br /&gt;
You can either pass a METAR string with the [[command line options]] (&amp;lt;tt&amp;gt;--metar=&amp;lt;/tt&amp;gt;) or choose ''Live data'' or ''Manual input'' from the ''Weather Conditions'' drop-down menu, where you can enable live weather data or enter your own METAR. The ''Live data'' option enables a task that calculates your nearest airport and fetches the current METAR for that station from NOAA weather service.&lt;br /&gt;
&lt;br /&gt;
== The two weather systems ==&lt;br /&gt;
The two systems are generally referred to as:&lt;br /&gt;
* '''Basic weather''' (BW), the historical and default weather system (sometimes called ''Global weather''), and&lt;br /&gt;
* '''Advanced weather''' (AW), formerly known as ''Local weather'' and called ''Detailed weather'' in-sim (this is probably a leftover of previous dialog designs.)&lt;br /&gt;
&lt;br /&gt;
Although they model the same thing, they don't have much in common. Here's a non-exhaustive comparison:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;60%&amp;quot;&lt;br /&gt;
! Basic Weather&lt;br /&gt;
! Advanced Weather&lt;br /&gt;
|-&lt;br /&gt;
| Very simple and straightforward to setup and customize, but can lead to non-realistic conditions and doesn't integrate some advanced features.&lt;br /&gt;
| Can be puzzling, but it treats all the variables as a whole keeping things close to reality.&lt;br /&gt;
|-&lt;br /&gt;
| Knows nothing about the effect of terrain on weather.&lt;br /&gt;
| Can make clouds and wind climb up a slope and flow around a mountain peak, and generate thermals consistent with the ground and the clouds (and much more.)&lt;br /&gt;
|-&lt;br /&gt;
| Applies the same weather conditions for your position and for every other part of the world.&lt;br /&gt;
| Can be set up to simulate realistic weather distribution.&lt;br /&gt;
|-&lt;br /&gt;
| Lets you specify visibility.&lt;br /&gt;
| Forces visibility to be consistent with the weather.&lt;br /&gt;
|-&lt;br /&gt;
| Is part of the FlightGear C++ code.&lt;br /&gt;
| Runs in [[Nasal]] space.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To make it short, each of them has their pros and cons, but in general:&lt;br /&gt;
* if you plan to tweak the weather setup, be ready to read some documentation, at least this article and especially for AW;&lt;br /&gt;
* if you plan to simply use the weather scenarios, you should probably try AW, because out of the box it gives more realistic results.&lt;br /&gt;
&lt;br /&gt;
== Basic Weather ==&lt;br /&gt;
[[File:Basic weather selected.png|thumb|350px|Basic Weather selected in the main Weather dialog]]&lt;br /&gt;
In Basic Weather most calculations are based on the {{wikipedia|International Standard Atmosphere}}. The default weather definition is:&lt;br /&gt;
* Boundary layer, 0ft, wind 270° at 3 kt, visib. 10SM, 29.92inHG (1013hPa), temp. 15°C, dewpoint 5°C&lt;br /&gt;
* Boundary layer, 500ft, wind 280° at 6 kt&lt;br /&gt;
* Aloft layer, 3000ft, wind 300° at 10 kt&lt;br /&gt;
* Aloft layer, 6000ft, wind 310° at 20 kt&lt;br /&gt;
* Aloft layer, 9000ft, wind 320° at 30 kt&lt;br /&gt;
All other values are derived from these parameters. The atmospheric parameters described here are defined in &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Environment/environment.xml&amp;lt;/tt&amp;gt;, but they can be changed in-sim by selecting ''Environment &amp;gt; Weather Conditions'' from the menu, enabling ''Manually Configure Weather'' and clicking the ''Manual Configuration...'' button.&lt;br /&gt;
&lt;br /&gt;
Of course, that's not the only way to configure BW. In fact, it supports the weather scenarios and can read METAR data, be it manually inserted or fetched on-the-fly.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
''Remember that any weather you set up, it will be applied to the whole world.''&lt;br /&gt;
&lt;br /&gt;
=== Manual configuration ===&lt;br /&gt;
[[File:Basic weather dialog.png|thumb|350px|Manual configuration dialog for Basic Weather]]&lt;br /&gt;
The Basic Weather manual configuration dialog is mainly split in four: cloud layers, precipitations and pressure, aloft layers and boundary layers.&lt;br /&gt;
&lt;br /&gt;
==== Clouds ====&lt;br /&gt;
Clouds are stacked in layers and for each layer the defining parameters for clouds are:&lt;br /&gt;
* coverage (clear, few, scattered, broken, overcast)&lt;br /&gt;
* the altitude of cloud base (Above Mean Sea Level)&lt;br /&gt;
* the thickness (distance from cloud base to cloud top)&lt;br /&gt;
Once again, the definition of the default cloud set is in preferences.xml.&lt;br /&gt;
&lt;br /&gt;
==== Precipitations and pressure ====&lt;br /&gt;
Precipitation should be pretty clear, just notice that only one of snow or rain can be active at one time, and that the change is smoothed, so you have to wait some time to see the full effect of the precipitation. QNH is where to set the pressure at sea level. &lt;br /&gt;
&lt;br /&gt;
==== Aloft and boundary layers ====&lt;br /&gt;
The layers tables can be filled with information on altitude (elevation AGL for the boundary layer), wind direction and speed,  visibility, temperature and dew point, turbulence. These values will be interpolated for the heights in between.&lt;br /&gt;
&lt;br /&gt;
== Advanced Weather ==&lt;br /&gt;
[[File:Advanced weather selected.png|thumb|350px|Advanced Weather selected in the main Weather dialog]]&lt;br /&gt;
[[File:AW Weather patterns.jpg|thumb|Weather pattern in the Advanced Weather scenarios. You can see the various airmasses.]]&lt;br /&gt;
[[File:Clouds-nimbostratus.jpg|thumb|400px|It can't rain all the tile]]&lt;br /&gt;
[[File:Advanced weather tile selection mode.png|thumb|Tile selection mode from Advanced Weather settings]]&lt;br /&gt;
''If you're in a hurry, please read at least the [[#Quirks|Quirks]] section, for your own good''.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather not only tries to be more realistic than the Basic Weather, but also adds some effects and tries to keep them all bound together like they are in real life. This means, to give some examples, that clouds move with the wind, and the thermals that generated them in a sunny day will move with them and keep evolving with them, varying their own activity during the day, since when they start where it's more probable (depending on ground type) to when they die over the water or because the ground heat vanishes with the sunset.&lt;br /&gt;
&lt;br /&gt;
Such convective system, and other details like the ridge lift, allow not just for a nice distribution of clouds, but even for [[soaring|simulating soaring with gliders]]. And these are just some small scale effects. &lt;br /&gt;
&lt;br /&gt;
=== Advanced Weather scenarios ===&lt;br /&gt;
Advanced Weather can also take into account the larger scale phenomenon of the interaction of high and low pressure areas. However, this can work only with some specific &amp;quot;offline&amp;quot; scenarios and another particular setting (see [[#General settings|tile modes]] below), because they allow making assumptions that the METAR (live or manual) with its limited information doesn't permit (even if live METAR can compensate this to some degree.) These scenarios are:&lt;br /&gt;
* Core high pressure region&lt;br /&gt;
* High pressure region&lt;br /&gt;
* Border of a high pressure region&lt;br /&gt;
* Border of a low pressure region&lt;br /&gt;
* Low pressure region&lt;br /&gt;
* Core low pressure region&lt;br /&gt;
* Warm sector&lt;br /&gt;
&lt;br /&gt;
These correspond to some ''{{wikipedia|Air mass|airmasses}}'' which are well defined areas of a map (see the picture) that simulate a classic patterns of {{wikipedia|Extratropical cyclone|cyclones}} and {{wikipedia|Anticyclone|anticyclones}}, as we often see them in the weather forecast maps of mid-latitude areas. So, for example, if you start flying in a low pressure region and keep flying towards E-N-E, you will eventually see how the weather changes while you move to higher pressure regions. Being a large scale phenomenon, this of course requires mid or long range flights.&lt;br /&gt;
&lt;br /&gt;
Tropical areas currently have a ''weather tile'' definition but it's not used by any scenario. Also, at the moment there's no definition for polar areas.&lt;br /&gt;
&lt;br /&gt;
In any case, you have to click ''Apply'' or ''OK'' to make the choice effective.&lt;br /&gt;
&lt;br /&gt;
==== Weather tiles ====&lt;br /&gt;
This will be just a quick peek under the hood of Advanced Weather. This weather simulation engine approaches the problem of the local weather definition by using ''weather tiles'' 40x40 km² wide. There are predefined weather tiles corresponding to certain conditions, and the way AW places them is configurable, to some extent (see [[#Tile selection mode|below]].)&lt;br /&gt;
&lt;br /&gt;
With some knowledge of [[Nasal]], it is also possible to [[Advanced weather#Creating custom Weather Tiles|define custom tiles]] which can reproduce particular, very ''local'' weather conditions or phenomena (e.g. wind shear).&lt;br /&gt;
&lt;br /&gt;
In normal conditions, though, you don't have to worry about weather tiles.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configuration ===&lt;br /&gt;
[[File:Advanced weather dialog.png|thumb|270px|Settings dialog for Advanced Weather]]&lt;br /&gt;
Although the ''Advanced Weather Configuration'' dialog doesn't look that complex, some of the options need a good understanding of what they do. Actually, most of them affect or are affected by other options, and this requires a special care, because you might try to combine incompatible settings or spend hours in tuning one that is disabled.&lt;br /&gt;
&lt;br /&gt;
==== General settings ====&lt;br /&gt;
Here you can set the ''Tile selection mode'' and terrain presampling options.&lt;br /&gt;
&lt;br /&gt;
When ''Terrain presampling'' is enabled, AW analyzes the terrain height to consider it in its calculations of the distribution of clouds.&lt;br /&gt;
&lt;br /&gt;
Once this is activated, the ''Terrain effects'' option becomes available. When checked, the ''type''  of terrain (city, crops...) is also taken into account for the distribution of clouds, and their thermals if enabled; also, the shape of terrain determines ridge lift. This option is especially recommended to glider pilots, while the faster and higher pilots won't notice it, most of the time.&lt;br /&gt;
&lt;br /&gt;
However, if ''Terrain presampling'' is disabled to save some CPU time, AW will not know about ground and will put cloud layers as if at sea level. This is not bad if you ''are'' at sea level, but if you're on the Himalaya you might have clouds underground. So, you might have to set the ''Altitude offset'' conveniently.&lt;br /&gt;
&lt;br /&gt;
The ''Temperature offset'' is used with scenarios. Since they come with their own pre-defined temperature, that's the only way to simulate winter using them, so if you select a high pressure tile but specify a -45 deg temperature offset, you'll end up somewhere around -10 deg and get a decent arctic airmass for the effort. It has nothing to do with terrain effects.&lt;br /&gt;
&lt;br /&gt;
The ''Tile selection mode'' specifies how tiles are automatically generated once the aircraft reaches the border of the original tile. It is a good idea to leave this setting as you find it, because it's automatically set when a scenario or METAR is selected. For those who dare, here's an explanation of the options:&lt;br /&gt;
* ''single tile'' just won't generate any further tiles. If you go outside of that beware of dragons.&lt;br /&gt;
* ''repeat tile'' creates new tiles of the same type as the originally selected tile, randomized to some degree. It only works with AW scenarios (to which actually corresponds a tile definition) and is automatically selected with ''Thunderstorm''.&lt;br /&gt;
* ''realistic weather'' works only with the AW scenarios, and is automatically selected with them. It simulates the realistic distribution of airmasses.&lt;br /&gt;
* ''METAR'' is automatically selected with ''Live data'' and ''Manual input'' and non-AW scenarios. Basically, it tries to give the best interpretation of the METAR string.&lt;br /&gt;
&lt;br /&gt;
The first two are good ones if you're testing a custom tile to simulate a particular weather condition, and can't be made to work with all the scenarios. Most of the time, however, the other two options are the right choice, and they're also automatically selected, so you probably shouldn't care about this option.&lt;br /&gt;
&lt;br /&gt;
==== Wind settings ====&lt;br /&gt;
[[File:Advanced weather winds dialog.png|thumb|350px|Wind configuration from Advanced Weather settings. This works in ''Aloft interpolation'' and ''Aloft waypoint'' mode.]]&lt;br /&gt;
[[File:Advanced weather wind models.png|thumb|A representation of Advanced Weather wind models]]&lt;br /&gt;
This is the trickiest part. We'll describe each setting singularly, and in what cases they can be used/will have effect.&lt;br /&gt;
&lt;br /&gt;
''Wind direction'' and ''speed'' define ''the lowest aloft wind''. It has no effect in METAR tile mode (because AW deduces it from the METAR itself, which reports the ''ground'' wind) and/or when the wind model is ''aloft interpolated'' or ''aloft waypoint'' (because that wind is used instead - see below). Otherwise you can use it.&lt;br /&gt;
&lt;br /&gt;
''Gust settings'' are the happiest ones: they always work, immediately, no click needed, but if a new live METAR comes in (because you moved to a new area) they'll be overwritten. Their meaning should be self-explanatory. Note that gusts are only effective in the boundary layer, i.e. when close enough to the ground.&lt;br /&gt;
&lt;br /&gt;
''Wind model'' defines how the wind should change in space:&lt;br /&gt;
* ''constant'' sets the same wind everywhere, as specified in the dialog or derived from the METAR. This wind is the lowest aloft wind, and the boundary layer behaves consistently.&lt;br /&gt;
* ''constant in tile'' is like the above, but adds a wee bit of realism by introducing little changes in the wind direction and speed when crossing tiles.&lt;br /&gt;
* ''aloft interpolated'' allows to specify through the ''Wind Configuration'' dialog how aloft winds change with altitude, similarly to Basic Weather. Does not work in METAR mode.&lt;br /&gt;
* ''aloft waypoints'' is like the above, but lets you specify many positions (called here &amp;quot;waypoints&amp;quot;) and AW will interpolate them in the 3D space. In METAR mode it works automatically and, instead of using the user data, it guesses the vertical distribution of winds on its own based on the reported ground wind, especially using as waypoints the live METAR stations.&lt;br /&gt;
&lt;br /&gt;
Finally, the ''Wind Configuration'' dialog, reachable with the button at the bottom, is the one used by the ''aloft'' wind models. It should be self explaining, but remember to set at least one waypoint if you want to use ''aloft waypoints'' in non-METAR mode. Also, the value for level ''zero'' is not meant to be ground level, but the lowest aloft layer, i.e. the one just above the boundary layer. This dialog is especially uncomfortable with waypoints, because that mode is intended for use with [[Howto: Fetch live aloft data|live aloft wind data]], that someday might become available (again.)&lt;br /&gt;
&lt;br /&gt;
Note that the boundary layer is always calculated, but is less realistic without terrain effects. &lt;br /&gt;
&lt;br /&gt;
==== Thermic and visibility settings ====&lt;br /&gt;
''Generate thermals'' should be clear. It depends on having ''Terrain effects'' enabled, and the size and intensity of these thermals can be set with the ''Convective conditions'' slider: ''rough'' makes them very localized and entering them will give you a good shake, while ''low'' makes them larger, with less lift and little to no turbulence while entering them.&lt;br /&gt;
&lt;br /&gt;
''Ground haze'', ''Air pollution'' and ''Fog properties'' work as you move them, so we'll let you find out what they do. However, they work only when not in [[Project Rembrandt|Rembrandt mode]] and with [[Atmospheric light scattering]] enabled.&lt;br /&gt;
&lt;br /&gt;
''Max visibility'' is there to prevent that AW sets a too high visibility that could kill your framerate. Preventing a dangerously high visibility is also why you need to check ''Realistic visibility'' to get a few more kilometers, but it's still on the conservative side. More on visibility [[#Visibility, cloud distance and performance|below]].&lt;br /&gt;
&lt;br /&gt;
==== Weather pattern scales ====&lt;br /&gt;
These options are active only when in ''realistic weather'' mode, and are most useful if you're a medium or long haul flyer.&lt;br /&gt;
&lt;br /&gt;
''Airmass'' controls the transition between different airmasses. In the default setting, the typical distance to encounter a different airmass when one flies in a 'High-pressure-core' tile is 200 km. The airmass slider allows to vary this distance between 200 and 800 km.&lt;br /&gt;
&lt;br /&gt;
''Cloud patterns'' is in a way bound to the previous setting. For each tile type there are some basic cloud layer definitions (patterns) that are chosen randomly. The ''cloud patterns'' slider defines how &amp;quot;often&amp;quot; spatially these patterns change. With a ''large'' scale the theme of clouds will remain similar within each airmass, a ''small'' scale allows for more variation.&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; caveats ===&lt;br /&gt;
[[File:3D clouds.jpg|thumb|350px|Clouds as they were in 2008]]&lt;br /&gt;
Advanced Weather and its interface are known to have some idiosyncrasies and non intuitive behavior. In general, a good way of thinking of the AW engine is that it needs to be started and that, once running, can't be widely adjusted without a restart, i.e. clicking OK again. Here are some hints:&lt;br /&gt;
* If you clicked OK and can't see any cloud at all, you probably set up things in a way that AW doesn't like. Incompatible settings are described above.&lt;br /&gt;
* If you made some changes, but you can't ''see'' any even after clicking OK, and the above case is not applicable, you probably didn't follow the working pattern that AW requires:&lt;br /&gt;
*# select the scenario (or METAR) (this will likely overwrite some of the advanced settings)&lt;br /&gt;
*# open the advanced settings and make a (compatible) setting, then click OK&lt;br /&gt;
*# if needed, set the sim time&lt;br /&gt;
*# click Apply or OK in the main weather dialog.&lt;br /&gt;
* If you change scenario (or METAR) while the advanced settings dialog is open, it might not be consistently updated. Better to close it before changing scenario, to avoid misunderstandings.&lt;br /&gt;
Again, these problems are known, and are tough enough to tackle that managed to survive through various interface redesigns.&lt;br /&gt;
&lt;br /&gt;
=== Autostarting Advanced Weather ===&lt;br /&gt;
Currently, the choice of Advanced Weather is not saved through sessions. To enable this, use &amp;lt;tt&amp;gt;--prop:/local-weather/autostart=1&amp;lt;/tt&amp;gt; and then check the property in the Nasal init code using &amp;lt;tt&amp;gt;getprop(&amp;quot;/local-weather/autostart&amp;quot;)&amp;lt;/tt&amp;gt;, if it's true, invoke the same routines as the dialog's ok/apply buttons (see the corresponding bindings), and you'll end up with a fully optional autostart-feature. To retain the setting, set the &amp;lt;tt&amp;gt;userarchive&amp;lt;/tt&amp;gt; attribute to true. Yes, it's not straightforward.&lt;br /&gt;
&lt;br /&gt;
=== More on Advanced Weather ===&lt;br /&gt;
If you're interested in knowing all that the Advanced Weather engine does and can do, and its inner workings, in FlightGear's base package documentation there is &amp;lt;tt&amp;gt;[[$FG_ROOT]]/Docs/README.local_weather.html&amp;lt;/tt&amp;gt;. Although outdated with respect to the user interface, the mechanisms and principles are still valid.&lt;br /&gt;
&lt;br /&gt;
The original project was presented in [[Advanced weather]].&lt;br /&gt;
&lt;br /&gt;
== Visibility, cloud distance and performance ==&lt;br /&gt;
[[File:X-15-iceland03.jpg|thumb|400px|Now, that's what I call a decent visibility (caution: this screenshot was taken on high end hardware)]]&lt;br /&gt;
Basic Weather keeps visibility and weather relatively untied: by using the {{key press|z}} and {{key press|shift|z}} keys you can set the visibility you like.&lt;br /&gt;
&lt;br /&gt;
Advanced Weather does the opposite, setting visibility to what the atmosphere condition suggests. However, this could set a too high visibility that could lead to bad performance. For this reason, using {{key press|z}} and {{key press|shift|z}} doesn't work as with Basic Weather, but sets the ''Max visibility'' we've already seen.&lt;br /&gt;
&lt;br /&gt;
Moreover, using live METAR data will often not give the same good visibility you have out of the window. This is because the METAR string is often reported with visibility in meters, in which case the maximum is 9999 m even if it's way more. That is because METAR is intended for airport operations, not for full weather reports. AW knows that, but does what it can.&lt;br /&gt;
&lt;br /&gt;
For both these reasons you might be unsatisfied with the visibility you're presented with in AW. If ''realistic visibility'' is not enough for you, you can &amp;quot;artificially&amp;quot; increase it by using ''Manual input'' and specifying it in statute miles. This way you can bypass the limit of the 9999 meters, and the atmosphere condition is adjusted accordingly and stays coherent.&lt;br /&gt;
&lt;br /&gt;
The same partially applies also to how far clouds are drawn. The system is designed to draw them as far as 80 km (at least in AW), but that would easily kill the framerate of most machines. So, the slider in the ''Rendering options'' dialog is limited to 45 km. You can set it to higher values (max 80 km) by opening the property browser and editing &amp;lt;tt&amp;gt;/sim/rendering/cloud-visibility-range&amp;lt;/tt&amp;gt;. In FG 3.2, though, new rendering techniques (&amp;quot;impostors&amp;quot;) will allow for larger limits.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Fetch live aloft data]]&lt;br /&gt;
* [[Weather reports]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Weather| ]]&lt;br /&gt;
&lt;br /&gt;
[[es:Clima]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94404</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94404"/>
		<updated>2016-02-29T20:54:11Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* JSBSim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Written by: {{Usr|Lisbellaw}} (3/2016)&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear in ''Environment &amp;gt; Weather'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). You can set the turbulence there to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant. Note that for the ttTustin case no distinction have to be made at this point although you can recognize other turbulence. This have something to do with the exact calculation in FGWind.cpp which is not trival. But you can also see in this file that the probability_of_exceedence_index you have set indirectly via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; influences only the shared code for both cases. Therefore you can handle ttMilspec and ttTustin the same, at least for the issue disscused here.&lt;br /&gt;
&lt;br /&gt;
If you have chosen ttCulp then ...   &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94399</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94399"/>
		<updated>2016-02-29T20:29:06Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Written by: {{Usr|Lisbellaw}} (3/2016)&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear in ''Environment &amp;gt; Weather'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]). You can set the turbulence there to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94398</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=94398"/>
		<updated>2016-02-29T20:25:36Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Written by: {{Usr|Lisbellaw}} (3/2016)&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specifies the turbulence from 0.0 (calm) to 1.0 (severe). &lt;br /&gt;
&lt;br /&gt;
The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. &lt;br /&gt;
&lt;br /&gt;
For example, you can switch between some turbulence models when you choose JSBSim as your flight dynamic model (FDM). Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
Furthermore you can specify the turbulence level during running FlightGear in ''Environment &amp;gt; Weather'' when you enable Manual Configuration and click on the button at the right which is also called Manual Configuration (see [[Weather]]. You can set the turbulence there to four values: none, light, moderate and severe. This article will also discuss the internal processing of these settings and what they actually mean in the different turbulence calculations.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{See also|Fixing Presets}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [[$FG_ROOT]]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  &amp;lt;input&amp;gt;&lt;br /&gt;
    &amp;lt;expression&amp;gt;&lt;br /&gt;
      &amp;lt;pow&amp;gt;  &lt;br /&gt;
        &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [[$FG_ROOT]]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [[JSBSim_Atmosphere]]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [[$FG_SRC]]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [[$FG_SRC]]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [[$FG_SRC]]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=De/HB_Radio-NAV&amp;diff=94187</id>
		<title>De/HB Radio-NAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=De/HB_Radio-NAV&amp;diff=94187"/>
		<updated>2016-02-28T16:57:14Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Der Autopilot (AP) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;''Dies ist ein Teil des deutschen &amp;quot;Flightgear Handbuches&amp;quot;, aufbauend auf der originalen &amp;quot;getstart.pdf&amp;quot;. Besuche auch die anderen Teile durch Maus-Klick auf:''&amp;lt;/small&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{{HBmenu}}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Übersicht'''==&lt;br /&gt;
Radios und Navigationsgeräte gibt es in den unterschiedlichsten Bauformen und Funktions-Einheiten. In modernen Flugzeugen sind die Geräte selbst meist hinter Verkleidungen installiert – und auch die Anzeigen und Bedienelement sind oft in andere Baugruppen integriert.&lt;br /&gt;
Lass uns im Folgenden die Funktion und Bedienung der verschiedenen Radio-Funktionen an den übersichtlichen Bauformen der äußerst großzügig ausgestatteten C172p studieren:&lt;br /&gt;
{|&lt;br /&gt;
||[[File:c172p-Radio-Tower-De.png|650px|thumb|left|Die Radio-Einheiten der c172p]]&lt;br /&gt;
|}&lt;br /&gt;
Im Folgenden beschreiben wir die einzelnen Einheiten von oben nach unten (siehe auch die Beschriftungen rechts):&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
=='''Die Audio-Kontrolleinheit'''==&lt;br /&gt;
Jede Radio-Einheit produziert Audio-Ausgaben, die recht störend wirken können wenn sie alle gleichzeitig los-plärren, und damit ein unverständliches Gemisch von mehreren Sprach-Ausgaben, Morse-Codes, Peiltönen, etc. produzieren. Mit der Audio-Kontrolleinheit wird gesteuert, welche Audio-Ausgänge jeweils auf Lautsprecher und/oder Kopfhörer geschaltet werden, und welche derzeit stumm bleiben. Die Bedienung ist selbsterklärend. '''''Allerdings: '''''Diese Einheit ist in unsere C172p (zur Zeit dieses Schreibens) nicht funktionell: Es lassen sich zwar alle Schalter bewegen – aber ohne Funktion! Allerdings benötigen wir diese Funktion auch nicht unbedingt, denn an jedem Einzel-Gerät lässt sich der Audio-Ausgang individuell ein/aus-schalten.&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||[[File:C172-Audio-Control-Unit.png |210px|thumb|left|C172-Radios-ADF-NDB]]Mit dem linken Drehschalter schaltest Du Dein Mikrofon auf einen der beiden Sender (COM1 oder COM2).&lt;br /&gt;
Darunter befinden sich 3 Licht-Anzeigen, die während des End-Anfluges bedeutungsvoll sind:&lt;br /&gt;
*'''''Outer-Marker: '''''Das '''''blau'''''e Licht, zusammen mit einem '''''400 Hz''''' Ton wird 4-7 mi vor dem Aufsetzpunkt aktiv.&lt;br /&gt;
*'''''Middle-Marker: '''''Das '''''gelb'''''e Licht, zusammen mit einem '''''1300 Hz''''' Ton wird 0.5 - 0.8 mi vor dem Aufsetzpunkt aktiv.&lt;br /&gt;
*'''''Inner Marker: '''''das '''''weiße''''' Licht, zusammen mit einem '''''3000 Hz''''' Ton wird direkt über dem Aufsetzpunkt aktiv.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
=='''Das {{HBabbr|ADF}} / {{HBabbr|NDB}}'''==&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||[[File:C172-Radios-ADF-NDB.png|600px|thumb|left]] &lt;br /&gt;
|}&lt;br /&gt;
Mit dem „'''A'''utomatic '''D'''irection '''F'''inder“ (''Radiokompass, Empfänger)'' können wir ein '''&amp;quot;N'''on-'''D'''irectional '''B'''eacon&amp;quot; ''(ungerichtetes Funkfeuer)'' anpeilen und mittels des Richtungsanzeigers ''&amp;lt;small&amp;gt;(der gelbe Pfeil in obiger, mittleren Abbildung&amp;lt;/small&amp;gt;)'' in dessen Richtung fliegen. Im Beispiel oben müssten wir also unseren derzeitigen Kurs um 20° nach rechts ändern, um zum {{HBabbr|NDB}} zu gelangen! Mit anderen Worten: Du fliegst so, dass die gelbe Nadel senkrecht nach oben zeigt - und kümmerst Dich absolut nicht darum was Dein Kompass anzeigt!&lt;br /&gt;
&lt;br /&gt;
Du findest die {{HBabbr|NDB}}s in den Luftkarten als rötliche Punkte mit einem runden Wolken-ähnlichen Gebilde um sich herum. {{HBabbr|NDB}}s haben wie {{HBabbr|VOR}}'s einen vollen Namen (z.B. „REIGA“), eine Kennung („LV“) die auch als Morse-Code über das Radio übertragen wird, und natürlich eine Frequenz („374“). ''(Die Darstellung oben rechts ist die Darstellung in der [[De/HB_Features#MPmap|MPmap]])''.&lt;br /&gt;
&lt;br /&gt;
Zur Benutzung eines {{HBabbr|NDB}} stellst Du dessen Frequenz ein und verifizierst als allererstes dessen Morsecode im Lautsprecher.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;small&amp;gt;''Zum Zeitpunkt des Schreibens funktionierte das Abhören des &amp;quot;Morse-Codes&amp;quot; nicht, somit verifiziere mit anderen Mitteln, dass Du tatsächlich auf das richtige {{HBabbr|NDB}} zufliegst - z.B. mittels der [[De/HB_Features#MAP|Map.]])''&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;Wenn der Morse-Code stimmt folge der Nadel im Instrument, d.h.: Halte diese immer senkrecht nach oben. Du fliegst dann also nicht nach Kompass – sondern in die Richtung der Nadel, vergiss hierbei die Kompass-Rose im Instrument! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Der Schwachpunkt dieser Navigation mittels {{HBabbr|ADF}}/{{HBabbr|NDB}}''''' ''(gegenüber der z.B. mittels eines {{HBabbr|VOR}})'' ist, dass nur die Richtung (heading = Nase hin) zum {{HBabbr|NDB}} angezeigt wird - aber die für das Einhalten des &amp;quot;'''''Wanted Course'''''&amp;quot; benötigte Richtung unbekannt ist. Siehe z.B.:&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||[[File:NDB wind deviation.jpg |left]]&lt;br /&gt;
*Wenn Du einfach dem Zeiger zum {{HBabbr|NDB}} folgst, wird Dich ein Seiten-Wind versetzen, so dass Du tatsächlich dem hier gezeigten &amp;quot;'''''Actual Course'''''&amp;quot; folgst!&lt;br /&gt;
:'''''Dieses gleiche Abdriften passiert auch, wenn Du einen Autopiloten benutzt um auf einen {{HBabbr|NDB}} zuzufliegen!'''''&lt;br /&gt;
&lt;br /&gt;
*Du bist der Einzige der von Anfang an die &amp;quot;Heading&amp;quot; (Nase) etwas in den Wind drehen kann um den gewünschten &amp;quot;'''''Wanted Course'''''&amp;quot; (Kurs über Boden!) zu verfolgen. (Siehe hierzu eine Anwendung im Kapitel &amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot;, [[De/HB_IFR-Flug#4.29_Der_.E2.80.9EProcedure_Turn.E2.80.9C_.28Umkehr-Prozedur.29|die Umkehr-Prozedur]]).&lt;br /&gt;
&lt;br /&gt;
'''''Übrigens: '''''Ein echter Pilot muss nachweisen, dass er berechnen kann welche &amp;quot;Richtung&amp;quot; er einhalten muss, um den &amp;quot;Wanted Course&amp;quot; bei der oder der Windstärke aus der oder der Richtung zu halten! Das funktioniert auch relativ gut -- dumm ist nur, dass der Wind sich selten daran hält - er ändert ständig Richtung und Stärke - Du mußt also ständig das aktuelle Wetter wissen und den Kurs neu berechnen!&lt;br /&gt;
|}&lt;br /&gt;
Dies ist zugegebener Maßen etwas anstrengend und wird auch nicht vom Autopiloten unterstützt -- aber wenn nix anderes &amp;lt;small&amp;gt;(z.B. kein {{HBabbr|VOR}})&amp;lt;/small&amp;gt; da ist, ist man eventuell dankbar für diesen Trick! &lt;br /&gt;
&lt;br /&gt;
'''''Zur Bedienung: '''''&amp;lt;small&amp;gt;(weitere Infos auf http://monterey.militaryflyingclubs.com/Other%20Docs/KR87.ADF.pdf)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''''OFF/VOL: '''''Siehe den Drehknopf für die Lautstärke zum Abhören des Morsezeichens. Ganz nach links gedreht schaltet er den Empfänger aus. Verstelle die Lautstärke mittels des Mausrades wenn der Mauszeiger über dem Drehknopf ist (oder durch Mausklicks recht/links davon).&lt;br /&gt;
&lt;br /&gt;
*'''''ADF/ANT: '''''Achte darauf, dass links in der Anzeige „{{HBabbr|ADF}}“ steht (d.h.: die ADF-Taste ist eingerückt). Basierend auf unterschiedlichen Antennen-Konfigurationen für {{HBabbr|ADF}} und ANT, ist in der Wirklichkeit die Betriebsart „ADF“ besser geeignet für den Richtungsempfang – dem gegenüber ist „ANT“ (wenn die Taste ausgerückt ist) besser für den Empfang des Morsecode geeignet.&lt;br /&gt;
:'''''Versichere Dich immer davon, dass im Anzeigefenster &amp;quot;ADF&amp;quot; angezeigt wird - ansonsten gehst Du in die Irre!'''''&lt;br /&gt;
&lt;br /&gt;
*'''''BFO: '''''Kann zusätzlich aktiviert werden um den Morse-Code auch auf „Nicht-Modulierten“ Sendern zu empfangen. Für uns nicht wirklich wichtig!&lt;br /&gt;
&lt;br /&gt;
*'''''FRQ: '''''Drücke FRQ mehrmals und beobachte dabei wie die beiden angezeigten Frequenzen zwischen den zwei Anzeigen wechseln. Die Frequenz in der linken Anzeige ist „aktiv“, d.h. sie wird im Radiokompass angezeigt. Die andere ist auf „Standby“ (Bereitstellung) und kann mit dem Einstellknopf ganz rechts verändert werden. Somit kannst Du der eingestellten Peilung weiter folgen und schon mal vorausplanend die als nächstes benötigte Frequenz einstellen.&lt;br /&gt;
:*'''''Die Frequenzeinstellung '''''erfolgt mit dem Stellrad ganz rechts: Du kannst nur die rechts angezeigte, standby ''(in Bereitschaft)'' Frequenz verstellen&lt;br /&gt;
::Drehe das Rad&lt;br /&gt;
::*mittels des Mausrades (oder Mausklick links/rechts) um Einer-Positionen&lt;br /&gt;
::*mittels Klick mit der mittleren Maustaste rechts/links um Hunderter-Positionen&lt;br /&gt;
::*oder setze die &amp;quot;Nummer&amp;quot; direkt in den [[#Die_.22einfache.22_Radio_Einstellungen:|Radio-Settings]]&lt;br /&gt;
:*Achte darauf, dass die Nadel nicht einfach nach rechts zeigt wenn Du die Frequenz änderst - das ist die Ruheposition, '''''die bedeutet dass keine Sender gefunden/eingestellt wurde!'''''&lt;br /&gt;
&lt;br /&gt;
*'''''FLT/ET: '''''Ersetzt im rechten Teil der Anzeige die Standby-Frequenz mit der Zeitanzeige und wechselt dann zwischen der Anzeige von FLT und ET:&lt;br /&gt;
:*FLT = Flight Time (die vergangene Zeit seit Du den FlightGear gestartet hast)&lt;br /&gt;
:*ET = Elapsed Time (Stopp Uhr)&lt;br /&gt;
:*Um zur Anzeige der Standby-Frequenz zurückzukehren drücke FRQ&lt;br /&gt;
*'''''SET/RST: '''''Stellt die Stoppuhr auf 0 und startet sie direkt wieder. Vorsicht: Die Uhr wird dabei immer zurückgestellt, auch wenn sie nicht angezeigt wird!!&lt;br /&gt;
&lt;br /&gt;
*'''''HD '''''''(Heading Direction - Richtungsanzeige)'': Siehe die Inschrift auf dem kleinen Drehknopf links unterhalb des Instrumentes in der Mitte:&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
=='''Die COM/NAV-Radios'''==&lt;br /&gt;
{|&lt;br /&gt;
||[[File:C172-Radio-Com-Nav.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Die C172p ist luxuriöses mit 2 COM/NAV-Radios ausgestattet! Beide Radios sind gleich und beide beinhalten sowohl ein COM-Radio (zur Kommunikation, linker Teil) wie auch ein NAV-Radio (zur Navigation, rechter Teil). Beide Radios besitzen die gleichen Bedienelemte und Anzeigen sowohl für den COM-Teil wie auch für den NAV-Teil! Zum NAV-Teil gehört noch eine zusätzliches Anzeige-Instrument: Das sogenannte &amp;quot;{{HBabbr|OBS}}&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''''Die Bedienung:'''''&lt;br /&gt;
&lt;br /&gt;
*'''''Lautstärke: '''''Regele diese je COM und NAV mit dem jeweils linken, kleineren Drehknopf am unteren Rand. Dabei schaltet der ganz linke Drehknopf in der „OFF“-Stellung zusätzlich das komplette  Gerät aus.&lt;br /&gt;
&lt;br /&gt;
*'''''Anzeige: '''''Um immer die nächste benötigte Frequenz einstellen zu können, ohne die bestehende Verbindung zu stören, hat jedes Gerät zwei Anzeigen (siehe im Bild 119.80/125.20 und 114.10/110.50). Aktiv ist immer die Frequenz links in der jeweiligen Anzeige – rechts ist die zusätzlich bereitgestellte Frequenz. Somit ist klar, dass jeweils nur diese „rechte“ verstellt werden kann! Mit der weißen Taste direkt unterhalb der Anzeige schaltest Du zwischen den beiden hin und her - mit anderen Worten definierst Du damit welche Frequenz aktive ist (nämlich nur die links stehende!). In unserem Beispiel also 119.8 für die Kommunikation und 114.10 für die Navigation ({{HBabbr|VOR}} oder {{HBabbr|ILS}}).&lt;br /&gt;
&lt;br /&gt;
*'''''Frequenz: '''''Regele die Frequenz für COM @ NAV jeweils mit den größeren Drehknöpfen rechts&lt;br /&gt;
:*Klicken mit der linken Maustaste links/rechts des Reglers verstellt die Frequenz einstellig&lt;br /&gt;
:*Klicken mit der mittleren Maustaste links/rechts des Reglers verstellt die Frequenz um hunderter Stellen&lt;br /&gt;
:*Am einfachsten geht es&lt;br /&gt;
::*mittels Drehen des Mausrades über dem Regler&lt;br /&gt;
::*oder durch Eingabe der Frequenzen via „'''''Menü → Equipment → Radio Settings'''''“, siehe das nachfolgende Kapitel &amp;quot;Die einfache Radio-Einstellung&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Wenn Du in den NAV-Radios eine neue Frequenz eingestellt hast, solltest Du unbedingt die Lautstärke hoch-drehen und an Hand des zu hörenden Morsezeichens die Station verifizieren. Das gültige Zeichen (inklusive des Punkt/Strich-Codes) findest Du in den Flugkarten. Insbesondere in größeren Höhen kommt es vor, dass ein anderer Sender auf gleicher Frequenz näher ist oder Du Dich bei der Einstellung vertan hast. Im Simulator kann man darüber lachen – aber wir sind doch echte Piloten und wissen was passieren kann, wenn wir komplett vom Kurs abkommen!!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Die &amp;quot;einfache&amp;quot; Radio Einstellungen:===&lt;br /&gt;
Du hast mehrere Möglichkeiten die benötigten Frequenzen etc. einzustellen - z.B. auch indem du sie direkt an den Geräten einstellst. Aber die einfachste (und genaueste) Art der Einstellung geschieht über:&lt;br /&gt;
::„'''''Menü → Equipment → Radio Settings'''''“ :&lt;br /&gt;
{|&lt;br /&gt;
||[[File:Radio-Settings.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Die vorstehenden Einstellungen sind diejenigen, die sowohl für das Kapitel [[De/HB_VFR_Flug|{{HBabbr|VFR}} Cross Country]] wie auch [[De/HB_IFR-Flug|{{HBabbr|IFR}} Cross Country]] benutzt werden. Die eingetragenen Werte entsprechen folgenden  Funktionen:&lt;br /&gt;
{| cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &lt;br /&gt;
!Selected / Aktiv&lt;br /&gt;
!Standby / Vorwahl&lt;br /&gt;
!Bemerkungen:&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|COM1&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|KRHV-TWR&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|KRHV-{{HBabbr|ATIS}}&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|COM2&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|KLVK-TWR&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|KLVK-{{HBabbr|ATIS}}&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|NAV1&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{HBabbr|VOR}} SJC (R=009)&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|KLVK {{HBabbr|ILS}} 25R&lt;br /&gt;
||Wenn Du mit Autopilot fliegst kannst Du NUR den NAV1 zum Kurshalten benutze!&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|NAV2&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{HBabbr|VOR}}-OAK (R=114)&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{HBabbr|VOR}}-ECA (R=229)&lt;br /&gt;
||benutze NAV2 insbesondere zur Standortbestimmung oder sonstiger Referenzen&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|{{HBabbr|ADF}}&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|KLVK – Anflug REIGA&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|Referenz TRACY&lt;br /&gt;
||siehe das Kapitel {{HBabbr|ADF}}/{{HBabbr|NDB}}&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|&amp;lt;{{HBabbr|DME}}&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|Für den selten vorkommend Fall eines allein stehenden {{HBabbr|DME}}, siehe z.B. EDDF&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|{{HBabbr|TACAN}}&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|Hier z.B. der Wert für den Flugzeugträger Eisenhauer bei  Marseille (France)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|TRANSPONDER&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|In den neuesten Versionen gibt es ein zusätzliches Feature, insbesondere zur Benutzung mit VATSIM: Den &amp;quot;Transponder&amp;quot;! Setze diesen (falls vorhanden) auf 7000 für {{HBabbr|VFR}} - ansonsten wie von {{HBabbr|ATC}} angewiesen!&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Mittels Maus-Klick auf die Schaltfläche &amp;quot;'''''ATC services in range'''''&amp;quot; ({{HBabbr|ATC}} Services in der Nähe) findest Du Frequenzen für Airports:&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;''(die folgenden {{HBabbr|GUI}}'s waren früher unter „Menü → ATC/AI → Frequencies“ aufgehängt)''&amp;lt;/span&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
||[[File:Search-Airport-Freq.png |left]]&lt;br /&gt;
|}&lt;br /&gt;
*Wähle den gewünschten Flugplatz im größeren der beiden {{HBabbr|GUI}}'s&lt;br /&gt;
:* durch Maus-Klicke auf einen der gelisteten Flugplätze im Nahbereich (z.B. KRHV)&lt;br /&gt;
:* oder tippe den gewünschten &amp;lt;abbr title=&amp;quot;International Civil Aviation Organisation == Flughafen ID's&amp;quot;&amp;gt;ICAO&amp;lt;/abbr&amp;gt;-Kod in das gelbe Feld&lt;br /&gt;
*Das öffnet das kleiner {{HBabbr|GUI}} mit den verfügbaren Frequenzen&lt;br /&gt;
::übertrage diese in die COM-Radios. z.B. für KRHV:&lt;br /&gt;
::*125.20 → in COM1 links als &amp;quot;Selected&amp;quot; (Aktiv) für den {{HBabbr|ATIS}}, den wir zuerst abhören wollen&lt;br /&gt;
::*119.80 → in COM1 rechts Standby (Bereitstellung), für den &amp;quot;Tower&amp;quot;, den wir erst danach brauchen.&lt;br /&gt;
::(Bemerkung: Auf KRHV gibt es keinen extra &amp;quot;Ground&amp;quot;, somit ist der Tower der erste Ansprechpartner!)&lt;br /&gt;
&lt;br /&gt;
Du solltest dann nach ein paar Sekunden Ladezeit die {{HBabbr|ATIS}}-Angaben hören. Wenn Du diese nicht hörst überprüfe ob das Radio eingeschaltet und die Lautstärke aufgedreht ist (siehe oben). Evtl. solltest Du auch unter „'''''Menü → File → Sound Configuration'''''“ überprüfen ob der Ton evtl.  ausgeschaltet ist!&lt;br /&gt;
&lt;br /&gt;
'''''Für FGCOM Benutzer: '''''Die im kleineren {{HBabbr|GUI}} aufgelisteten Frequenzen sind die Standard-Frequenzen aus den FlightGear Daten. Diese können, müssen aber nicht, mit den im [[De/HB_Features#FGCOM|FGCOM]] verfügbaren Frequenzen übereinstimmen! Wenn Du ohne [[De/HB_Features#FGCOM|FGCOM]] fliegst ist das egal – für [[De/HB_Features#FGCOM|FGCOM]] kannst Du aber nur die speziellen FGCOM-Frequenzen verwenden! (siehe die Datei „'''''phonebook.txt'''''“ in Deinem [[De/HB_Features#FGCOM|FGCOM]]-Verzeichnis! ''Dieses Verzeichnis befindet sich unter Windows meistens im [[De/HB_Installation#.24FG_ROOT|'''''$FG_ROOT''''']], für Linux ist es oft unter [[De/HB_Installation#.24FG_HOME$|'''''FG_HOME''''']] installiert!)''&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Der NAV-Teil = VOR &amp;amp; ILS===&lt;br /&gt;
Der NAV-Teil beider Radios dient der Radio-Navigation mittels {{HBabbr|VOR}} und der Anflugkontrolle mittels {{HBabbr|ILS}}. Dies besagt schon, dass {{HBabbr|VOR}} und {{HBabbr|ILS}} technisch sehr ähnliche Systeme sind. Und grundsätzlich haben sie die gleiche Aufgabe, nämlich dem Piloten (und/oder Autopiloten) den Weg zur Sendestation zu zeigen. Beide geben dabei nicht nur eine generelle Richtung an (wie das {{HBabbr|ADF}}) sondern produzieren einen &amp;quot;Radial&amp;quot; (Leitstrahl), auf den der Pilot einscheren kann um dann den Sender genau auf diesem Leitstrahl auf kürzestem Wege unter genau dem angegebenen Kurs anzufliegen - ein unbeabsichtigtes Abdriften durch den Wind ist dabei nicht möglich!&lt;br /&gt;
&lt;br /&gt;
Aber was sind die Unterschiede zwischen {{HBabbr|VOR}} und {{HBabbr|ILS}} ??&lt;br /&gt;
&lt;br /&gt;
*'''''{{HBabbr|VOR}}-Sender''''' können irgendwo im Gelände stehen. Sie senden weitreichende Radials (Richtungssignale) in alle Himmelsrichtungen.  Die Reichweite beträgt je nach Flughöhe mehr als 100 mi - sie können aber evtl. auch in geringerer Entfernung nicht wahrnehmbar sein, wenn zwischen Dir und dem Sender ein Berg oder ähnliches ist! Auf Flugkarten erkennst Du {{HBabbr|VOR}}'s daran, dass um sie herum eine Kompassrose ist, mittels derer Du bei der Flugplanung direkt einen gewünschten magnetischen Kurs ablesen bzw. definieren kannst&lt;br /&gt;
&lt;br /&gt;
*'''''{{HBabbr|ILS}}-Sender''''' stehen an einer Landebahn und strahlen immer in Kursrichtung der Landebahn - Du kannst also keinen anderen Kurs eingeben. Dieser &amp;quot;Landbahnkurs&amp;quot; wird &amp;quot;Localizer&amp;quot; genannt - er hat &amp;lt;small&amp;gt;''(je nach Aufrüstung/Klassifikation)''&amp;lt;/small&amp;gt; eine Reichweite von 18 bis zu 100 mi.&lt;br /&gt;
:*Zusätzlich zum {{HBabbr|ILS}} gibt es oft einen sogenannten &amp;quot;Glideslope&amp;quot; - wie der Localizer gibt Dir auch dieser eine fest eingestellte Richtung an -- aber vertikal. Diese GS reicht meist aber nur 10 mi weit!&lt;br /&gt;
:*Beide zusammen zeigen Dir also, ob Du Dich auf der Ideallinie zum Aufsetzpunkt befindest, sowohl horizontal als auch vertikal!&lt;br /&gt;
&lt;br /&gt;
Siehe für den Umgang mit einem {{HBabbr|VOR}} die nachstehende Abb. für das Gebiet bei &amp;quot;San Jose&amp;quot;. Danach sind ein paar Beispiele für den Umgang mit {{HBabbr|VOR}}'s aufgeführt.&lt;br /&gt;
&lt;br /&gt;
Aber siehe erst ein paar grundsätzliche Kenndaten an Hand einer &amp;quot;Sectional&amp;quot;, z.B. http://skyvector.com :&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||[[File:VOR-Navigation.png|300px|thumb|left|{{HBabbr|VOR}}-Navigation]]&lt;br /&gt;
In dieser Grafik siehst Du 2 {{HBabbr|VOR}}s: &amp;quot;OAK&amp;quot; und &amp;quot;SJC&amp;quot;. Lass uns am Beispiel des &amp;quot;'''''{{HBabbr|VOR}} SJC'''''&amp;quot; ansehen, welche Informationen uns eine normale Flugkarte dazu gibt (siehe das rot umrandete Feld unten rechts) :&lt;br /&gt;
&lt;br /&gt;
*'''''VOR-DME: '''''zeigt an, dass dies ein rein ziviles „{{HBabbr|VOR}}“ ist mit einem integrierten „{{HBabbr|DME}}“. Es gibt auch zivil/militärische Kombinationen, so genannte {{HBabbr|VORTAC}}s (siehe z.B. das {{HBabbr|VOR}} in Oakland oben links, das deswegen auch noch zusätzliche Informationen zeigt).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''''SAN JOSE: '''''ist der volle Name&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
:*'''''114.1''''' : ist die im NAV einzustellende Frequenz&lt;br /&gt;
:*'''''Ch 88''''' : ist die entsprechende Frequenz für einen anderen Radio-Typ&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
:*'''''SJC''''' : ist die Kennung des {{HBabbr|VOR}} (diesen würdest Du z.B. in einem Routenplaner eingeben!)&lt;br /&gt;
:*&amp;quot;'''''...  .---   -.-.'''''&amp;quot; ist der dazugehörige  Morsecode ''(„SJC“)'', mit dem sich das {{HBabbr|VOR}} über Funk zu erkennen gibt! Die Punkte und Striche hörst Du als kürzere bzw. längere Töne, zwischen jedem Buchstaben gibt es eine deutliche Pause.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In der Darstellung sind 2 '''''Radials''''' hervorgehoben:&lt;br /&gt;
#&amp;quot;114° FROM&amp;quot;, ausgehend vom {{HBabbr|VOR}} OAK&lt;br /&gt;
#&amp;quot;002° FROM&amp;quot;, ausgehend vom {{HBabbr|VOR}} SJC&lt;br /&gt;
Interessant ist, dass sich diese beiden Radials kreuzen und damit einen sehr interessanten Punkt definieren, der sogar einen Namen bekommen hat: &amp;quot;'''''MISON'''''&amp;quot;. Dies wurde ein sehr wichtiger &amp;quot;'''''FIX&amp;quot;-Punkt''''' für die Navigation in der Bay-Area! Einen solchen &amp;quot;FIX&amp;quot; kannst Du unter strikten {{HBabbr|VFR}}-Regeln nicht erkennen, da es sich tatsächlich nur um den Schnittpunkt zweier Radio-Signale handelt - versuche also nicht diesen wie eine Sehenswürdigkeit mit den Augen zu erkennen. Aber solche FIX-Punkte helfen den Flugverkehr genauer zu leiten. Zudem kannst Du solche FIX-Punkte als &amp;quot;Waypoints&amp;quot; (Weg-Markierungen) in Flugplänen angeben, oder sie werden als '''''Reporting-Points''''' (Punkte an denen die Piloten der Flugüberwachung Bericht erstatten) definiert, etc.&lt;br /&gt;
|}&lt;br /&gt;
===OBI: Das {{HBabbr|VOR}}/{{HBabbr|ILS}}-Instrument:===&lt;br /&gt;
Wie bereits vorstehend erläutert, gibt es zu dem NAV-Radio noch eine Anzeigeeinheit - die wir uns anschauen sollten. Das Instrument enthält die folgenden Funktionen:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
||[[File:C172-VOR-Instrument.png‎|192px|thumb|left]]&lt;br /&gt;
'''''{{HBabbr|OBS}}: Dies ist die Einstellschraube in der unteren linken Ecke. Mit dieser verdrehst Du die Windrosen-Skala des Instrumentes, bis der gewünschte Radial ganz oben steht - in diesem Beispiel also &amp;quot;002&amp;quot; (= praktisch 000° direkt Norden, passend zu unserem [[De/HB_VFR_Flug|{{HBabbr|VFR}}-Flug]] und obiger Karte).&lt;br /&gt;
&lt;br /&gt;
'''''CDI = '''''&amp;quot;Course Deviation Indication&amp;quot; (Kurs-Abweichungs-Anzeige): Die vertikale Nadel zeigt normalerweise&lt;br /&gt;
*nach links wenn Du den Kurs nach links ändern solltest um (wieder) auf das Radial zu gelangen&lt;br /&gt;
*nach rechts wenn Du den Kurs nach rechts ändern solltest um (wieder) auf das Radial zu gelangen&lt;br /&gt;
*senkrecht wenn Du genau auf dem Radial bist&lt;br /&gt;
In der jetzigen Anzeige müsstest Du also etwas nach links &amp;lt;small&amp;gt;''(etwa auf Richtung 350° auf dem &amp;quot;Heading Indicator&amp;quot; (Gyro-Kompass))''&amp;lt;/small&amp;gt; drehen um auf den genauen Kurs zu kommen - erst wenn die Nadel dann zentriert ist gehst Du genau auf die gewünschte Richtung 002°!&lt;br /&gt;
&lt;br /&gt;
'''''GS = '''''&amp;quot;Glide-Slope&amp;quot; (Gleitpfad): Diese horizontale Nadel funktioniert genauso wie das &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; - allerdings in vertikaler Richtung. Dies hat also nur im Zusammenhang mit dem {{HBabbr|ILS}} beim End-Anflug auf eine Landbahn eine Funktion! Beachte, dass dieses GS-Signal (Reichweite ~10 mi) immer erst sehr viel später aktive wird, als das vom gleichen Sender ausgehende &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Signal (Reichweite bis zu 50 mi und mehr)!&lt;br /&gt;
&lt;br /&gt;
'''''TO/FROM '''''(hin-zu / weg-von): Siehst Du das kleine Fenster rechts von der Mitte, das derzeit &amp;quot;FR&amp;quot; &amp;lt;small&amp;gt;''(für &amp;quot;from&amp;quot;)''&amp;lt;/small&amp;gt; anzeigt?  Hier wird &amp;quot;TO&amp;quot; angezeigt, wenn das eingestellte &amp;quot;Radial&amp;quot; zum {{HBabbr|VOR}} hinweist, &amp;quot;FROM&amp;quot; &amp;lt;small&amp;gt;''(bzw. &amp;quot;FR&amp;quot;)''&amp;lt;/small&amp;gt; wird angezeigt wenn das Radial vom {{HBabbr|VOR}}&amp;gt; weg weist. Wenn Nichts angezeigt wird, befindest Du Dich nicht im Wirkungsbereich eines {{HBabbr|VOR}} mit der eingestellten Frequenz!  '''''Diese Feinheit ist ganz wichtig: '''''Das &amp;quot;TO/FROM&amp;quot; ist unabhängig davon ob Du tatsächlich zum {{HBabbr|VOR}} hinfliegst oder Dich entfernst - es zeigt nur an, dass der eingestellte Radial zum Sender hin- (&amp;quot;TO&amp;quot;) oder wegführt (&amp;quot;FROM&amp;quot;). Als Pilot steht es Dir frei diesen Radial auch entgegengesetzt zu benutzen - Du musst nur aufpassen: Die CDI-Anzeigen sind dann entgegengesetzt! Siehe die folgende Skizze:&lt;br /&gt;
|}&lt;br /&gt;
:{|&lt;br /&gt;
||[[File:RNAV VOR-To-From.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Beachte also:&lt;br /&gt;
:{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Radial&lt;br /&gt;
!Deine Position&lt;br /&gt;
!Kompass&lt;br /&gt;
!{{HBabbr|OBS}}&lt;br /&gt;
!&amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Anzeige bei einem Flug nach Osten:&lt;br /&gt;
|- style=&amp;quot;color: green&amp;quot;&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|TO 090°&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|westlich des {{HBabbr|VOR}}'s&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|090°&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|090°&lt;br /&gt;
||Normal: Zeigt nach links wenn du nach links korrigieren solltest&lt;br /&gt;
|- style=&amp;quot;color: red&amp;quot;&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|FROM 270°&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|westlich des {{HBabbr|VOR}}'s&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|090°&lt;br /&gt;
|align=&amp;quot;center&amp;quot; style=&amp;quot;color:red|270°&lt;br /&gt;
||'''''Entgegengesetzt: '''''Zeigt nach links wenn du nach rechts korrigieren solltest&lt;br /&gt;
|- style=&amp;quot;color:green&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|FROM 090°&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|östlich des {{HBabbr|VOR}}'S&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|090°&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|090°&lt;br /&gt;
||Normal: Zeigt nach links wenn du nach links korrigieren solltest&lt;br /&gt;
|- style=&amp;quot;color: red&amp;quot;&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|TO 270°&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|östlich des {{HBabbr|VOR}}'S&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|090°&lt;br /&gt;
|align=&amp;quot;center&amp;quot; style=&amp;quot;color:red|270°&lt;br /&gt;
||'''''Entgegengesetzt: '''''Zeigt nach links wenn du nach rechts korrigieren solltest&lt;br /&gt;
|}&lt;br /&gt;
:Lass uns als Beispiel die obige Darstellung des Instrumentes analysieren:  Dort wollen wir auf dem Radial „TO 002°“ zum {{HBabbr|VOR}} hin-fliegen – also ziemlich genau zum magnetischen Nordpol:&lt;br /&gt;
&lt;br /&gt;
:*Dazu haben wir die Kompass-Rose des {{HBabbr|OBI}} mittels des {{HBabbr|OBS}} auf &amp;quot;002°&amp;quot; gestellt. (Das kann man aber bei einem solchen Instrumenten kaum genau einstelle - wenn es darauf ankommt empfehle ich Dir die [[#Die_.22einfache.22_Radio_Einstellungen:|Radio-Setting]] zur Eingabe des digitalen Wertes zu benutzen!)&lt;br /&gt;
&lt;br /&gt;
:*In dem Beispiel weist uns die nach links geneigte, vertikale Nadel des Instruments darauf hin, dass der eingestellte Radial etwas links von uns ist – wir müssen also unseren Kurs nach dort hin korrigieren:&lt;br /&gt;
::*Ändere also die Richtung entsprechend dem Gyro-Kompass anfangs um ~10° nach links (also etwa auf 350°) und beobachte die senkrechte Nadel:&lt;br /&gt;
:::*bewegt sich die Nadel weiter nach außen oder bleibt sie wo sie ist: Dann steuere noch einmal 10° mehr nach links (also etwa 340°)&lt;br /&gt;
::::*eventuell nimm noch 10° mehr - aber mehr als 30° Korrektur sollten nicht nötig sein! Sei geduldig: Je nachdem wie weit Du vom {{HBabbr|VOR}} entfernt bist, kann es recht lange dauern bis Du eine signifikante Änderung bemerkst! Versuche nicht überzureagieren (das führt nur zu Schlangenlinien und damit zu unnötigem Sprit- und Nervenverbrauch!)&lt;br /&gt;
::::* bewegt sich die Nadel hin zum Zentrum, warte bis die Nadel fast senkrecht steht und gehe dann wieder auf Kurs&lt;br /&gt;
::*Wenn Du dieses Spielchen ständig machen musst (z.B. weil starker Seitenwind herrscht) ändere Deine Flugrichtung auf dem Gyro-Kompass so, dass die &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Nadel zentriert bleibt. Z.B. könntest Du dann bei Seitenwind von links entsprechend dem Gyro einen Kurs von 355° (7° gegen den Wind) halten, während Du tatsächlich genau auf dem Radial „002°“ entlang fliegst!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===HSI: Das Horizontal Situation Instrument===&lt;br /&gt;
{| style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
||[[File:VOR-HSI DE.png|300px|thumb|left]]&lt;br /&gt;
Das HSI kombiniert sowohl das {{HBabbr|OBI}} wie auch den Directional_Gyro in ein einziges Instrument.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Das macht das Ganze deutlich teurerer als die zwei einzelnen Instrumente, und somit ist es nicht in user c172p!&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Falls Du mehr über das HSI wissen willst, siehe:&lt;br /&gt;
:http://de.wikipedia.org/wiki/Horizontal_Situation_Indicator&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''''Zum guten Schluss dieser Einweisung das Wichtigste in Kürze:'''''&lt;br /&gt;
::{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|Der Kompass und/oder {{HBabbr|ADF}} zeigen an in welche Richtung Deine Nase zeigt&lt;br /&gt;
&lt;br /&gt;
Das {{HBabbr|OBI}} zeigt den Kurs!!!&lt;br /&gt;
-- und hilft Dir den Kurs zu halten   -- sogar OHNE Autopilot !'''''&lt;br /&gt;
|}&lt;br /&gt;
Siehe hierfür die Anwendung im [[De/HB_IFR-Flug#2.29_Entlang_der_V334_zum_FIXpunkt_SUNOL.2C_via_MISON|&amp;quot;IFR X-Country&amp;quot;, &amp;quot;Entlang der V334 zum FIXpunkt SUNOL, via MISON&amp;quot;]].&lt;br /&gt;
&amp;lt;br /&amp;gt;Für weiterführende Details siehe z.B.: http://de.wikipedia.org/wiki/Drehfunkfeuer.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
===Das COM/NAV-Radio 2===&lt;br /&gt;
Das zweite Radio ist genau gleich dem Radio 1, siehe oben. Allerdings kann bei den meisten Flugzeugen das NAV2 nicht zur Steuerung des Autopiloten verwendet werden!!&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Der Autopilot (AP)''' ==&lt;br /&gt;
(ref: http://www.g1000.info/Download-Dateien/KAP140.pdf)&lt;br /&gt;
{|&lt;br /&gt;
||[[File:c172-AP-total.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Der Autopilot entlastet Dich insbesondere auf Langstreckenflügen, indem er den vorher eingestellten Daten entsprechend die Steuerung übernimmt. Dies funktioniert meistens besser als es jeder Pilot kann – aber es basiert auf einer sehr engen Auslegung der vorhandenen Daten, die ohne jegliche Intelligenz interpretiert werden. Als Beispiel: Wenn Du auf 10.000 ft steigen willst, führt der Autopilot dies ganz prima aus – aber bei ca. 7.000 ft stürzt Du ab, da das Gemisch so fett wurde, dass der Motor stehen bleibt! Es gibt tausende solcher Beispiele!&lt;br /&gt;
:{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
||&amp;lt;big&amp;gt;'''''Vergiss also nie: Du bist und bleibst der verantwortliche Pilot – nicht der Autopilot !!''''' &amp;lt;/big&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
*'''''Schalte das Gerät vor Start und Landung unbedingt aus'''''! Ansonsten können absolut unvorhersehbare Dinge geschehen! Sogar wenn Du eine AP-{{HBabbr|ILS}}-Landung machst: Schalte den AP vor dem Aufsetzen auf der Landebahn komplett aus!&lt;br /&gt;
**Ja doch: Es gibt Modelle die könne sehr viel mehr und besser – aber nicht die C172 – und viele andere auch nicht! Also Vorsicht!&lt;br /&gt;
**'''''Wenn Du ausschaltest''''', schalte nicht nur einzelne Funktionen aus – denn es ist schwierig zu merken welche Funktionen dann noch aktiv bleiben (z.B. bleibt auf jeden Fall das „Rollen“ immer aktiv!)&lt;br /&gt;
**Nach dem Ausschalten, schaltet der AP nicht sofort aus sondern blinkt erst ein Weilchen um Dich zu warnen - warte also nicht bis zur letzten Sekunde!&lt;br /&gt;
&lt;br /&gt;
Lass uns nun von rechts nach links anschauen was Du mit dem AP machen kannst:&lt;br /&gt;
&lt;br /&gt;
*'''''AP''''' (Autopilot) schaltet das Gerät ein/aus. Nur beim ersten Einschalten wird der derzeitige Flugzustand übernommen.&lt;br /&gt;
**In dem Fall würde in der oberen Zeile angezeigt:&lt;br /&gt;
***„'''''ROL'''''“: mittels der Ailerons wird ein „Rollen“ (Querlage) verhindert – die Tragflächen werden waagerecht gehalten - und somit wird erstmal schon die derzeitige Richtung beibehalten! Ist doch nett vom AP - oder?  '''''Vorsicht: '''''Die Richtung der Nase wird beibehalten - bei Wind ist das meist nicht der &amp;quot;Kurs&amp;quot;! Das mag oft nicht wichtig sein - aber sei Dir dessen bewusst!&lt;br /&gt;
***„'''''VS'''''“: Die vertikale Steuerung wird mit dem derzeitigen Wert übernommen – das derzeitige Steigen bzw. Sinken also fortgesetzt!&lt;br /&gt;
***„'''''00000'''''“ die gewählte Höhe wird auf 0 gesetzt. Du solltest also möglichst bald mittels „'''''ARM'''''“ Deine gewünschte Höhe eingeben! Oder zumindest sicherstellen, dass Du derzeit nicht sinkst!&lt;br /&gt;
**Während des &amp;quot;Cruise&amp;quot; werden wir die AP-Einstellungen ändern, die dann etwa wie im Bild oben aussehen:&lt;br /&gt;
***'''''HDG: '''''Der AP folgt dem &amp;quot;roten Marker&amp;quot; auf der Windrose des Gyro-Compasses&lt;br /&gt;
***'''''ALT: '''''Der AP übernimmt die Kontrolle über die Höhe&lt;br /&gt;
***'''''05000: '''''Das ist die eingestellte Höhe, die der AP halten wird (wenn die Motorleistung es erlaubt! Ein Standard-AP wird die Motorleistung NICHT anpassen!)&lt;br /&gt;
**AP-Fehler-Anzeigen: Über dem AP-Druckknopf können zwei rote Buchstaben erscheinen:&lt;br /&gt;
***'''''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;P&amp;lt;/span&amp;gt;: '''''Der AP kann den Pitch (Höhenruder/Trimm) nicht einstellen - wenn die Situation längere Zeit bestehen bleibt schaltet der AP automatisch ab&lt;br /&gt;
***'''''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;R&amp;lt;/span&amp;gt;: '''''Der AP kann den ROL (Querruder) nicht einstellen - wenn die Situation längere Zeit bestehen bleibt schaltet der AP automatisch ab&lt;br /&gt;
&lt;br /&gt;
*'''''HDG '''''(Heading, Richtung) schaltet hin/her zwischen „ROL“ und „HDG“.&lt;br /&gt;
**&amp;quot;'''''ROL'''''&amp;quot; versucht die Maschine möglichst gerade zu halten, zumindest die Tragflächen&lt;br /&gt;
**Unter „'''''HDG'''''“ folgt der AP dem roten Marker im Gyro-Kompass. Sei vorsichtig wenn Du den Marker verstellst: Der AP dreht immer auf dem kürzesten Weg auf den Kurs des Markers – wenn Du also z.B. den Marker schnell nach links verdrehst und über ein Delta von 180° kommst, wird die Maschine plötzlich nach rechts drehen (sobald dies der kleinere Winkel zum neuen Kurs ist!!). Falls Du als z.B. aus einer Richtung von 360° LINKS herum nach Osten drehen willst (z.B. weil rechts ein Berg ist oder {{HBabbr|ATC}} es so wollte, oder...), musst Du die Einstellung stufenweise vornehmen: z.B. erst auf 190° und erst wenn diese Richtung fast erreicht ist weiter auf 090°!&lt;br /&gt;
&lt;br /&gt;
*'''''NAV '''''(Radio-Navigation) schaltet um auf den Kurs des „NAV1“, die Maschine wird dann versuchen auf den voreingestellten Radial einzuschwenken. Dieser lässt sich im Menüpunkt Funkfrequenzen ändern. Du solltest vor dem Umschalten bereits auf einem Kurs zum Einscheren in den Radial sein (&amp;lt;60° zum Radial) – ansonsten kannst Du nicht sicher sein ob Du auf „To“ oder „From“ fliegen wirst! Überprüfe auf jeden Fall nach dem Einscheren den Kurs!&lt;br /&gt;
&lt;br /&gt;
*'''''APR '''''(Approach  (Anflug)) schaltet auf den {{HBabbr|ILS}}-Approach (Anflug) – also wird zusätzlich zum Kurs auch der Sinkflug aktiviert (falls der {{HBabbr|VOR}} auch über einen Glideslope (GS) verfügt!).&lt;br /&gt;
**Mit der neuesten Version der c172p (besser als FlightGear 2.0) kannst du während des Anfluges direkt auf APR schalten, auch wenn Du noch weit unterhalb des GL bist (früher verursachte das eine direkten Satz nach oben, zum GS!)&lt;br /&gt;
**Ich empfehle jedenfalls den GL erst zu aktivieren, wenn er auf unserer Höhe ist - damit man sich bei anderen Modellen erst gar nicht vertut!&lt;br /&gt;
&lt;br /&gt;
*'''''REV '''''(Reverse) schaltet auf NAV-Gegenkurs. Wenn Du auf „APR“ bist folgt der AP dem Radial entgegengesetzt vom Aufsatzpunkt weg und schaltet den Glideslope aus.&lt;br /&gt;
&lt;br /&gt;
*'''''ALT '''''(Altitude (Höhe)) schaltet die Höhensteuerung ein. Achte auf die Angabe in der Mitte der Anzeige:&lt;br /&gt;
**„'''''VS'''''“ bedeutet: Es wird die Höhe verändert entsprechend der mit den „UP“/“DN“ Tasten eingestellten „&amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt;“. Hast Du das Problem erkannt? Wenn Du nicht auf Höhe der eingestellten &amp;quot;ALT&amp;quot; bist ist das &amp;quot;UP&amp;quot;/&amp;quot;DN&amp;quot; maßgebend! Der AP wird nicht die eingestellte Höhe anfliegen, sondern entsprechend dem &amp;quot;UP/DN&amp;quot; steigen oder sinken! Wenn also eine Höhe von 4000 ft eingestellt ist, Du aber darunter bist und &amp;quot;UP/DN&amp;quot; auf z.B. &amp;quot;-500&amp;quot; (beachte das Minus!) einstellst, dann wirst Du sinken bis Du auf dem Boden aufschlägst - denn Du erreichst niemals die angestrebte Höhe von 4000, wo der AP automatisch aus-tarieren würde!  Siehe unbedingt den nächsten Punkt &amp;quot;UP/DN&amp;quot;!&lt;br /&gt;
**&amp;quot;'''''ALT'''''&amp;quot; zeigt an, dass die derzeitige Höhe gehalten wird&lt;br /&gt;
:VS und ALT gleichzeitig zeigen an, dass wir uns im Übergang auf eine neue Höhe befinden.&lt;br /&gt;
:Mit &amp;quot;ALT&amp;quot; schaltest Du dann zwischen „VS“ und „ALT“ Modus hin und her.&lt;br /&gt;
&lt;br /&gt;
*'''''PT-Anzeige:'''''&lt;br /&gt;
::Zwischen der Anzeige &amp;quot;ALT&amp;quot; und der Höhenangabe &amp;quot;5000&amp;quot; (vergleiche in obigem Bild) kann ein blinkendes &amp;quot;'''''&amp;lt;PT&amp;gt;'''''&amp;quot; (Pitch-Trimm) in vertikaler Schrift erscheinen. Dies ist eine Aufforderung an Dich die Maschine in die angegebene Richtung zu trimmen (erinnere Dich an das große Rad auf der Mittel-Konsole, trimme mit &amp;quot;7/1&amp;quot; oder &amp;quot;Maus-Rad über dem Trimm-Rad&amp;quot;, etc.). Es macht keinen großen Unterschied, ob Du der Aufforderung folgst oder nicht -- außer wenn Du den AP ausschaltest - dann übernimmst Du plötzlich ein völlig falsch getrimmtes Flugzeug - das könnte Dich gewaltig überraschen!&lt;br /&gt;
&lt;br /&gt;
*'''''UP/DN '''''(up/down = rauf/runter) damit stellst Du die &amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt; ein, mit der Du steigen bzw. sinken willst. Achte auf das Minuszeichen – das wird oft übersehen!&lt;br /&gt;
::Diese UP/DN Einstellung hat Priorität gegenüber der Höheneinstellung - und kann damit interessante Phänomene verursachen:&lt;br /&gt;
::{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!derzeitige&lt;br /&gt;
Flughöhe&lt;br /&gt;
!gewünschte&lt;br /&gt;
Flughöhe&lt;br /&gt;
!up/Dn&lt;br /&gt;
&amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt;&lt;br /&gt;
!Ergebnis&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|3000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|4000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|(+) 500&lt;br /&gt;
||wir steigen mit 500 &amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt; auf 4000 ft&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|3000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|4000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|-500&lt;br /&gt;
||wir sinken mit 500 &amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt; zu Boden bis zum &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Crash'''&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|3000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|2000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|(+) 500&lt;br /&gt;
||wir steigen mit 500 &amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt; in den Himmel bis zum &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Crash''' ''&amp;lt;/span&amp;gt;&amp;lt;small&amp;gt;(oder der ersten Mondlandung einer Cessna!)&amp;lt;/small&amp;gt;''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|3000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|2000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|-500&lt;br /&gt;
||wir sinken mit 500 &amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt; auf 2000 ft&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|3000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|3000&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|erst 500,&lt;br /&gt;
dann -500&lt;br /&gt;
||&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;'''wir &amp;quot;springen&amp;quot; über ein Hindernis und kehren dann direkt zurück auf unser Höhe'''&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
::==&amp;gt; Es könnte sich also lohnen immer erst die &amp;lt;abbr title=&amp;quot;Feet per Minute == Steig-­ oder Sinkgeschwindigkeit&amp;quot;&amp;gt;FPM&amp;lt;/abbr&amp;gt; (UP/DN) einzustellen, bevor man die Höhe ändert!&lt;br /&gt;
&lt;br /&gt;
*'''''ARM '''''(=scharf machen) aktiviert die Voreinstellung der Höhe mittels des Drehreglers rechts darunter. Mit dem Mausrad oder einfachem Mausklick rechts/links um 10er-Stellen – mit der mittleren Maustaste um Hunderter.&lt;br /&gt;
&lt;br /&gt;
*'''''BARO '''''(Barometer) aktiviert den Drehregler darunter zur Eingabe des barometrischen Druckes&lt;br /&gt;
::'''''Achtung: '''''Dieser ist unabhängig vom eingestellten Druck im Höhenmesser! Du musst diesen zusätzlich einstellen, wenn Du mit dem AP fliegst! Zumindest bei Modellen wie der C172!&lt;br /&gt;
&lt;br /&gt;
'''''Bemerkung:''''' Insbesondere wenn Du z.B. von HDG auf NAV umstellst, wird dies nicht sofort aktiviert. Es wird erst einmal die bisherige Einstellung (z.B. HDG) warnend blinken und erst später die neue Einstellung (z.B. NAV) auftauchen. Lass dem Gerät also Zeit für die Umstellung – '''''das Blinken ist KEINE Fehlermeldung''''', sondern nur ein: „ACHTUNG - es wird geändert!“&lt;br /&gt;
&lt;br /&gt;
Du findest Beispiele für die Benutzung des AP in&lt;br /&gt;
*[[De/HB_VFR_Flug|&amp;quot;{{HBabbr|VFR}} Cross-Country&amp;quot;]] wärend des &amp;quot;Cruise&amp;quot; &amp;lt;small&amp;gt;(Reiseflug)&amp;lt;/small&amp;gt; und &amp;quot;Approach&amp;quot; &amp;lt;small&amp;gt;(Anflug)&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[De/HB_IFR-Flug|&amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot;]] beim &amp;quot;Steigen nach dem Start&amp;quot; und &amp;quot;Procedure Turn&amp;quot; &amp;lt;small&amp;gt;(Umkehr-Kurve)&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Das DME'''==&lt;br /&gt;
{|&lt;br /&gt;
||[[File:C172-DMA.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Es gibt für das {{HBabbr|DME}} nur eine Anzeige für alle Radios – somit kannst Du immer nur die Werte eines der Radios beobachten. Du kannst aber jederzeit schnell hin- und her-schalten.&lt;br /&gt;
&lt;br /&gt;
*Mit dem Schalter in der Mitte schaltest Du das Gerät ein/aus ''(on/off)''.&lt;br /&gt;
&lt;br /&gt;
*Mit dem Wahlschalter links wählst Du von welchem der NAV-Radios ('''''N1''''' oder '''''N2''''') die Werte angezeigt werden sollen (beachte, dass nicht alle {{HBabbr|VOR}}s ein {{HBabbr|DME}}-Signal ausstrahlen!)&lt;br /&gt;
:In der mittleren Position &amp;quot;'''''HLD'''''&amp;quot; (hold = halten) wird die {{HBabbr|DME}}-Frequenz beibehalten die zuletzt eingestellt war! Dazu solltest Du wissen, dass die {{HBabbr|VOR}}- und die {{HBabbr|DME}}-Sendefrequenzen unterschiedlich sind. Somit behält diese Stellung die {{HBabbr|DME}}-Frequenz vom zuletzt eingestellten Sender bei - egal was Du mit den 2 NAV-Geräten einstellst! Das ist praktisch: Somit kannst Du Dir das  setzen und dann mit den beiden NAV-Geräten tun was Du willst - der eingestellte Entfernungsmesser bleibt bestehen (bis Du wieder auf N1 oder N2 schaltest!). &lt;br /&gt;
&lt;br /&gt;
*In der Anzeige oberhalb „'''''Miles'''''“ wird die Entfernung zum Sender angezeigt&lt;br /&gt;
&lt;br /&gt;
*Mit dem weißen Knopf rechts neben „Miles“ wählst Du ob Du dazu rechts die Geschwindigkeit (KTS) oder die Zeit bis zum Ziel (MIN) sehen möchtest.&lt;br /&gt;
**Mit '''''KTS''''' wird die Geschwindigkeit über Boden angezeigt (nicht wie im Geschwindigkeitsmesser die &amp;lt;abbr title=&amp;quot;Indicated AirSpeed == angezeigte Geschwindigkeit gegenüber der Luft&amp;quot;&amp;gt;IAS&amp;lt;/abbr&amp;gt;)!&lt;br /&gt;
**Die '''''Minuten''''' sind die Zeit bis zur Ankunft am {{HBabbr|DME}}-Sender, wenn die Geschwindigkeit und Richtung konstant bleiben!&lt;br /&gt;
&lt;br /&gt;
''Du findest ein Beispiel für die Anwendung im [[De/HB_IFR-Flug#4.29_Der_.E2.80.9EProcedure_Turn.E2.80.9C_.28Umkehr-Prozedur.29|&amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot;, Kapitel &amp;quot;Der Prozedure Turn'']]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Standard VOR-Prozeduren'''==&lt;br /&gt;
===Piktogramme===&lt;br /&gt;
Auf Flugkarten findest Du verschiedene {{HBabbr|VOR}}-Typen mit unterschiedlichen Piktogrammen:&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[File:ILS-VOR.png]]&lt;br /&gt;
||Das ganz normale '''''{{HBabbr|VOR}}''''' &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;ohne {{HBabbr|DME}}&amp;lt;/span&amp;gt;. &lt;br /&gt;
&amp;lt;small&amp;gt;''VHF Omnidirectional Radio Range == Drehfunkfeuer''. Mehr auf: http://de.wikipedia.org/wiki/Drehfunkfeuer&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[File:DME.png]]&lt;br /&gt;
||Ein eigenständiges '''''{{HBabbr|DME}}''''' &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;ohne {{HBabbr|VOR}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;. Mehr auf: http://de.wikipedia.org/wiki/Distance_Measuring_Equipment )&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[File:VOR-DME.png]]&lt;br /&gt;
||'''''VOR-DME''''' = ein  {{HBabbr|VOR}} gekoppelt mit einem {{HBabbr|DME}}, für beide Funktionen muss nur die {{HBabbr|VOR}}-Frequenz eingestellt werden&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[File:TACAN.png]]&lt;br /&gt;
||'''''TACAN''''' = ein militärisches {{HBabbr|VOR}}, dass nicht zivil genutzt werden kann.&lt;br /&gt;
&amp;lt;small&amp;gt;''Tactical Air Navigation System == militärische Flugnavigationsverfahren''&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[File:VORTAC.png]]&lt;br /&gt;
||'''''{{HBabbr|VORTAC}}''''' = (die &amp;quot;eierlegendeWollmilchsau&amp;quot;) beinhaltet sowohl ein {{HBabbr|VOR}}-{{HBabbr|DME}} wie auch ein {{HBabbr|TACAN}}! Wobei für {{HBabbr|VOR}} und {{HBabbr|TACAN}} unterschiedliche Frequenzen eingegeben und benutzt werden - aber beide stellen den {{HBabbr|DME}}-Teil automatisch ein.&lt;br /&gt;
&amp;lt;small&amp;gt;Mehr auf: http://en.wikipedia.org/wiki/File:VORTAC_TGO_Aichtal_Germany_01.JPG&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[File:Pictogram NDB.png|47px]]&lt;br /&gt;
||'''''{{HBabbr|NDB}}''''' = Ungerichtetes Funkfeuer: Zeigt dem Piloten mittels {{HBabbr|ADF}} an in welcher Richtung sich das {{HBabbr|NDB}} befindet. Im Gegensatz zum {{HBabbr|VOR}} kannst Du dieses aber nicht anfliegen indem Du einem Radial folgst - somit wirst du bei Seitenwind immer etwas abgetrieben - und somit einen Bogen fliegen! &amp;lt;small&amp;gt;(Siehe oben [[#Das_ADF_.2F_NDB|Das {{HBabbr|ADF}}/NDB]])&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;''Non-Directional Beacon == Ungerichtetes Funkfeuer''. Mehr auf: http://de.wikipedia.org/wiki/Tactical_Air_Navigation&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Direkt zu einem VOR ­fliegen===&lt;br /&gt;
Das heißt wir sind irgendwo in der Luft und wollen zu einem bestimmten {{HBabbr|VOR}} fliegen (den wir in der MPmap, der Map, in ATLAS, einer Luftfahrtkarte, etc. gefunden haben, oder der uns von {{HBabbr|ATC}} zugewiesen wurde):&lt;br /&gt;
*Stelle die {{HBabbr|VOR}}-Frequenz ein und wechsele diese dann von der „Standby“ in die „Aktive“ Position (in die linke Anzeige).&lt;br /&gt;
*Überprüfe ob der Morse-Code stimmt!! (Es gibt viele {{HBabbr|VOR}}'s mit der gleichen Frequenz!!!)&lt;br /&gt;
*Drehe den Knopf am {{HBabbr|OBS}}-Instrument bis sich die vertikale Nadel zentriert '''''UND das kleine Fenster „TO“''''' anzeigt!!&lt;br /&gt;
**Die Nadel zentriert sich 2 mal: Einmal als „FROM“ (dann zeigt sie vom {{HBabbr|VOR}} weg) und einmal als „TO“ (dann zeigt sie zum {{HBabbr|VOR}} hin!).&lt;br /&gt;
**Wenn das &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; eine Abweichung anzeigt und Du dieser folgst - die Abweichung aber größer anstatt kleiner wird, dann drehe um 180°! Du hast offensichtlich  &amp;quot;TO/FROM&amp;quot; verwechselt! &lt;br /&gt;
**Wenn überhaupt nichts angezeigt wird&lt;br /&gt;
***überprüfe ob die Frequenz für das {{HBabbr|VOR}} in dem benutzten NAV-Radio stimmt (und in der linken Anzeige steht!)&lt;br /&gt;
***ist das {{HBabbr|VOR}} in Reichweite? (bis etwa 100 mi, wenn keine Berge dazwischen sind&lt;br /&gt;
***ist das NAV eingeschaltet?&lt;br /&gt;
*Folge der Nadel wie oben beschrieben!&lt;br /&gt;
*Wenn die Nadel plötzlich stark ausschlägt und dann &amp;quot;TO&amp;quot; nach &amp;quot;FROM&amp;quot; wechselt - dann hast Du gerade den {{HBabbr|VOR}} überflogen&lt;br /&gt;
**im Normalfall kannst Du dann erst einmal den Kurs beibehalten&lt;br /&gt;
**oder {{HBabbr|ATC}} die Ankunft über dem {{HBabbr|VOR}} mitteilen (und evtl. in eine &amp;quot;Warteschleife&amp;quot; gehen)&lt;br /&gt;
**oder den Kurs wie geplant ändern&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Über dem VOR auf neuen Kurs drehen===&lt;br /&gt;
Wir wollen nun also nicht nur auf einem &amp;quot;TO-radial&amp;quot; zum {{HBabbr|VOR}} hinfliegen (siehe vorstehend), sondern beim Überqueren direkt auf einen neuen Kurs gehen! Dazu könntest Du natürlich warten bis Du über dem {{HBabbr|VOR}} bist und dann das {{HBabbr|OBS}} neu einstellen - aber oft hast Du über dem {{HBabbr|VOR}} noch mehr zu tun und außerdem sieht es bescheuert aus, denn Du würdest erst weit hinter dem {{HBabbr|VOR}} auf den neuen Kurs kommen. Geschickter, in Bezug auf Kosten, Zeit, und Aussehen, ist das Folgendes:&lt;br /&gt;
&lt;br /&gt;
*Lasse George &amp;lt;small&amp;gt;(den Autopiloten, '''''wir müssen also das NAV1 benutzen'''''!)&amp;lt;/small&amp;gt; die &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Nadel zentriert halten während wir auf den {{HBabbr|VOR}} zufliegen - wie im vorstehenden Kapitel beschrieben&lt;br /&gt;
*Noch auf dem Wege hin zum {{HBabbr|VOR}} stelle den &amp;quot;'''''roten Marker'''''&amp;quot; im &amp;quot;Heading Indicator&amp;quot; auf den Kurs den Du '''''vom {{HBabbr|VOR}}''''' wegfliegen willst  &amp;lt;small&amp;gt;(aber noch NICHT &amp;quot;HDG&amp;quot; drücken!)&amp;lt;/small&amp;gt;&lt;br /&gt;
*Warte bis &amp;quot;TO/FROM&amp;quot; anfängt sich zu bewegen - dann drücke &amp;quot;'''''HDG'''''&amp;quot; (am AP) und die Maschine wird direkt auf den neuen Kurs einschwenken ''(auch wenn Du noch nicht ganz über dem {{HBabbr|VOR}} bist!)''&lt;br /&gt;
*Nun hast Du Zeit ganz in Ruhe&lt;br /&gt;
**Dein {{HBabbr|OBS}} auf die neue Richtung einzustellen, achte darauf dass &amp;quot;FROM&amp;quot; im Fenster angezeigt wird&lt;br /&gt;
**oder sogar den zukünftigen {{HBabbr|VOR}} mit Frequenz und {{HBabbr|OBS}} einzustellen, achte dann darauf dass &amp;quot;TO&amp;quot; angezeigt wird!&lt;br /&gt;
*Und dann schaltest Du wieder auf &amp;quot;'''''NAV'''''&amp;quot; und George wird die &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Nadel zentrieren und zentriert halten!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Auf Kurs gehen mittels VOR:===&lt;br /&gt;
Gerade auf größeren Flughäfen, oder in deren Nähe, findest Du oft auch einen {{HBabbr|VOR}}-Sender. Du kannst dann einem der Radiale folgen um einen bestimmten Kurs zu fliegen und dabei einem genau vordefinierten Weg über der Landschaft folgen. Du wirst also definitive genau über dem Ziel ankommen, auch bei Seitenwind, Kursabweichungen, Ungenauigkeiten im Ablesen des Kompass, etc. etc..&lt;br /&gt;
&lt;br /&gt;
Siehe ein Beispiel auf der [[De/HB_Features#MPmap|MPmap]] bei Frankfurt: Wir werden in EDDF starten und auf dem Radial &amp;quot;270° FROM&amp;quot; weg-fliegen:&lt;br /&gt;
{|&lt;br /&gt;
||[[File:VOR-Departure at EDDF.png|600px|thumb|left|In EDDF starten und auf den Radial &amp;quot;FROM 270°&amp;quot; des {{HBabbr|VOR}} &amp;quot;FFM&amp;quot; einschwenken]]&lt;br /&gt;
|}&lt;br /&gt;
*Stelle schon vor dem Start den Kurs „weg vom {{HBabbr|VOR}}“ ein, also die Frequenz (114.20) im NAV-Teil des Radios und den Radial (FROM 270) im {{HBabbr|OBS}}-Instrument. ''(Nebenbei bemerkt: Fällt Dir auf, dass das {{HBabbr|VOR}}-FFM als &amp;quot;{{HBabbr|VORTAC}}&amp;quot; bezeichnet wird? Das stammt aus der Zeit als EDDF  zusätzlich eine große Militärbasis war! Deshalb auch noch immer 2 Frequenzen: eine zivile 114.20 und ein militärisches {{HBabbr|TACAN}} &amp;quot;089X&amp;quot;!)''&lt;br /&gt;
&lt;br /&gt;
*Nach dem Start (und der Freigabe durch {{HBabbr|ATC}}) gehe auf einen Kurs auf dem Du den Radial kreuzt. Am Besten kreuzt („intersect“) Du den Radial nicht im rechten Winkel, sondern möglichst auf einem Kurs 30-60° schräg zum Radial. Also in unserm Falle etwa auf Kurs:&lt;br /&gt;
**240° (=270-30) wenn wir nach dem Start nördlich des Kurses sind&lt;br /&gt;
**300° (=270+30) wenn wir nach dem Start südlich des Kurses sind&lt;br /&gt;
:Der 30° Winkel erleichtert es uns beim Einscheren nicht (zu weit) über den Radial hinaus getragen zu werden. Ab einem Winkel von 60° ist es kaum möglich halbwegs gesittet auf unseren Reisekurs einzuschwenken - wir würden erst eine ganze Weile hin- und her-zappeln, bevor wir uns auf den {{HBabbr|VOR}}-Radial eingependelt haben!&lt;br /&gt;
&lt;br /&gt;
*Vergewissere Dich, dass im Instrument „'''''FR'''''“ &amp;lt;small&amp;gt;(&amp;quot;FROM&amp;quot; = weg von)&amp;lt;/small&amp;gt; angezeigt wird! (Du willst ja nicht aus Versehen in Moskau anstatt in Paris aufzuwachen!&lt;br /&gt;
&lt;br /&gt;
*Beobachte Dein Instrument: Sobald die vertikale Nadel anfängt sich zum Zentrum hin zu bewegen, drehst Du auf den Radial-Kurs ein und hältst diesen indem Du die Anzeige der Nadel zentriert hältst: Weicht sie nach rechts ab – ändere Deinen Kurs nach rechts – und umgekehrt. Versuche die Kurskorrekturen klein zu halten (ca. 10°) - und beobachte die Nadel ob sie langsam zurück-wandert – wenn nicht: Vergrößere die Korrektur. Aber sei geduldig: Je weiter weg Du vom {{HBabbr|VOR}} bist um so größer wird die Strecke (siehe die rot/weiße &amp;quot;1&amp;quot;) die Du zurücklegen musst, bis sich die Korrektur auf dem Instrument bemerkbar macht – das heißt: Bis sich der Winkel zwischen Abweichung und Radial messbar verringert hat.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Positionsbestimmungen mittels VOR/DME}===&lt;br /&gt;
*Tune eines Deiner NAVs auf die Frequenz eines {{HBabbr|VOR}} in Deiner Nähe (je nach Höhe bis zu 100 mi Umkreis!) und stelle den {{HBabbr|DME}}&amp;gt;-Selektor (siehe weiter unten) entsprechend auf NAV1 oder NAV2.&lt;br /&gt;
*Du solltest nun bereits die Entfernung zu dem {{HBabbr|VOR}} sehen (wenn nicht - bist Du vielleicht zu weit weg, oder ein Berg liegt dazwischen, oder der {{HBabbr|VOR}} hat kein {{HBabbr|DME}})&lt;br /&gt;
*Drehe nun die kleine Stellschraube links unterhalb des {{HBabbr|OBS}} bis die senkrechte Nadel des Instruments genau senkrecht steht – lese den Radial ab (ganz oben auf der Kompass-Rose des {{HBabbr|VOR}}) - notiere ob es &amp;quot;TO&amp;quot; oder &amp;quot;FROM&amp;quot; ist - das benötigst Du später um die Richtung in der Karte einzutragen!&lt;br /&gt;
*Wenn Du eine genaue Positionsbestimmung benötigst, solltest Du die Werte auf einer &amp;quot;Luftfahrtkarte&amp;quot; eintragen (wegen der unterschiedlichen magnetischen/kartographischen Richtungsanzeigen)&lt;br /&gt;
**wenn es nicht soooo genau sein muss, kannst Du auch eine Straßenkarte nehmen (und evtl. die Differenz hinzurechnen, vergleiche [[De/HB_VFR_Flug#Kurs|&amp;quot;Der Kurs&amp;quot;]] in unserem Cross-Country Flug).&lt;br /&gt;
*Trage/zeichne diesen Radial in die Karte ein: Also eine Gerade durch den Mittelpunkt des {{HBabbr|VOR}} mit der gefunden Richtung.&lt;br /&gt;
*Und messe auf dieser Geraden den Abstand vom Mittelpunkt des Radials. Siehe dazu die Maßstabsangabe der Karte.&lt;br /&gt;
Du solltest danach noch einmal Dein Tun verifizieren, indem Du während des Fluges das {{HBabbr|DME}} beobachtest: Die angezeigt Entfernung sollte größer bzw. kleiner werden, je nachdem ob Du auf das {{HBabbr|VOR}} zufliegst oder Dich davon entfernst!&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
===Positionsbestimmung mit 2 VOR ({{HBabbr|NDB}}):===&lt;br /&gt;
Wenn uns kein {{HBabbr|VOR}} mit {{HBabbr|DME}} zur Verfügung steht, können wir zwei {{HBabbr|VOR}}s in Reichweite anpeilen, indem wir deren Frequenzen in die NAV-Geräte eingeben und dann die Kompass-Rosen so lange verdrehen, bis beide Nadeln senkrecht stehen. Auf den Navigationskarten sind die {{HBabbr|VOR}}s mit ihren (magnetischen) Kompass-Rosen dargestellt – wir müssen dann also nur mit dem Lineal vom Mittelpunkt des jeweiligen {{HBabbr|VOR}} ausgehend über die Radial-Einteilung jeweils eine Linie ziehen und erhalten so als Kreuzungspunkt den derzeitigen Standort. (Ja, ich gebe zu: In einem Jet mit Überschall-Geschwindigkeit könnte das etwas ungenau werden! - Aber wir sind ja in einer C172p! Da macht es doch Spaß zu lernen - und außerdem musst Du das zur Erlangung einer Pilotenlizenz vorführen können!).&lt;br /&gt;
&lt;br /&gt;
*'''''Tip: '''''Ich selbst benutze diese &amp;quot;uralt&amp;quot;-Methode&amp;quot; selten wie gerade beschrieben! Aber ich benutze dies gerne umgekehrt: Wenn ich im Gebirge niedrig durch die Täler fliegen möchte, trage ich mir vorher gerne ein paar wichtige Wegpunkte in die (Straßen-) Karte ein, um beobachten zu können, ob ich wirklich in dem Tal bin in dem ich sein möchte! In den meisten Tälern möchte man dann nämlich lieber nicht sein: Das Steigvermögen einer Cessna (und auch anderer Spaß-Modelle) ist nämlich sehr limitiert - und das Ende eines Tales ist meist zu eng um umzukehren! (Ja sicher: &amp;lt;abbr title=&amp;quot;Global Positioning System == Satellitennavigations-System&amp;quot;&amp;gt;GPS&amp;lt;/abbr&amp;gt; (und dazu möglichst auch noch Autopilot) ist einfacher -- aber macht es auch so viel Spass?). Am besten ist es dann einen {{HBabbr|VOR}} mit einem Radial zu finden der längs des kritischen Tales verläuft, und einen anderen möglichst rechtwinkelig dazu. Mit den beiden Radials definierst Du  &amp;quot;Entscheidungspunkte&amp;quot; (Abbiegen, Drehen nach, Umkehren/Steigen, etc.) - und dann beobachtest Du die Nadeln um zu sehen&lt;br /&gt;
:ob Du bereits angekommen bist,&lt;br /&gt;
:oder evtl. schon zu weit bist,&lt;br /&gt;
:ob du noch richtig bist,&lt;br /&gt;
:''etc.''&lt;br /&gt;
&lt;br /&gt;
*'''''Beachte: '''''Die Positionsbestimmung wird hierbei um so genauer, um so mehr die beiden gemessenen Radials ±90° von einander abweichen. Also z.B: Auf den einen {{HBabbr|VOR}} zu/weg-fliegen - und den anderen möglichst 90° auf einer Seite haben!&lt;br /&gt;
&lt;br /&gt;
Natürlich könntest Du dies auch mittels &amp;quot;1 {{HBabbr|VOR}} &amp;amp; 1 {{HBabbr|NDB}}&amp;quot; oder sogar &amp;quot;2 {{HBabbr|NDB}}s&amp;quot; machen -- allerdings wird das deutlich ungenauer als mit 2 {{HBabbr|VOR}}'s - und die Reichweite der {{HBabbr|NDB}}s ist sehr limitiert.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
===Anfliegen eines Navigationspunktes===&lt;br /&gt;
In diesem Beispiel suchen wir den Wegpunkt „'''''MISON'''''“, der genau auf dem Kreuzungspunkt zweier Radiale liegt. ''(Vergleiche [[#Der_NAV-Teil_.3D_VOR_.26_ILS|die Sectional weiter oben]] und/oder [[De/HB_IFR-Flug#2.29_Entlang_der_V334_zum_FIXpunkt_SUNOL.2C_via_MISON|die Anwendung im Kapitel {{HBabbr|IFR}} CrossCountry)]]''.&lt;br /&gt;
        &lt;br /&gt;
*Setze also Dein NAV1 und NAV2 wie in der Grafik [[#Die_.22einfache.22_Radio_Einstellungen:|„Radio Frequencies“]] gezeigt (NAV1=114,1/002 und NAV2=116,8/114).&lt;br /&gt;
&lt;br /&gt;
*Wir scheren also als erstes auf den Kurs „NAV1: 002° FROM“ ein und stellen sicher dass die &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Nadel zentriert ist und bleibt (d.h. diesen Teil könnte man auch dem Autopiloten anvertrauen!)&lt;br /&gt;
    &lt;br /&gt;
*Dann warten wir ab, bis sich die &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Nadel des NAV-2 bewegt&lt;br /&gt;
**Evtl. solltest Du jetzt sicherstellen ob Du noch vor dem Kreuzungspunkt bist - oder schon dahinter!&lt;br /&gt;
***Allerdings ist (mir) die Interpretation dessen, was die NAV2-Nadel uns sagen will manchmal schwierig! Ich helfe mir dabei, in dem ich mir vorstelle&lt;br /&gt;
****ich schaue vom {{HBabbr|VOR}}-2 aus entlang des Radials (114°) und weiß, dass mein Flug den Radial von rechts nach links kreuzen soll&lt;br /&gt;
****und ich weiß, das die Nadel die Richtung der Abweichung angibt:&lt;br /&gt;
*****die NAV2-Nadel nach '''''links''''' bedeutet: Wir müssten nach links korrigieren - wir sind also '''''tatsächlich noch rechts''''' vom Radial: '''''Also noch vor dem Kreuzungspunkt!'''''&lt;br /&gt;
*****die NAV2-Nadel nach '''''rechts''''' bedeutet: Wir müssten nach rechts korrigieren - sind also '''''tatsächlich schon links''''' vom Radial: '''''Also schon hinter dem Kreuzungspunkt!'''''&lt;br /&gt;
***Also ich hab immer wieder Schwierigkeiten mit der Vorstellung - aber Übung hilft!&lt;br /&gt;
**Wenn beide Nadeln genau senkrecht stehen, befinden wir uns genau über dem in der Navigationskarte eingezeichnetem Punkt „MISON“. Aber bevor Du Dir vergeblich die Augen ausschaust: Dies ist keine landschaftliche Sehenswürdigkeit – es ist ein rein elektronischer (&amp;lt;abbr title=&amp;quot;Global Positioning System == Satellitennavigations-System&amp;quot;&amp;gt;GPS&amp;lt;/abbr&amp;gt;) Navigationspunkt -- ein sogenannter &amp;quot;FIX&amp;quot;-Punkt, definiert durch 2 Radiosignale - sonst nix!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
==''' Das ILS (Instrument LandeSystem)'''==&lt;br /&gt;
{{HBabbr|ILS}}-Sender stehen direkt an Landebahnen und leiten anfliegende Flugzeuge zum Aufsetzpunkt der Landebahn. Sie funktionieren genau wie die {{HBabbr|VOR}}'s, indem sie uns zu einem bestimmten Ort auf einem bestimmten Radial führen. Im Unterschied zum {{HBabbr|VOR}}&lt;br /&gt;
&lt;br /&gt;
*ist der Radial aber nicht frei wählbar! Er wird vom Sender fest vorgegeben und ist immer die genaue Richtung der Landebahn – wunderbar: Um die Einstellung des Radial brauchst Du Dich also nicht zu kümmern!&lt;br /&gt;
**'''''Aber Vorsicht: '''''Bei den Anzeige-Instrumenten der &amp;quot;modernen&amp;quot; c172p macht dies keinen Unterschied. Doch es gibt viele Modelle bei denen das &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; nicht automatisch synchronisiert wird! Wenn Du bei denen den Radial nicht einstellst, dann sind die &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;-Anzeigen wertlos! Also besser doch das Radial einstellen!&lt;br /&gt;
**Und wenn Du Dir irgendwann einen '''''[[#HSI:_Das_Horizontal_Situation_Instrument|HSI]]''''' leisten kannst, musst Du unbedingt die Richtung der Landebahn möglichst genau eingeben, damit die Kursabweichung korrekt angezeigt wird.&lt;br /&gt;
:'''''==&amp;gt; Also ist es besser, die genau Richtung der Landebahn immer einzugeben - anstatt es dann zu vergessen wenn man es braucht!!'''''&lt;br /&gt;
&lt;br /&gt;
*oft sendet das {{HBabbr|ILS}} zusätzlich zu dem üblichen (horizontalen) Signal auch noch ein &amp;quot;vertikales&amp;quot;, den sogenannten &amp;quot;GS&amp;quot; (GlideSlope, Gleitflug, Höhe) aus. Das funktioniert sinngemäß wie beim &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt;:&lt;br /&gt;
**wenn die Nadel nach '''''oben zeigt: Erhöhe die RPM''''' um die Sinkgeschwindigkeit zu reduzieren&lt;br /&gt;
**wenn die Nadel nach '''''unten zeigt: Reduziere die RPM''''' um das Sinken zu beschleunigen&lt;br /&gt;
&lt;br /&gt;
:Berücksichtige, dass die GS-Anzeige erst sehr viel später aktiv wird als die Richtungsanzeige! Verlasse Dich auf die Höhenangaben erst ab ungefähr 10 Meilen vor der Landebahn-Schwelle! ''(Das &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; kann schon 100 mi vorher aktiv sein!)''&lt;br /&gt;
&lt;br /&gt;
*die Genauigkeit bzw. Sensibilität des Localizer's ist etwa 4 mal höher als die eines {{HBabbr|VOR}}! d.h. '''''Du solltest Deine Korrekturen dementsprechend &amp;quot;feiner&amp;quot; dosieren als bei einem üblichen {{HBabbr|VOR}}!'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Hast Du bemerkt: '''''Wir haben hier mit keinem Wort das {{HBabbr|DME}} erwähnt -- weil es beim {{HBabbr|ILS}} technisch gesehen kein {{HBabbr|DME}} gibt! Wenn Du die Entfernung zum Flugplatz wissen willst, musst Du einen {{HBabbr|VOR}}-{{HBabbr|DME}} (zusätzlich im NAV2) benutzen (oder &amp;lt;abbr title=&amp;quot;Global Positioning System == Satellitennavigations-System&amp;quot;&amp;gt;GPS&amp;lt;/abbr&amp;gt;). Bei den meisten Groß-Flughäfen ist ein {{HBabbr|VOR}} in der Nähe oder sogar im Zentrum &amp;lt;small&amp;gt;(siehe nachfolgend KSFO)&amp;lt;/small&amp;gt; - oder es gibt einen {{HBabbr|VOR}} und ein eigenständiges {{HBabbr|DME}} dazu&amp;lt;small&amp;gt;(siehe nachfolgend EDDF)&amp;lt;/small&amp;gt;! Beispiele für diese Möglichkeiten sind:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||[[File:ILS-KSFO.png|300px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
In KSFO siehst Du den idealen Aufbau: Genau in der Mitte aller Landebahnen steht ein {{HBabbr|VOR}}-{{HBabbr|DME}}. Somit kannst Du den {{HBabbr|VOR}} schon von weit ausserhalb dazu benutzen um Dich auszurichten, und kannst gleichzeitig bis zur Landung (ziemlich) genau verfolgen wie weit Du noch außerhalb bist!&lt;br /&gt;
&lt;br /&gt;
Somit kannst Du:&lt;br /&gt;
&lt;br /&gt;
*NAV1 für das {{HBabbr|ILS}} benutzen &amp;lt;small&amp;gt;(Öffne mit Klick auf das &amp;quot;+&amp;quot; rechts vom RW-Namen &amp;quot;28R&amp;quot; den Localizer&amp;lt;/small&amp;gt; '''→ 111.70'''&amp;lt;small&amp;gt;, ILS-catIII)&amp;lt;/small&amp;gt;&lt;br /&gt;
*NAV2 für das {{HBabbr|VOR}} benutzen, inklusive des {{HBabbr|DME}} &amp;lt;small&amp;gt;(siehe im Zentrum der Landebahnen, &amp;lt;/small&amp;gt;'''→ 115.80''')&lt;br /&gt;
|-&lt;br /&gt;
||[[File:ILS-EDDF.png|300px|thumb|left]]&lt;br /&gt;
In EDDF kannst Du ähnliches erreichen, indem Du den {{HBabbr|VORTAC}} (inclusive {{HBabbr|DME}}) benutzt - aber die Entfernungsangaben (bei Nebel!) sind dann doch sehr ungenau! Du solltest also ein bisschen mehr arbeiten und den {{HBabbr|DME}} auf dem Flugplatz mit einbeziehen. Seit neuestem hat dieser sogar eine eigene zivile Frequenz: '''''&amp;lt;span style=&amp;quot;color:rgb(204, 51,204)&amp;quot;&amp;gt;115.9 MHz&amp;lt;/span&amp;gt;''''' (siehe  http://www.ourairports.com/navaids/FRD/Frankfurt_DME_DE/).&lt;br /&gt;
&lt;br /&gt;
Somit musst Du hier (der Genauigkeit wegen) 3 Frequenzen einstellen:&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Setze den {{HBabbr|VORTAC}} 114.2 in das NAV2&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Setze das {{HBabbr|DME}} 115.9 in das NAV1&lt;br /&gt;
&amp;lt;br /&amp;gt;dann schalte den {{HBabbr|DME}}-Selector zuerst auf &amp;quot;1&amp;quot;, das setzt die {{HBabbr|DME}}-Anzeige auf das {{HBabbr|DME}}&lt;br /&gt;
&amp;lt;br /&amp;gt;und dann auf &amp;quot;HOLD&amp;quot;, dann wird diese {{HBabbr|DME}}-Einstellung gehalten (bis Du von &amp;quot;HOLD&amp;quot; wegschaltest!)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Setze die {{HBabbr|ILS}}-Frequenz in das NAV1&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
Damit hast Du also 3 Frequenzen:&lt;br /&gt;
#114.2: Der {{HBabbr|VORTAC}} auf NAV2 für die weitreichende Navigation (die dabei vorhandene {{HBabbr|DME}}-Anzeige benutzen wir nicht!)&lt;br /&gt;
#109.5: Der {{HBabbr|ILS}} Localizer und Glideslope auf NAV1&lt;br /&gt;
#115.9: Das eigenständige {{HBabbr|DME}} auf &amp;quot;HOLD&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''''Somit erfolgt ein {{HBabbr|ILS}}-Anflug wie folgt:'''''&lt;br /&gt;
&lt;br /&gt;
#Stelle die {{HBabbr|ILS}}-Frequenz in eins der NAV-Geräte - '''''wenn Du damit auch den Autopilot steuern willst, muss es das NAV1 Gerät sein!'''''&lt;br /&gt;
#Wie vorher gesagt ist es besser, auch den Localizer/Radial ({{HBabbr|OBS}}) auf die Landebahn-Richtung einzustellen&lt;br /&gt;
#Ab einer Entfernung von 16 bis 50 Meilen zur Landebahn sollte das NAV-Gerät aktiv anzeigen (falls kein Berg oder ähnliches dazwischen liegt). Das heißt das &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; zeigt an, die &amp;quot;TO&amp;quot; Flag wird sichtbar, etc. Aber beachte:&lt;br /&gt;
#*Wenn Du aus der entgegengesetzten Richtung anfliegst, zeigt das &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; genau verkehrt herum an (z.B. auf dem Downwind)&lt;br /&gt;
#*Das Gleiche passiert wenn Du einen GoAroud (Abbrechen und neue Anfliegen) machst und somit entgegen der Richtung des Localizer's fliegst&lt;br /&gt;
#*Falls das NAV + &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; + TO/FROM bei 16 mi außerhalb noch Nichts anzeigen, wird es Zeit die eingestellte Frequenz zu überprüfen, oder nach-zuschauen ob Berge auf Deinem Anflug sind, oder .. oder ..&lt;br /&gt;
#In einer Entfernungen zwischen etwa 5 bis 20 Meilen vor der Landebahn schwenkst Du entsprechend des &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; (wie {{HBabbr|VOR}}-üblich) auf den waagerechten Leitstrahl (dem sogenannten '''''Localizer''''') ein und folgst ihm hin zur Landebahn&lt;br /&gt;
#*Falls Deine Flugplatz-Informationen nichts anderes definieren, solltest Du an dieser Stelle etwas höher sein als die Platzrunde (ca 800 bis 1000 ft oberhalb des Flugplatz Niveaus).&lt;br /&gt;
#Folge dem &amp;lt;abbr title=&amp;quot;Course Deviation Indicator == VOR-Kurs Anzeige&amp;quot;&amp;gt;CDI&amp;lt;/abbr&amp;gt; während Du die Höhe beibehältst, bis:&lt;br /&gt;
#*etwa 10 Meilen vor dem Aufsetzpunkt die waagerechte Nadel (der sogenannte Glideslope = '''''GS''''') aktiv wird&lt;br /&gt;
#*An dieser Stelle solltest Du UNTERHALB des GS sein!! d.h. die Nadel zeigt nach oben! Ansonsten wärst Du zu hoch angeflogen!&lt;br /&gt;
#**Die meisten Anfänger werden dann gleich nervös und versuche wie gewohnt der Nadel zu folge (oder noch schlimmer: Sofort den GS am AutoPiloten einzuschalten!) -- das wäre hier absolut falsch, fliege waagerecht weiter bis die Nadel sich senkt und genau horizontal anzeigt - im Vergleich zu dem üblichen {{HBabbr|VOR}} heißt das: Du bist auf den Glideslope eingeschwenkt (hast ihn &amp;quot;intercepted&amp;quot;).&lt;br /&gt;
#*Wenn Du schon anfangs deutlich oberhalb des GS anfliegst, solltest Du sofort einen Neuen Anflug starten (Go Arround). Wenn Du versuchst mit extremen Mitteln auf den GS zu kommen, wirst Du alle Deine wunderbar ein-geübten Prozeduren verfehlen - und Du wirst Dich nach der Landung voraussichtlich schämen müssen!  Das ist es nicht wert!&lt;br /&gt;
#Bleibe also auf Deiner Anflughöhe (unterhalb des Leitstrahls), bis der waagerechte Zeiger von oben her die Mitte erreicht, '''''erst dann''''' folgst Du auch dem horizontalen Zeiger.&lt;br /&gt;
#Entlang des Leitstrahls gibt es 3 Signal-Sender die im Cockpit audio/visuelle Signale auslösen:&lt;br /&gt;
##'''''Outer Marker: Blaues''''' Licht + '''''400 Hz''''' Ton, Position 4-7nm vor der Landebahnschwelle&lt;br /&gt;
##'''''Middle Marker: Amber''''' Licht + '''''1300 Hz''''' Ton, Position 0.5-0.8 nm vor der Landebahnschwelle&lt;br /&gt;
##'''''Inner Marker: Weißes''''' Licht + '''''3000 Hz''''' Ton: direkt über der Landebahnschwelle&lt;br /&gt;
&lt;br /&gt;
Als einer, der auch viel {{HBabbr|ATC}}-Services macht höre ich immer wieder &amp;quot;das {{HBabbr|ILS}} arbeitet nicht!&amp;quot; oder ähnliches. Glaube mir: Niemand glaubt Dir das! Weder der {{HBabbr|ATC}}, noch Dein Fluglehrer, noch die &amp;lt;abbr title=&amp;quot;Federal Aviation Agency == (US-) Luftfahrt-Bundesamt&amp;quot;&amp;gt;FAA&amp;lt;/abbr&amp;gt;, noch...! Technische Probleme mit dem {{HBabbr|ILS}} sind äußerst selten - Pilotenfehler allerdings recht häufig! Außerdem bist Du verpflichtet sofort manuell zu übernehmen wenn die Automatik versagt! Ich hoffe Du hast gelernt auch ohne Autopilot zu landen!&lt;br /&gt;
&lt;br /&gt;
'''''Eine Warnung: '''''Die meisten  Modell schaffen mit dem Autopiloten keine Landung bis zum Aufsetzen - wenn also Dein Modell es nicht schafft, schalte in Zukunft den Autopiloten so früh ab, das Du noch Zeit zum manuellen eingewöhnen hast - ich würde vorschlagen etwa 100ft über dem Boden!&lt;br /&gt;
&lt;br /&gt;
Tatsächlich macht es viel Spaß zur Übung den {{HBabbr|ILS}}-Nadeln zu folgen - auch ohne den Autopiloten zu aktivieren!&lt;br /&gt;
&lt;br /&gt;
''(Für weitere {{HBabbr|ILS}}-Details siehe http://de.wikipedia.org/wiki/Instrumentenlandesystem )''&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''&amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;: Die &amp;quot;{{HBabbr|IFR}}-Anflug-Prozedur&amp;quot;'''==&lt;br /&gt;
Wie Du in den vorangegangenen {{HBabbr|VFR}}-Flügen bereits gemerkt hast, richtest Du Dein Flugzeug nicht irgendwie auf die nächste Landbahn aus und landest da. Schon unter {{HBabbr|VFR}} musst Du erstmal in die Platzrunde! Dies hilft Dir selbst um Dich ordentlich auszurichten - und hilft Allen nicht ständig zusammen-zustoßen - denn die meisten Leute mögen das gar nicht!&lt;br /&gt;
&lt;br /&gt;
Bei echten {{HBabbr|IFR}}-Flügen ''(bei schlechter Sicht!)'' besteht diese Notwendigkeit sogar noch mehr. Und da die Flughäfen und Landbahnen weltweit sehr unterschiedlich sind, gibt es für jede Landbahn (die für {{HBabbr|IFR}} zugelassen ist) eine besondere Prozedur.&lt;br /&gt;
&lt;br /&gt;
Du findest diese Anflug-Beschreibungen bei den Flughafen-Beschreibungen, also z.B.:&lt;br /&gt;
&lt;br /&gt;
*'''''für die USA z.B.:'''''&lt;br /&gt;
:*http://de.flightaware.com/resources/airport/KLVK (tippe irgendeinen &amp;lt;abbr title=&amp;quot;International Civil Aviation Organisation == Flughafen ID's&amp;quot;&amp;gt;ICAO&amp;lt;/abbr&amp;gt;-Code am Ende), dort findest Du&lt;br /&gt;
:::→ „IFR-Diagramme“ = {{HBabbr|IFR}} Airport Prozeduren (/&amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;)&lt;br /&gt;
:::→ „ILS Runway 25R“ (die einzige in KLVK verfügbare) –''''' diese werden ich für unseren Flug benutzen!'''''&lt;br /&gt;
&lt;br /&gt;
:*oder in http://www.airnav.com/airport/KLVK&lt;br /&gt;
:::die Anflug-Karten sind ziemlich weit unten auf der Seite!&lt;br /&gt;
&lt;br /&gt;
*'''''für Deutschland z.B.:'''''&lt;br /&gt;
:*http://www.vacc-sag.org/?PAGE=airport_overview&lt;br /&gt;
:::'''''→ siehe z.B. für EDDF die „IAC VOR RWY 25R“''''' etc. ect. - EDDF hat ein paar mehr Prozeduren zu bieten als KLVK&lt;br /&gt;
:::'''''→ aber siehe z.B. auch das kleine Sylt (EDXW):''''' Auch dieses hat solche „Approach Charts“, z.B. die „NDB/DME 14“ - schau Dir evtl. erst einmal diese an, um die wesentlichen Punkte zu erkennen – bevor Du dann in die sehr komplexen Charts der großen Flughäfen einsteigst!&lt;br /&gt;
&lt;br /&gt;
*'''''ansonsten weltweit z.B.:'''''&lt;br /&gt;
:*http://www.vatsim.net/charts/&lt;br /&gt;
&lt;br /&gt;
Siehe z.B.: '''''KLVK ILS RWY 25R'''''&lt;br /&gt;
Während unsres (nachfolgenden) &amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot; planen wir in Livermore auf der Landbahn 25R unter {{HBabbr|IFR}}-Bedingungen zu landen. Das nehmen wir hier als Beispiel:&lt;br /&gt;
&lt;br /&gt;
Livermore hat nur 2 &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;s - während große Airports davon sehr viele haben können. Siehe z.B. das naheliegende KSFO, oder das europäische EHAM, die haben davon jede Menge! Dort gibt es extra Prozeduren für {{HBabbr|ILS}}, &amp;lt;abbr title=&amp;quot;Global Positioning System == Satellitennavigations-System&amp;quot;&amp;gt;GPS&amp;lt;/abbr&amp;gt;, LDA, {{HBabbr|VOR}}, etc.... Es würde mich nicht überraschen wenn es irgendwo auch noch ein Prozedur für das Landen mit Sextanten und Sanduhr gäbe. Und um {{HBabbr|IFR}} zu lernen, musst Du alle diese Typen beherrschen! (Nun ja, die Eieruhr mit dem Sextanten kannst Du heutzutage vergessen - aber es gibt noch Kapitäne, die das während Trans-Atlantic-Flügen (in DC8, Super-Conny, u.ä.) benötigt haben!)&lt;br /&gt;
&lt;br /&gt;
Für Livermore gibt es (Gott sei Dank) nur 2 &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;s. Siehe z.B. http://skyvector.com/airport/LVK/Livermore-Municipal-Airport dort findest Du ganz unten auf der Seite zwei &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;s:&lt;br /&gt;
#eine für {{HBabbr|ILS}}:  &amp;quot;ILS RWY 25R&amp;quot;&lt;br /&gt;
#und eine für &amp;lt;abbr title=&amp;quot;Global Positioning System == Satellitennavigations-System&amp;quot;&amp;gt;GPS&amp;lt;/abbr&amp;gt;: &amp;quot;RNAV (GPS) RWY 25R&amp;quot;&lt;br /&gt;
Da wir in unserm &amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot; unsere {{HBabbr|ILS}}-Ausrüstung testen wollen (und auch nix anderes haben!) entscheiden wir uns also für die &amp;quot;ILS RWY 25R&amp;quot;:&lt;br /&gt;
{|&lt;br /&gt;
||[[File:IFR IAP-KLVK-25R.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Diese Anflug-Karten sind weltweit nicht überall genau gleich – aber sie beinhalten immer mindestens drei Teile (die aber nicht so schön farbig markiert sind wie hier!):&lt;br /&gt;
#Im '''''weißen''''' oberen Teil stehen grundsätzliche Informationen wie Name, Frequenzen, etc.&lt;br /&gt;
#Im '''''rosa''''' Teil ist der Anflug-Plan von oben gesehen, für die Richtungs-Angaben&lt;br /&gt;
#Im '''''gelben''''' Teil ist der Anflug-Plan von der Seite gesehen, für die Höhen-Angaben&lt;br /&gt;
&lt;br /&gt;
2+3 zusammen ergeben also eine 3D (räumliche) Darstellung des Anfluges. Falls Du kein Architekt oder Maschinenbauer bist, ist das anfangs etwas verwirrend – ich werde versuchen es im Nachfolgenden zu erläutern!&lt;br /&gt;
&lt;br /&gt;
Weitere Angaben sind oft an sehr unterschiedlichen Stellen eingetragen, aber immer vorhanden. Dies sind z.B. Angaben über:&lt;br /&gt;
&lt;br /&gt;
*'''''Minimum-Werte '''''die für einen Anflug vorgeschrieben sind, z.B. minimale Sichtweiten, erforderliche Radioausstattungen, etc. (hier in der grünen Box)&lt;br /&gt;
&lt;br /&gt;
*'''''Missed Approach Prozeduren '''''für ein Durchstarten (GoArround) mit Richtungen und Höhen etc. (hier in der weißen Box oben rechts)&lt;br /&gt;
&lt;br /&gt;
*'''''Minimale Anflughöhen '''''per Richtung, dargestellt in einem Kreis, aufgeteilt in Anflug-Sektoren (hier in der rosa Box rechts unten)&lt;br /&gt;
&lt;br /&gt;
*den '''''Flugplatz-Lageplan '''''(hier in der weißen Box links unten)&lt;br /&gt;
&lt;br /&gt;
*''etc.''&lt;br /&gt;
&lt;br /&gt;
'''''Das Auslesen der &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;:'''''&lt;br /&gt;
Wir müssen als erstes den Anfang der Prozedur finden, den sogenannten &amp;lt;abbr title=&amp;quot;Initial Approach Fix == Der Anfangspunkt einer IAP (Initial Approach Procedure)&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Siehe oben im rosa Bereich → für KLVK gibt es zwei IAF's:&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
In der Mitte ist der '''''LOM/IAF REIGA''''' (ein {{HBabbr|NDB}} auf der Frequenz 374), dieser hat 2 Funktionen:&lt;br /&gt;
*Als &amp;lt;abbr title=&amp;quot;Locator Outer Marker == Anfangspunkt für Endanflug&amp;quot;&amp;gt;LOM&amp;lt;/abbr&amp;gt; definiert er einen standardisierten Anflug-Punkt vor der Landebahn-Schwelle (6.1 nm vor der Landbahn-Schwelle, auf einer Höhe von 1039 ft). Hast Du diese Werte gefunden? &amp;quot;'''''6.1 NM'''''&amp;quot; findest Du im gelben Bereich am unteren Rand, die &amp;quot;'''''1039'''''&amp;quot; stehen direkt am {{HBabbr|NDB}}-Symbol mittig im rosa Bereich!&lt;br /&gt;
*Als &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt; ist er der Start der &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;. Mittels des dort vorhanden {{HBabbr|NDB}} ist er einfach zu finden: Einfach die Frequenz 374 im {{HBabbr|ADF}} einstellen und der Nadel folgen! Die Höhe zu finden ist ein bisschen umständlicher: Es ist 2409(im gelben) + (über :) 1039(im rosa) = 3448!&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Ziemlich mittig am rechten Rand ist ein zweiter '''''&amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt;''''' mit Namen '''''TRACY'''''. Diesem ist zusätzlich eine Warteschleife zugeordnet. Damit könnte es (in der Wirklichkeit) sein, dass uns {{HBabbr|ATC}} als erstes dahin verweist, wenn es gerade viele Anflüge gibt! Aber es könnte auch sein, dass wir den Punkt für einen &amp;quot;'''''Missed Approch'''''&amp;quot; ''(Fehlanflug)'' benötigen (siehe im weißen Feld ganz oben rechts.)! Aber das kennen wir ja aus dem Kapitel &amp;quot;Anflug mittels zweier {{HBabbr|VOR}}s&amp;quot; im  Teil &amp;quot;Radio NAV&amp;quot;. Wir finden diesen FIX also als Schnittpunkt der Radials:&lt;br /&gt;
:157° FROM {{HBabbr|VOR}} &amp;quot;SAC&amp;quot; (SACRAMENTO) on 115.20&lt;br /&gt;
:229° FROM {{HBabbr|VOR}} &amp;quot;ECA&amp;quot; (MANTECA) on 116.0&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Vom &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt; aus (s.o.) tasten wir uns also vorwärts:&lt;br /&gt;
&lt;br /&gt;
*Da wir sowieso von Süden kommen werden, werden wir also mit dem „&amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt; REIGA“ anfangen.&lt;br /&gt;
&lt;br /&gt;
*Von dort aus erscheint Alles recht einfach: Nach links abbiegen und schon sind wir auf dem Leitstrahl ({{HBabbr|ILS}}-LOCALIZER, siehe im &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt; links: Freq. 110.5) --- aber das ist für Profis wie uns viel zu einfach: '''''Wir fliegen erst einmal vom Flugplatz weg!'''''&lt;br /&gt;
::Siehst Du rechts vom REIGA die dicke, abknickende Linie mit einer halben Pfeilspitze und der Beschriftung „030°“ und „210°“? Das bedeutet einen „'''''Procedur Turn'''''“ - also zur Anflug-Prozedur gehört auch eine Prozedur der Kehrtwende. Aber die Leute machen es uns einfach: Sie sagen uns direkt im Bild wie das geht:&lt;br /&gt;
::*erst einmal nach rechts auf Gegenkurs (255-360=) 75° (siehe auch ganz rechts am Ende des großen Pfeils!)&lt;br /&gt;
::*nach '''''2 Minuten''''' drehen wir nach links auf Kurs '''''030°''''', dabei sinken wir langsam auf '''''3300 ft''''' (siehe im gelben: Am Ende der Prozedur sollten wir auf 3300 ft sein!)&lt;br /&gt;
::*nach weiteren '''''2 Minuten''''' machen wir einen „U-Turn“, drehen also um 180° nach ... wohin? Richtig: Nach rechts, denn der neue Kurs '''''210°''''' steht auf der Karte rechts vom 030°!&lt;br /&gt;
&lt;br /&gt;
*Damit sind wir nun auf eine normale {{HBabbr|ILS}}-Landung vorbereitet:&lt;br /&gt;
**wir bleiben auf dem Kurs '''''210°''''' bis wir auf den '''''LOCALIZER''''' (Freq. 110.5) einschwenken (Richtung hier 255°)&lt;br /&gt;
**während wir dann auf den Flugplatz zufliegen sinken wir auf '''''2800 ft''''' &lt;br /&gt;
**und bleiben auf dieser Höhe bis wir wir in den vertikalen Glide-Slope einschwenken, d.h. diesem nach unten folgen!.&lt;br /&gt;
&lt;br /&gt;
*Und so kommen wir zurück zu nserem alten Freund &amp;quot;'''''NDB REIGA'''''&amp;quot;, diesmal auf einer Höhe von 1039 ft.&lt;br /&gt;
**wobei RIEGA nun kein &amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt; mehr ist, sondern jetzt der &amp;quot;'''''Outer Marker'''''&amp;quot; ist – dort werden wir also mit einem 400 Hz Ton und einem blinkenden blauen Licht begrüßt → damit wissen wir dann, dass wir (einigermaßen gut) auf dem {{HBabbr|ILS}} Leitstrahl sind und es noch 6.1 nm bis zur Landebahnschwelle sind!&lt;br /&gt;
**übrigens ist für den &amp;quot;Outer Marker&amp;quot; immer auch die Höhe angegeben: Dies ist für &amp;quot;sorgfältige&amp;quot; Piloten noch einmal eine Check ob sie auf richtiger Höhe sind, ob der &amp;quot;Glideslope&amp;quot; funktioniert, etc. etc.&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;'''''Missed Approach'''''&amp;quot;: Es wird nun höchste Zeit noch einmal zu überdenken, was passiert wenn wir den Anflug abbrechen müssen! Natürlich gibt es auch dafür eine Prozedur: Siehe in der weißen Box oben rechts mit dem Titel &amp;quot;MISSED APPROACH&amp;quot; und die Angaben im grünen Bereich unten:&lt;br /&gt;
:*Letztere besagen, dass wir für die &amp;quot;S-ILS 25R&amp;quot; die Landung abbrechen '''''müssen''''', wenn wir auf einer Höhe von '''''597 ft''''' (also 200 ft über Boden) die Landbahn noch nicht in Sicht haben!&lt;br /&gt;
&lt;br /&gt;
Lass uns alle weit verstreuten Angaben zu dieser Prozedur noch einmal anschauen:&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;10&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||[[File:IFR_IAP-GoAround.png|left]]&lt;br /&gt;
» wie schon gesagt gibt es die wörtliche Kurzfassung in dem weißen Block oben rechts&lt;br /&gt;
&amp;lt;br /&amp;gt;» im rosa Teil siehst Du am Ende der Landebahn eine gestrichelte Linie die die Abfluglinie vorgibt&lt;br /&gt;
&amp;lt;br /&amp;gt;» hin zu einer Warteschleife am rechten Bildschirmrand&lt;br /&gt;
&amp;lt;br /&amp;gt;» und im gelben Bereich siehst Du das Ganze noch einmal in 5 Symbolen. Von links nach rechts&lt;br /&gt;
&lt;br /&gt;
#Steige geradeaus (=Landebahnrichtung!) auf 1100 ft&lt;br /&gt;
#Auf 1100 ft steige weiter auf 3000 während Du nach rechts drehst&lt;br /&gt;
#Fliege zum {{HBabbr|NDB}} &amp;quot;LV&amp;quot; (&amp;quot;LV&amp;quot; ist die Kennung für REIGA)&lt;br /&gt;
#Nach &amp;quot;LV&amp;quot; gehe auf Kurs 062°&lt;br /&gt;
#Und gehe über dem FIX &amp;quot;TRACY&amp;quot; in die Warteschleife&lt;br /&gt;
&lt;br /&gt;
und dort beruhigen wir uns erst einmal wieder innerlich und warten darauf, dass uns der {{HBabbr|ATC}} zum erneuten Landversuch auffordert. Du siehst wir sind ziemlich da wo wir auch vorher den {{HBabbr|ILS}}-Anflug gestartet haben - also kein Problem für uns das dann noch einmal zu versuchen!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Siehe hierzu auch das Kapitel [[De/HB_Wissen#Procedure-Turns_.3D_Warteschleifen|&amp;quot;Warteschleife&amp;quot; im Teil &amp;quot;Wissen&amp;quot;]].&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Die Map'''==&lt;br /&gt;
Mit der FlightGear-Version 2.4. wurde das im Versuchs-Stadium befindliche &amp;quot;Map&amp;quot; formell integriert (siehe &amp;quot;''Menü-Leiste --&amp;gt; Equipment --&amp;gt; Map''&amp;quot;).&lt;br /&gt;
Diese &amp;quot;Map&amp;quot; hilft insbesondere bei Flügen mittels Radio-Navigation. Siehe dazu weitere Informationen unter:&lt;br /&gt;
:» für eine Beschreibung des Projektes selbst siehe im FlightGear-WIKI http://wiki.flightgear.org/Map&lt;br /&gt;
:» die folgenden Beispiele basieren auf dem &amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot;-Flug, den wir im nächsten Kapitel durchführen werden.&lt;br /&gt;
{|&lt;br /&gt;
||[[File:HB-IFR-Map1.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Du &amp;lt;small&amp;gt;(das gelbe Flugzeugsymbol unten rechts)&amp;lt;/small&amp;gt; bist gerade in '''''KRHV''''' gestartet und fliegst nun Richtung 310° zur &amp;quot;Luftstrasse 334&amp;quot;. Diese Luftstraße folgt hier dem Radial &amp;quot;'''''SJC 009'''''&amp;quot;, den wir im NAV-1 eingestellt haben und auf den wir einscheren werden.&lt;br /&gt;
&lt;br /&gt;
Der nächste Wegpunkt ist die Kreuzung des Radials &amp;quot;'''''SJC 009'''''&amp;quot; mit &amp;quot;'''''OAK 114'''''&amp;quot; (dieser wurde im NAV-2 eingestellt) - diese Kreuzung definiert den &amp;quot;'''''FIX SUNOL'''''&amp;quot;. Der Name &amp;quot;SUNOL&amp;quot; erscheint nicht auf der MAP, da &amp;quot;FIXes&amp;quot; (oben links) nicht aktiviert ist.&lt;br /&gt;
&lt;br /&gt;
Aber da &amp;quot;Navaids&amp;quot; aktiviert ist, siehst DU:&lt;br /&gt;
:» die {{HBabbr|VOR}}s &amp;quot;'''''SJC'''''&amp;quot; und &amp;quot;'''''OAK'''''&amp;quot; in türkis, denn beide sind in unseren NAV1/2 eingestellt&lt;br /&gt;
:» dagegen ist der {{HBabbr|VOR}} &amp;quot;'''''OSI'''''&amp;quot; (im unteren linken Quadranten) nicht türkis und ohne Radial, da wir ihn z.Z. nicht benutzen!&lt;br /&gt;
&lt;br /&gt;
&amp;quot;'''''LV'''''&amp;quot; (ganz oben/rechts) ist der Code-Name (und Morse-Code) für den '''''{{HBabbr|NDB}}&amp;quot;REIGA&amp;quot;''''', welcher unser '''''&amp;lt;abbr title=&amp;quot;Initial Approach Fix == Der Anfangspunkt einer IAP (Initial Approach Procedure)&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt;''''' für unseren geplanten Anflug auf '''''KLVK''''' ist!&lt;br /&gt;
&lt;br /&gt;
Da &amp;quot;Traffic&amp;quot; aktiviert ist, sehen wir auch die &amp;lt;abbr title=&amp;quot;Veranstaltungen mit mehreren Teilnehmern&amp;quot;&amp;gt;Multiplayer&amp;lt;/abbr&amp;gt; die sich in unserer Gegend bewegen, z.B. &amp;quot;alex&amp;quot; etwas links von uns und &amp;quot;Godwin&amp;quot; auf dem {{HBabbr|ILS}} nach KSFO. Beachte auch die Richtungsanzeige:&lt;br /&gt;
:» &amp;quot;'''''alex'''''&amp;quot; fliegt in Richtung SW relativ schnell&lt;br /&gt;
:» verglichen mit &amp;quot;'''''Godwin'''''&amp;quot;, der im Anflug auf KSFO dem {{HBabbr|ILS}} langsamer folgt&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
||[[File:HB-IFR-Map2.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
Im vorstehenden Bild haben wir bereits unseren NAV-2 vom Radial &amp;quot;'''''OAK 114&amp;quot; auf &amp;quot;ECA 229&amp;quot; geändert''''', und sind jetzt auf dem Wege vom FIX &amp;quot;'''''SUNOL&amp;quot; zum {{HBabbr|NDB}} &amp;quot;REIGA&amp;quot;.'''''&lt;br /&gt;
Wie hier schön zu sehen ist, wird der FIX &amp;quot;'''''SUNOL'''''&amp;quot; durch die beiden Radials &amp;quot;'''''SJC 009'''''&amp;quot; und &amp;quot;'''''OAK 114'''''&amp;quot; definiert - und der Name ist nun sichtbar, da &amp;quot;Fixes&amp;quot; aktiviert ist.&lt;br /&gt;
&lt;br /&gt;
Außerdem haben wir jetzt &amp;quot;Data&amp;quot; aktiviert und sehen somit auch einige Informationen zu den Navigations-Punkten. z.B.:&lt;br /&gt;
:» '''''KLVK''''' mit seinen Landebahnen &amp;quot;07L/25R&amp;quot; und der Länge 5236 ft, in den Kompass-Richtungen 91°/271°&lt;br /&gt;
:» '''''REIGA''''' mit der Kennung/Morse-Code &amp;quot;'''''LV'''''&amp;quot; und der Frequenz 374 Khz&lt;br /&gt;
&lt;br /&gt;
Beachte auch den Fix &amp;quot;'''''FOOTO'''''&amp;quot;. Nach dem Abbiegen auf 075° über REIGA werden wir an diesem FIX unsere Umkehr mit einer Drehung nach links auf 030° beginnen!&lt;br /&gt;
&lt;br /&gt;
Beachte zusätzlich, dass dieser Abschnitt dann genau entgegengesetzt dem anfliegenden Verkehr auf dem {{HBabbr|ILS}} nach KLVK ist! Wir sollten also aufpassen und unser Höhe halten!&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Im vorstehenden Bild waren wir auf dem Weg von SUNOL nach REIGA. Inzwischen&lt;br /&gt;
{|&lt;br /&gt;
||[[File:HB-IFR-Map3.png|left]]&lt;br /&gt;
|}&lt;br /&gt;
:» sind wir über '''''REIGA auf Kurs 075° nach FOOTO''''' geflogen&lt;br /&gt;
::    » wobei FOOTO durch das Kreuzen des Radial &amp;quot;ECA 229&amp;quot; mit unserm &amp;quot;{{HBabbr|NDB}}-Kurs 075°&amp;quot; definiert ist&lt;br /&gt;
:» über FOOTO haben wir nach links auf Richtung 030° gedreht&lt;br /&gt;
:» und haben dann nach 2 Minuten um 180° nach rechts auf 210° gedreht&lt;br /&gt;
&lt;br /&gt;
Auf diesem Kurs 210° werden wir nun bald auf den Localizer des &amp;quot;'''''KLVK ILS 25R'''''&amp;quot; einschwenken. Hast Du bemerkt dass das {{HBabbr|ILS}} seine Farbe von dukelblau in türkis geändert hat? Und der Radial '''''&amp;quot;SJC 009&amp;quot; ist verschwunden'''''! --&amp;gt; Wir benötigen den Radial &amp;quot;SJC 009&amp;quot; nicht mehr und benutzen unser NAV-1 nun für das {{HBabbr|ILS}} - welches deshalb nun in türkis angezeigt wird!&lt;br /&gt;
&lt;br /&gt;
Du solltest auch &amp;quot;'''''TRACY'''''&amp;quot; wiedererkennen (gerade links von uns) - der andere &amp;quot;&amp;lt;abbr title=&amp;quot;Initial Approach Fix == Der Anfangspunkt einer IAP (Initial Approach Procedure)&amp;quot;&amp;gt;IAF&amp;lt;/abbr&amp;gt;&amp;quot;, und zugleich auch der FIX-Punkt für eine evtl. benötigte Warteschleife, z.B. nach einem &amp;quot;MISSED APPROACH&amp;quot;. Damit wissen wir, dass wir hart am Rande des uns erlaubten 10 Meilen Radius der Kontroll-Zone sind (siehe die [[#IAP:_Die_.22IFR-Anflug-Prozedur.22|&amp;lt;abbr title=&amp;quot;Initial Approach Procedure == Verfahren für den IFR Endanflug&amp;quot;&amp;gt;IAP&amp;lt;/abbr&amp;gt;]])! Also solltest Du aufpassen nicht viel weiter hinaus-zufliegen!&lt;br /&gt;
&lt;br /&gt;
Falls Du diesen Flug vorher noch nicht gemacht hast, ist diese Beschreibung vielleicht schwer zu verstehen. Siehe dann den folgenden [[De/HB_IFR-Flug|&amp;quot;{{HBabbr|IFR}} Cross-Country&amp;quot;]], und dazu insbesondere die Planung der dazugehörenden &amp;quot;[[De/HB_IFR-Flug#Die_IFR-Anflug-Prozedur_.3D_IAP|IFR-Anflug-Prozedur]]&amp;quot;&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93661</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93661"/>
		<updated>2016-02-25T14:32:52Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* FDMs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specify the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example you can switch between some turbulence models when you choose JSBSim as you flight dynamic model. Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
 -&amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  -&amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  -&amp;lt;input&amp;gt;&lt;br /&gt;
    -&amp;lt;expression&amp;gt;&lt;br /&gt;
      -&amp;lt;pow&amp;gt;  &lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying a different magnitude than 2 in the [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
 -&amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further transfer with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [http://wiki.flightgear.org/JSBSim_Atmosphere JSBSim Atmosphere]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in [http://wiki.flightgear.org/$FG_SRC /$FG_SRC]/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in [http://wiki.flightgear.org/$FG_SRC /$FG_SRC]/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in [http://wiki.flightgear.org/$FG_SRC /$FG_SRC]/FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt() that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file [http://wiki.flightgear.org/$FG_SRC /$FG_SRC]/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93660</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93660"/>
		<updated>2016-02-25T14:24:07Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specify the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example you can switch between some turbulence models when you choose JSBSim as you flight dynamic model. Therefore, this article will mainly discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
 -&amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  -&amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  -&amp;lt;input&amp;gt;&lt;br /&gt;
    -&amp;lt;expression&amp;gt;&lt;br /&gt;
      -&amp;lt;pow&amp;gt;  &lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying an other magnitude than 2 in the [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
 -&amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further tranfser with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [http://wiki.flightgear.org/JSBSim_Atmosphere JSBSim Atmosphere]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in /src/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in /src/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in /FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file /src/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Fixing_presets&amp;diff=93629</id>
		<title>Fixing presets</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Fixing_presets&amp;diff=93629"/>
		<updated>2016-02-25T09:43:04Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Portability Navbar}}&lt;br /&gt;
&lt;br /&gt;
== The Problem ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |One important use of FlightGear is as a pilot training aid, and one huge thing that instructors like to do is setup in-air starts so you can practice a lot of approaches in a short amount of time (that's one of the key benefits of a simulator over a real airplane.)&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/26527536/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;[Flightgear-devel] Fwd: in air starts and all preset control/trim&lt;br /&gt;
	settings broke&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Curtis Olson&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2010-11-01&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The addition of Presets has caused a plethora of problems and many regressions, including breaking support for [[Reset &amp;amp; re-init]], but also for saving/loading flights.&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
The original reset was a simple kludge that worked fine for a simple program; now that FlightGear is a lot more sophisticated, we need to refactor a bit&lt;br /&gt;
rather than just holding things together with scotch tape and bubble gum.&lt;br /&gt;
&lt;br /&gt;
The problem is that right now we have two different approaches - a lot of stuff is handled cleanly in individual modules' update() methods, but a lot of stuff is still handled by hundreds of lines of BASIC-like, hard-to-read spaghetti code in main.cxx and fg_init.cxx (forget OO, it's not even functional programming).&lt;br /&gt;
&lt;br /&gt;
That was the right idea to get started - I'm not a fan of wasting time on an initial OO design that you won't end up using -- but now we need to finish cleaning it up. We need to make this a high priority.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg06781.html|title= Crash on &amp;quot;Reset&amp;quot; function.|author=David Megginson |date=Thu, 06 Jun 2002 05:03:39 -0700}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
The position init code is a little complex, to allow for starting on a carrier and some other cases, and ideally we would do it from script, but unfortunately there's some technical limitations on doing that. (Not insurmountable, but not quick either). Adding more cases to the position-init code is certainly doable - one suggestion I made some time ago, is when MP is active, to default to starting at a free parking position instead of on a runway. (When no startup position is provided at all). This would avoid people accidentally starting on the runway in MP events, which would be a big usability win.&lt;br /&gt;
&lt;br /&gt;
When no parking positions are defined, AI traffic defaults to the 'airport centre' location. Selection a taxiway parallel to the active runway is possible, but for complex airport layouts I can imagine many ways this logic could fail. Personally I think it would be more robust to stick to picking parking positions, and otherwise using the airport centre, because it would encourage people to add the parking position data :)&lt;br /&gt;
&lt;br /&gt;
I anyone wants to work on this, it would be a self-contained function in position-init code, just ask here for any questions. All the pieces certainly exist - the taxiways, parking locations and runways for the airport are all accessible.&amp;lt;ref&amp;gt;{{cite web |url=http://sourceforge.net/p/flightgear/mailman/attachment/F69E014E-F15A-4EAB-B512-36B87CA3B2C5%40mac.com/1/|title= Aircraft positioning on the runway|author=James Turner |date=2013-11-12 10:32:27}}&amp;lt;/ref&amp;gt;|James Turner}}&lt;br /&gt;
&lt;br /&gt;
== Status (03/2015) ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |reset and reposition now use the same codepath (something I've been working towards for many months). They do a full control reset, but after that, a full initial state restore. (it would be possible to support a 'nearby' re-position that doesn't touch the tile-manager, AI manager, or so on, and just re-inits the FDM - but that's something for the future, if people want it)&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/26536759/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Fwd: in air starts and all preset&lt;br /&gt;
 control/trim settings broke&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2010-11-03&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |we already saved all the initial state at the end of the main init - but Nasal scripts run before that state is saved - so running presets-commit then confuses things mightily. What I do now, is special case position changes (presets-commit) that happen during startup, and skip the reset path entirely, since it's unnecessary. This gives us:&lt;br /&gt;
* Nasal can merrily re-init during startup if it chooses&lt;br /&gt;
* control values specified on the command line, -set files or config survive the init process&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/26536759/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Fwd: in air starts and all preset&lt;br /&gt;
 control/trim settings broke&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2010-11-03&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Reposition and reset from the GUI both work, and will give you the state as specified in the -set &amp;amp; config files, and command line. Since reposition from the GUI *is a* reset (now), some properties may change that previously did not, but I can't imagine a situation where the old behaviour was better - since we already wiped the FDM and control state regardless.&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/26536759/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Fwd: in air starts and all preset&lt;br /&gt;
 control/trim settings broke&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2010-11-03&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}{{FGCquote&lt;br /&gt;
  |Reposition and reset from the GUI both work, and will give you the state as specified in the -set &amp;amp; config files, and command line. Since reposition from the GUI *is a* reset (now), some properties may change that previously did not, but I can't imagine a situation where the old behaviour was better - since we already wiped the FDM and control state regardless.&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/26536759/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Fwd: in air starts and all preset&lt;br /&gt;
 control/trim settings broke&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2010-11-03&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
== Background ==&lt;br /&gt;
At one point we decided that it would be useful to reset the aircraft position to someplace else while running FlightGear. JSBSim was modified so if it sensed that any of the position properties where changed it would retrim to those values. This was a start, but the problem was that we were using the same set of properties to report fdm position/orientation as we were using to request a change. This turned out to be a little hard to work with, especially if you wanted to change several parameters ... you got reset 1 time for each parameter you changed.&lt;br /&gt;
&lt;br /&gt;
So somewhere along the line we came up with a /presets property tree. The idea is that you can fill the tree with all the preset pameters you want to set. Then call for either an on-ground reset or an in-air reset.&lt;br /&gt;
&lt;br /&gt;
I think the approach itself is very sound, however, it's the implimentation spread across a couple different FDM's and a lot of various code changes that has become a bit complicated.&lt;br /&gt;
&lt;br /&gt;
There's a /sim/presets area in the property manager which is where all the FDM initial conditions can be batched up.  Things like:&lt;br /&gt;
&lt;br /&gt;
*  airport-id      (i.e. KSFO)&lt;br /&gt;
*  runway          (i.e. 1R)&lt;br /&gt;
*  offset-distance (i.e. 7 miles out)&lt;br /&gt;
*  altitude        (i.e. 2000')&lt;br /&gt;
*  glideslope      (i.e. on a 3 degree glide slope)&lt;br /&gt;
*  airspeed        (i.e. 90 kts)&lt;br /&gt;
&lt;br /&gt;
We setup a facility to define initial conditions in the /sim/presets property tree. This way we can setup our position *request* without needed to change the actual current position. This currently isn't setup to accept an initial pitch, but as far as I know the individual FDM's aren't either.&lt;br /&gt;
&lt;br /&gt;
You can set altitude, heading, speed (see --vc=kts option) as well as various offsets to runways and navaids.&lt;br /&gt;
&lt;br /&gt;
You can set any or all of these and when you are satisfied, choose the Presets-&amp;gt;Commit menu option (or its corresponding fgcommand).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that there is a lot of complexity in this task and a lot of interdependencies with other pieces of the program. We might be able to hide or move or rearrange the complexity, but it's always going to be a little tricky.&lt;br /&gt;
&lt;br /&gt;
The way this was intended to work is that if you want to start on the ground, you should set the altitude to -9999.&lt;br /&gt;
Exposing the raw /sim/presets properties to the end user leaves a lot of room for them to make mistakes.&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{cquote|&lt;br /&gt;
Here's my current hypothesis: when FlightGear is reset, some modules are replaced with new ones (the old ones may or may not be deleted, but are never unbound).  We end up with all kinds of dangling references, especially (but not exclusively) for bound properties, and eventually things grind to a halt.&lt;br /&gt;
&lt;br /&gt;
If I'm right, the property module makes the crash happen sooner, but the crash *will* happen one way or another, and there are probably some nasty memory leaks in there as well.  Remember that reset has always caused occasional unexplained, hard-to-reproduce crashes.&lt;br /&gt;
&lt;br /&gt;
The long-term fix is to finish the cleanup of main.cxx and fg_init.cxx so that all initialization code is moved out to the subsystems, and&lt;br /&gt;
the subsystems themselves are kept in a single, ordered list so that they can be managed easily and transparently.  It should not be&lt;br /&gt;
necessary to delete and replace any subsystems on a reset, with the exception of the FDM, since all can adjust their state as required.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg06742.html |title= Crash on &amp;quot;Reset&amp;quot; function.|author=David Megginson |date=Wed, 05 Jun 2002 08:00:36 -0700}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
I believe the problems started when developers that didn't 'use the reset function often' started making changes to the 'basic' program flow.&lt;br /&gt;
&lt;br /&gt;
ie this roughly corresponds to the introduction of the BFI&lt;br /&gt;
&lt;br /&gt;
Hopefully once we get 'reset' working again developers will test 'reset' before submitting their changes in the future so we don't repeat this&lt;br /&gt;
quagmire&lt;br /&gt;
&lt;br /&gt;
IMHO it became a kludge because and ONLY because it was 'ignored' by some in their development efforts and I kept trying to retrofit it back&lt;br /&gt;
in on top of a program that was being changed rapidly by some who apparently didn't care about the requirements of the 'reset' functionality.&lt;br /&gt;
&lt;br /&gt;
IMHO being able to pause, restart with initial conditions, restart with arbritray conditions is a good &amp;lt; should I say basic &amp;gt; test of a well designed&lt;br /&gt;
simulation. ie one that is controlable As such IMHO and I realize that this may not be your opinion, getting 'restart' working again AND KEEPING it working is a necessary thing todo.&lt;br /&gt;
&lt;br /&gt;
It shouldn't be that difficult in that it only requires that you return the individual parts of the simulation to their initial conditions.  It is a GOOD exercise in that it illustrates the interdependencies of the program by rewarding you with a 'hard crash' if you do not understand them.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg06769.html |title= Crash on reset|author=Norman Vine|date=Wed, 05 Jun 2002 15:48:34 -0700}}&amp;lt;/ref&amp;gt;|Norman Vine}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
There's also more to the problem.  If we're restoring a saved flight then everything's fine, since all of the FDM state is already valid. If, on the other hand, we're starting in the air, then we need a general trimming routine like the one Tony wrote for JSBSim and LaRCsim to avoid violent oscillations at startup.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg09856.html |title= Presets menu|author=David Megginson |date=Mon, 18 Nov 2002 14:44:41 -0800}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
I've actually added a general reinit facility for FlightGear subsystems, but most subsystems haven't been modified to support it yet.  In time, we should be able to reinitialize anything - 3D models, keyboard bindings, radio frequencies, or even scenery - without stopping the program. &amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg11597.html |title= GUI|author=David Megginson |date=Fri, 24 Jan 2003 04:41:29 -0800}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
Unfortunately, while the presets hierarchy brought some benefits, it&lt;br /&gt;
also broke saving and restoring flights.  I think that it's time to&lt;br /&gt;
consider doing away with the presets hierarchy, and trying something&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
1. Make an in-memory copy of the property tree that we can revert to when the user wants to reset; we could even keep a stack of reset points, if that was useful to anyone.&lt;br /&gt;
&lt;br /&gt;
2. Add a few /sim/startup properties to indicate what information should be used for position, orientation, etc.  For example,&lt;br /&gt;
*   /sim/startup/init/position-type : (latlon,airport,navaid,runway)&lt;br /&gt;
*   /sim/startup/init/altitude-type : (msl,agl,glidepath)&lt;br /&gt;
*   /sim/startup/init/orientation-type : (rph,runway)&lt;br /&gt;
*   /sim/startup/init/time-type : (utc,local,sunpos)&lt;br /&gt;
 &lt;br /&gt;
I'm sure that people can think of a better classification.  From this point on, then, our initialization code can simply look at these to decide whether to initialize based on the airport, etc.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg17214.html |title= Beyond presets|author=David Megginson |date=Fri, 19 Sep 2003 13:07:52 -0700}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
Write the initial conditions directly into the main property tree. We would need to hold onto a few properties to say which setting to use (say, for location), but this system in general should work much better, since cannot predict what properties any given vehicle might need to preserve on a reset. Essentially, a reset is nothing more than an in-memory save/restore.&amp;lt;ref&amp;gt;&lt;br /&gt;
{{cite web |&lt;br /&gt;
url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg18879.html |&lt;br /&gt;
title= Re: Helicopters: wow!|&lt;br /&gt;
author=David Megginson |&lt;br /&gt;
date=Mon, 24 Nov 2003 08:50:37 -0800}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
I think that we can do that more cleanly by allowing operation on a second property tree. Here's what I'm suggesting:&lt;br /&gt;
&lt;br /&gt;
1. Set up the initial property tree (from preferences, the command line, etc.) before running any cycles.&lt;br /&gt;
2. Make a deep copy of that tree that can be restored.&lt;br /&gt;
With a reset: you should end up with exactly what you started with.&lt;br /&gt;
We can provide fgcommands for partial copies from the backup tree -- in that case, it is simply a matter of a few bytes of XML glue (menu, keyboard, etc.) for each kind of reset.&amp;lt;ref&amp;gt;&lt;br /&gt;
{{cite web |&lt;br /&gt;
url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg18887.html |&lt;br /&gt;
title= Re: Helicopters: wow!|&lt;br /&gt;
author=David Megginson |&lt;br /&gt;
date=Mon, 24 Nov 2003 08:50:37 -0800}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|&lt;br /&gt;
Yes, reset and save/restore are a bit broken in FlightGear right now. I'll try to fix them when I have a chance, but it will require a bit of refactoring (removing Curt's initial-state stuff, for example).&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg18869.html |title= Re: Helicopters: wow!|author=David Megginson |date=Mon, 24 Nov 2003 07:22:13 -0800}}&amp;lt;/ref&amp;gt;|David Megginson}}&lt;br /&gt;
&lt;br /&gt;
{{cquote|I suspect the sensible thing to do would be to define&lt;br /&gt;
* a reset function, and&lt;br /&gt;
* a locate (or relocate) function, separate from reset.&lt;br /&gt;
&lt;br /&gt;
That way the reset function could make a structured reference to&lt;br /&gt;
the locate function if it wants to ... while other folks could&lt;br /&gt;
call the locate function without getting mixed up with all the&lt;br /&gt;
other reset-related functionality.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg08143.html |title=location-in-air|author=John Denker |date=Sun, 07 Jan 2007 09:20:14 -0800}}&amp;lt;/ref&amp;gt;|John Denker}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{cquote|Physics says it ought to work:  I start out (on the ground or&lt;br /&gt;
in the air) with a reasonable power setting and reasonable&lt;br /&gt;
trim settings, I can give myself a new altitude, a new XY&lt;br /&gt;
position, a new heading, and/or a new airspeed ... and it&lt;br /&gt;
just works.  Try it sometime.&lt;br /&gt;
&lt;br /&gt;
The garbage-in-garbage-out principle applies:  If you relocate&lt;br /&gt;
yourself into the air before starting the engines, you'll have&lt;br /&gt;
a few moments of excitement dealing with the consequences.&lt;br /&gt;
Similarly, if you dictate a new airspeed that is inconsistent&lt;br /&gt;
with your elevator trim setting, you'll get some additional&lt;br /&gt;
excitement.&lt;br /&gt;
&lt;br /&gt;
It should be particularly obvious that air-to-air relocation&lt;br /&gt;
should just work.  Air &amp;quot;here&amp;quot; looks a lot like air &amp;quot;there&amp;quot;.&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg08168.html |title=location-in-air|author=John Denker |date=Sun, 07 Jan 2007 10:54:48 -0800}}&amp;lt;/ref&amp;gt;|John Denker}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:RFC]]&lt;br /&gt;
[[Category:Core development projects]]&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93542</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93542"/>
		<updated>2016-02-24T13:38:38Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* FDMs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specify the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example you can switch between some turbulence models when you choose JSBSim as you flight dynamic model. Therefore, this article will discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.  &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Now, assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
 -&amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  -&amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  -&amp;lt;input&amp;gt;&lt;br /&gt;
    -&amp;lt;expression&amp;gt;&lt;br /&gt;
      -&amp;lt;pow&amp;gt;  &lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying an other magnitude than 2 in the [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
 -&amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further tranfser with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [http://wiki.flightgear.org/JSBSim_Atmosphere JSBSim Atmosphere]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to the example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&lt;br /&gt;
Thus, the specified value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in /src/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in /src/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in /FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file /src/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93541</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93541"/>
		<updated>2016-02-24T13:35:11Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: /* JSBSim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specify the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example you can switch between some turbulence models when you choose JSBSim as you flight dynamic model. Therefore, this article will discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.  &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Let's assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
 -&amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  -&amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  -&amp;lt;input&amp;gt;&lt;br /&gt;
    -&amp;lt;expression&amp;gt;&lt;br /&gt;
      -&amp;lt;pow&amp;gt;  &lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying an other magnitude than 2 in the [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
 -&amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further tranfser with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [http://wiki.flightgear.org/JSBSim_Atmosphere JSBSim Atmosphere]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to our example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&lt;br /&gt;
Thus, our value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in /src/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in /src/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in /FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file /src/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93529</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93529"/>
		<updated>2016-02-24T11:48:47Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: Processing the option --turbulence=n.n to the JSBSim ttMilspec model and further general informations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In FlightGear it is possible to set the option &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; which specify the turbulence from 0.0 (calm) to 1.0 (severe). The difficulty is to translate this value to all the different variants that allow a calculation for the turbulent wind fluctuations. For example you can switch between some turbulence models when you choose JSBSim as you flight dynamic model. Therefore, this article will discuss how the turbulence is influenced by the value of &amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; with respect to the different computational methods that are possible for determining the turbulence.  &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
All flight dynamic models who are able to calculate turbulent fluctuations of the windfield (it seems that only YASim and JSBSim can do this) need to know the value one can set in the console via &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt;. Therefore one single magnitude between zero and one have to translate into several quantities which are considered in the different turbulence calculations. Let's assume you have specify &amp;lt;code&amp;gt;--turbulence=0.5&amp;lt;/code&amp;gt; and do not change this during running flightgear. Then generally, the property &amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot; is the first one who obtains this value. Afterwards, another property called &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; get this value too and the most important property &amp;quot;/environment/turbulence/magnitude-norm&amp;quot; is calculated through (see [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/interpolator.xml):&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
 -&amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;EnvironmentInterpolator:turbulence-magnitude&amp;lt;/name&amp;gt;&lt;br /&gt;
  -&amp;lt;enable&amp;gt;&lt;br /&gt;
     &amp;lt;property&amp;gt;/environment/config/enabled&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/enable&amp;gt;&lt;br /&gt;
  -&amp;lt;input&amp;gt;&lt;br /&gt;
    -&amp;lt;expression&amp;gt;&lt;br /&gt;
      -&amp;lt;pow&amp;gt;  &lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/raw-magnitude-norm&amp;lt;/property&amp;gt;&lt;br /&gt;
         &amp;lt;property&amp;gt;/environment/turbulence/sensitivity&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;/pow&amp;gt;&lt;br /&gt;
     &amp;lt;/expression&amp;gt;&lt;br /&gt;
   &amp;lt;/input&amp;gt;&lt;br /&gt;
   &amp;lt;output&amp;gt;/environment/turbulence/magnitude-norm&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;gain&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;gain&amp;gt;1&amp;lt;/gain&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words this means &amp;quot;/environment/turbulence/raw-magnitude-norm&amp;quot; to the power of &amp;quot;/environment/turbulence/sensitivity&amp;quot;, hence 0.5 &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. It is possible to change this procedure by specifying an other magnitude than 2 in the [http://wiki.flightgear.org/$FG_ROOT /$FG_ROOT]/Environment/environment.xml file at the following place:&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
 -&amp;lt;turbulence&amp;gt;&lt;br /&gt;
     &amp;lt;!-- the turbulence/magnitude-norm interpolator applies this value as an exponent to the magnitude --&amp;gt;&lt;br /&gt;
   &amp;lt;sensitivity type=&amp;quot;double&amp;quot;&amp;gt;2&amp;lt;/sensitivity&amp;gt;&lt;br /&gt;
 &amp;lt;/turbulence&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code itself, the value of 0.5 is saved in a variable called magnitude_norm (see /src/Environment/presets.cxx). The following lines should explain the further tranfser with respect to the used FDM. &lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation (see [http://wiki.flightgear.org/JSBSim_Atmosphere/ JSBSim Atmosphere]). This results in the question how the value of &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; you have set is processed in this model. The first and crucial steps happen in /src/FDM/JSBSim/JSBSim.cxx. A variable called turbulence_gain is initialized via &amp;lt;code&amp;gt;turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&amp;lt;/code&amp;gt;. Thus, according to our example, turbulence_gain has a value of 0.25. The next step depands on what turbulence type do you use. We will discuss it here for the default variant, the ttMilspec turbulence model. In this case (also when you choice ttTustin) the connection between the value you have told flightgear (0.5, respectively 0.25) and JSBSim is realized through:&lt;br /&gt;
&lt;br /&gt;
 double tmp = turbulence_gain-&amp;gt;getDoubleValue();&lt;br /&gt;
 Winds-&amp;gt;SetProbabilityOfExceedence(&lt;br /&gt;
              SGMiscd::roundToInt(TurbulenceSeverityTable.GetValue( tmp ) )&lt;br /&gt;
            );&lt;br /&gt;
&lt;br /&gt;
Thus, our value of 0.25 (now corresponds tmp) determines how the value of the variable probability_of_exceedence_index is set. The function ProbabilityOfExceedence() itself is defined in /src/FDM/JSBSim/models/FGWinds.h. The procedure for getting the probability_of_exceedence_index is realized as follows: The object TurbulenceSeverityTable which belongs to the class FGTurbulenceSeverityTable (also described in /src/FDM/JSBSim/JSBSim.cxx) calls the function GetValue which is defined in /FDM/JSBSim/math/FGTable.cpp. This combination ensures that the returned value is calculated on the basis of the FGTurbulenceSeverityTable&lt;br /&gt;
&lt;br /&gt;
 class FGTurbulenceSeverityTable : public FGTable {&lt;br /&gt;
 public:&lt;br /&gt;
   FGTurbulenceSeverityTable() : FGTable(4) {&lt;br /&gt;
    *this &amp;lt;&amp;lt; (0.0/9.0) &amp;lt;&amp;lt; 0.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (1.0/9.0) &amp;lt;&amp;lt; 3.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (4.0/9.0) &amp;lt;&amp;lt; 4.0;&lt;br /&gt;
    *this &amp;lt;&amp;lt; (9.0/9.0) &amp;lt;&amp;lt; 7.0;&lt;br /&gt;
  }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Usally, tmp is different from 0, 1.0/9.0, 4.0/9.0 or 1. Therefore the function GetValue(double key) do a linear interpolation in each interval. For our case this means that we get a probability_of_exceedence_index of 3 because 0.25 is between 1.0/9.0 and 4.0/9.0 and a linear interpolation results in a value of roughly 3.42 (don't forget to notice the function roundToInt that rounds the double value to an integer). Once we have the probability_of_exceedence_index it is used in the file /src/FDM/JSBSim/models/FGWinds.cpp to get a value from the POE_table. As you can see in the turbulence computation in FGwinds.cpp this is only important for heights greater than 2000ft. Thereby, the option &amp;lt;code&amp;gt;--turbulence=value&amp;lt;/code&amp;gt; does not influence the turbulence near the ground, at least for the JSBSim ttMilspec variant.   &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93486</id>
		<title>Turbulence</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Turbulence&amp;diff=93486"/>
		<updated>2016-02-24T09:10:42Z</updated>

		<summary type="html">&lt;p&gt;Lisbellaw: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
Explain how turbulence works in FlightGear and its FDMs.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&amp;lt;code&amp;gt;--turbulence=0.0 to 1.0&amp;lt;/code&amp;gt; Specify turbulence from 0.0 (calm) to 1.0 (severe)&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/presets.cxx you find the nodes&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm-override&amp;quot;) and&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;/environment/config/presets/turbulence-magnitude-norm&amp;quot;).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/Environment/environment.cxx you can find another property called&lt;br /&gt;
&lt;br /&gt;
&amp;quot;turbulence/magnitude-norm&amp;quot;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value betweenero and one; see:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static int fgOptTurbulence( const char *arg )&lt;br /&gt;
{&lt;br /&gt;
Environment::Presets::TurbulenceSingleton::instance()-&amp;amp;gt;preset( atof(arg) );&lt;br /&gt;
return FG_OPTIONS_OK;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
=== FGRidgeLift ===&lt;br /&gt;
&lt;br /&gt;
== FDMs ==&lt;br /&gt;
=== JSBSim ===&lt;br /&gt;
The JSBSim flight dynamic model has the most opportunities to create a turbulent wind situation [see http://wiki.flightgear.org/JSBSim_Atmosphere].&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like&lt;br /&gt;
&lt;br /&gt;
turbulence_gain = fgGetNode(&amp;quot;/environment/turbulence/magnitude-norm&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
and a lot more.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276520#p276520&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The option --turbulence=n.n seems to scale with the probability_of_exceedence_index JSBSim uses. This index is saved via the property /fdm/jsbsim/atmosphere/turbulence/milspec/severity.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=276529#p276529&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Processing the option --turbulence=n.n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;gierschi@flightgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 18th, 2016&lt;br /&gt;
  | added   = Feb 18th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= setting turbulence magnitude norm to a given value creates very different strength of turbulence in YaSim and JSBSim. I probably could introduce a hack in the weather system that some FDM dependent scaling factor is used, but I really think the weather system should *not* have to know about the FDM - this violates any modulariation idea, so I think this is an FDM-side issue. Besides, the same issue must exist in Basic Weather&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/30113514/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Next FlightGear release (Feb. 17 2013)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Renk Thorsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Nov 18th, 2012&lt;br /&gt;
  | added   = Nov 18th, 2012&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
== Related ==&lt;/div&gt;</summary>
		<author><name>Lisbellaw</name></author>
	</entry>
</feed>