Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G


From FlightGear wiki
Revision as of 16:14, 12 April 2016 by Johan G (Talk | contribs) (Related content: + PropertyList XML files)

Jump to: navigation, search
This article is a stub. You can help the wiki by expanding it.

Expressions (or SGExpressions) are a feature of the SimGear library and provide a nice way of implementing complex math formulas using XML syntax. They are supported in many systems within the FlightGear code.

Caution  Expressions do not check if your math creates floating point exceptions (like division by zero conditions, taking the square root of a negative number, etc.). This can cause undefined behavior and may result in NaNs or even Cascading NaNs.


Expressions are supported in

Sample Expressions

This is a sample expression for c = sqrt(a*a + b^2). Children/arguments are parsed in the order they appear in in the file (or the order in which they are set via property methods).


Supported elements

<abs> <!-- also: fabs -->
<difference> <!-- also: dif -->
<product> <!-- also: prod -->

Related content

Wiki articles

Source code