Custom localization units

Customized units can be used either as default or custom variables in GpsGate, and they will be displayed in the GUI and for reports. Unit Localization Keys are only available for double variable types.

This procedure is only available for GpsGate OnSite.

Create a new .measure file

1. Log in to the Windows Server where GpsGate Server is installed in order to access the GpsGate installed folder.

2. Go to C:\GpsGateServer\IIS\Resources\Languages

3. Create a new .measure file by creating a blank text file.

4. Edit the file to include the new unit, as in the following example:

<?xml version="1.0" encoding="utf-8" ?>
<MeasurementTable Name="metric">
<Measurements>
<Measure Name="Milliliter">
<SourceUnit Name="UNIT_NAME_LITER" Symbol="UNIT_NAME_LITER" Plural="UNIT_NAME_LITER"/>
<TargetUnit Name="UNIT_NAME_MILLILITER" Symbol="ml" Plural="UNIT_NAME_MILLILITER" />
<Converter Type="Linear" Factor="1000" Delta="0" />
<Format Format="0.#" />
</Measure>
</Measurements>
</MeasurementTable>

5. Restart the GpsGate Service

6. Create the new variable using the new unit “Milliliter”

mceclip0.png

Measure file sections

These are the different sections that might be edited in the .measure file.

  • MeasurementTable Name: depending on the system of measurement it can be “metric”, “en-us”, “nautic”.
  • Measure Name: this will be the name displayed on the list of units.
  • SourceUnit: unit used for the received signal.
  • TargetUnit: unit displayed in GpsGate Server.
  • Converter – Factor: value applied to incoming signals to convert them into the desired unit.
  • Format: format for the value displayed (with or without decimals, number of decimals, ...) this only applies to reports and not on the Status tab that will always display 2 decimals.

This can be used as a template to create different units for the metric system, as in the example below:

<?xml version="1.0" encoding="utf-8" ?>
<MeasurementTable Name="metric">
<Measurements>
<Measure Name="Test1">
<SourceUnit Name="UNIT_RECEIVED" Symbol="UNIT_RECEIVED" Plural="UNIT_RECEIVED" />
<TargetUnit Name="UNIT_DISPLAYED" Symbol="UNIT_DISPLAYED" Plural="UNIT_DISPLAYED" />
<Converter Type="Linear" Factor="1" Delta="0" />
<Format Format="0.#" />
</Measure>
<Measure Name="Test2">
<SourceUnit Name="UNIT_RECEIVED" Symbol="UNIT_RECEIVED" Plural="UNIT_RECEIVED" />
<TargetUnit Name="UNIT_DISPLAYED" Symbol="UNIT_DISPLAYED" Plural="UNIT_DISPLAYED" />
<Converter Type="Linear" Factor="1" Delta="0" />
<Format Format="0.#" />
</Measure>
</Measurements>
</MeasurementTable>