Signed Parameters Converting

Signed Parameters Converting

t is supposed that data received by gTrack in the format of two- and four-byte integer appears to be unsigned. In other words, all the incoming values (both positive and negative) are displayed as unsigned, i.e. positive.

If the equipment used by you sends signed values in any parameter (for example, temperature parameter), it is necessary to create a sensor on the basis of this parameter and adjust a calculation table in a proper way.

Parameter Analysis

Switch to the Messages panel and request messages for any interval of time. Indicate Show parameters as raw data. In the column Parameters find the parameter you are interested in and analyse its incoming values.


You can see that when the temperature goes down and crosses 0 degrees threshold the necessary negative numbers are constituted with enormously large ones.

Defining the Maximum Value

Firstly, you should define the maximum threshold for such numbers. In order to do so, take any of the incredibly large digits, which occurs in the values of the parameter, and enter it into a calculator in the decimal mode (Dec.). Afterwards, switch to the hexadecimal displaying (Hex. mode).


Count the register length in the number appeared. Possible values are: 2, 4, 8. If the register length is less, we should round it up (for example, 5 should be rounded up to 8). In our case the register length is 8.

Now letter F should be entered in to the calculator in Hex. mode as many times as the register length appears to be after rounding up. Afterwards, switch to the Dec mode. Appeared result is the maximum possible number. You should write it down or memorize.


Sensor Calculation Table

Switch to the unit properties dialog and create a sensor on the basis of this parameter. Now you should create a calculation table for it. Switch to the Calculation Table tab and deselect Continue last segment checkbox.

We have found out that all the interval of possible values is from 0 to 4294967295. Therefore possible values start from 0 to the half of the maximum number and negative numbers go from the half to the end of the maximum number (where the maximum number is the smallest negative number module). Divide the maximum number by 2, which equals 4294967295 : 2 = 2147483647,5. It means that positive values start from 0 to 2147483647 and negative —from 2147483648 to 4294967295.

In the calculation table X is the raw value sent by the parameter, a is the coefficient, b is the necessary correction. And all these values are needed to get a certain Y which appears to be a real value of temperature.

Whether the coefficient (a) is used for this parameter can be found out in the equipment specification. In our case, the coefficient equals 0.1, therefore if the value of the parameter sent by the equipment equals 6, the real temperature is 0.6 degrees.

For the first segment, correction for b is not needed (i.e., 0) but the second segment needs it because the values go in reverse order (maximum number corresponds to the smallest negative temperature value module). To calculate b shifting ,it is necessary to add one (because we already have 0) and multiply by a coefficient. Therefore we have: (4294967295+1)х0.1 = 429496729.6. The received value should be deducted, that is why it should be entered into the calculation table as negative.

Now you can enter both the intervals (for positive and negative numbers) in the calculation table.


 Note.
Calculation can be also made in the Hex mode. To do this, enter the letter F as many times as the number of digits (in our case 8), and then divide by 2. Then go to the Dec (decimal digits) mode and save or memorize the resulting number. This is the maximum positive value.

Result Analysis

You can analyse the resulting table, switching to the Calculation Table tab and clicking Refresh button.


Besides, you can estimate the sensor setting in the Messages panel. Request messages on the unit for the same time interval, and this time select Show parameter as sensor values.




    • Related Articles

    • Parameters

      In the parameters section, you can configure grouping and sorting of the report data. Grouping Grouping is the arrangement of information based on the indicated characteristics. When adding a new grouping, click Add grouping, select a time interval ...
    • Notification Parameters

      The last page of the dialog window contains the parameters for triggering notifications. Their set may vary depending on the chosen notification type. Name The name of the notification. Time interval (from – to) Time interval is the period of ...
    • Table Parameters

      In the right part of the report template dialog, you can set additional parameters for the table such as: grouping, detalization, row numbering, total row, time limitation. These parameters can be applied to any kind of table. Grouping/Sorting ...
    • Track Parameters

      After you have built a track, it is impossible to change its parameters (time, unit, color, annotations). In case of error, delete the incorrect track and create a new one. Track Color There are four mutually exclusive color settings for the track: ...
    • Chart Parameters

      Sensors Masks In the parameters block (right part of the dialog) you can indicate particular sensors on the basis of which the corresponding charts will be built. This selection does not affect such charts as 'Speed', 'Altitude', 'Fuel consumption by ...