In the following we will show you how to use the Range Mapper, which is very often used in the creation of Expressions. The Range Mapper’s function can be explained as follows: A Range Mapper converts a given value from one region to another. But this is only partly true and is also misleading.
Create a Range Mapper and add an empty XPresso Expression. In order to make the above description easier to understand we will use a simple example to explain. Imagine a plane flying at high altitude. We want to link the altimeter reading to the plane’s Y position. The altitude will be displayed by a small rotating needle. Our plane can fly at an altitude of up to 10,000 feet and our needle will rotate from 0° to 180° accordingly.
The Y position value will be transformed from a range of 0-10,000 to a range of 0°-180° on the altimeter. Take a look at the Range Mapper in the Attribute Manager. The values for our example would be as follows:
These parameters can also be defined using Ports. In addition to these attributes we can also use the Spline field, whose X axis represents the start and its Y axis the end of the range. This allows for a more dynamic adaption of the start value to the end value. The Spline field can be opened if the altimeter should not display linear values between 0° and 180°.