User avatar
johan
GpsGate
Posts: 14888
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

GUIDE: Non-linear mapping of device variables

Thu Jun 18, 2009 6:21 pm

Non-linear mapping of device variables

Replaced by this guide in GpsGate Server v4.0
http://gpsgate.com/blogComment/non_line ... _variables

Legacy (do not use)

GpsGate Server v2.2 build 1697 or later required.

It is possible to map analog values to GpsGate Variables in a non-linear function. This can be useful when taking a sensor value from a vehicle (e.g. a fuel tank) and map it to a GpsGate Variable (e.g. "Fuel level" when the sensor value is not proportional/linear to the actual fuel volume.

Rather then using a constant in the "Multiplicator" filed you add a formula with the following syntax.

IN1:IN2#OUT1:OUT2,IN3:IN4#OUT3:OUT4,...

INx and OUTx are numbers, which defines intervals. The IN-interval maps to the OUT-interval.

Example:
0:2#0:20,2:4#20,80

A value 1.0 from the tracker will map to 10.0 in the GpsGate Variable. A value 3.0 will map to 50.0

Example 2:
0:1.5#0:15.0,1.5:3#15:45.8,3:10#45.8:0

Example with decimal numbers in interval.

When using a formula the "Constant" field is not used.

Regards,
Johan

Franson Support

User avatar
johan
GpsGate
Posts: 14888
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: Non-linear mapping of device variables

Fri Jun 19, 2009 8:35 pm

Example of multiplicator for ArkNav/StarsNav Rover9 temperature sensor

This multiplicator will cover from -35 to 100 Centigrade, use it to map between "AnalogValue" and "Temperature" for device mapper "StarsNav Rover9":
15:30#103:78,30:50#78:60.5,50:90#60.5:39.5,90:195#39.5:0,195:230#0:-19,230:245#-19:-35


Regards,
Johan

Franson Support

User avatar
johan
GpsGate
Posts: 14888
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: Non-linear mapping of device variables

Wed May 23, 2012 12:51 am

Patch.3275 v3.0.0.3417 or later is required.

To ignore values for a range use this formal 0:0#null

Example, which removes zero values but lets all other values through unchanged in the interval -100 to 100:

0:0#null,-100:100#-100:100

Regards,
Johan

GpsGate Support

Return to “GpsGate Server - How to setup and use”