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.
For this example, a device will be sending a volume signal in liters, but we will be creating a new variable and a new unit to display that signal in milliliters. The first step is creating a new variable in SiteAdmin/Devices/Variables.
We can assign the SIGNAL_VOLUME unit but that will display the value in liters instead of milliliters. The Status tab can be used to make sure the unit that will be created is working as expected.
Create a new .measure file
Follow these steps to create the correct unit so it can be assigned to the variable VolumeMilliliters
- Log in to the server where GpsGate Server is installed
- Go to the path where GpsGate Server is installed and look for the Languages folder, usually C:\GpsGateServer\IIS\Resources\Languages .
- Create a new .measure file by creating a blank text file.
- Edit the file to include the new keys. In order to use the milliliter unit for the example used above the file has to look exactly like this:
After creating the new measurement file it is needed to rescan the files. Go to SiteAdmin/Settings/Localization and click the “Rescan languages and measurements” button. After this, the custom variable can be created using the new unit “Milliliter” Lastly check that the unit displayed in the Status tab is correct now
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”.
- Measurement – 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: