.. include:: ../../../_includes/_warning_banner.rst .. |abs| replace:: ```` ===== |abs| ===== .. note:: The |abs| element used inside the FlightGear ```` tag is distinct from the |abs| `element used in JSBSim `_ for XML configuration files - although they are closely related and both perform the same mathematical operation. Overview -------- The |abs| element takes the absolute value of a ```` child element. It is the same principle as functions of the same name in many programming languages. .. tip:: For more information about absolute values in mathematics, see the `Wikipedia article `_ on the subject. Syntax ------ .. todo:: Does abs support more than one argument? The |abs| element must be a child element of an ```` element, and the |abs| element must have a ```` child element. Example ------- One use case for the |abs| element is when a numerical value needs to be checked or used in a calculation, but whether or not the value is positive or negative is irrelevant. In this example, passing the ``/velocities/vertical-speed-fps`` as a value to the |abs| element will return the vertical speed as a positive number, regardless of whether its value is positive or negative. .. code-block:: xml /velocities/vertical-speed-fps