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
- 1. Log in to the server where GpsGate Server is installed
- 2. Go to the path where GpsGate Server is installed and look for the Languages folder, usually 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 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.
- 1. MeasurementTable – Name: depending on the system of measurement it can be “metric”, “en-us”, “nautic”.
- 2. Measurement – Name: this will be the name displayed on the list of units.
- 3. SourceUnit: unit used for the received signal.
- 4. TargetUnit: unit displayed in GpsGate Server.
- 5. Converter – Factor: value applied to incoming signals to convert them into the desired unit.
- 6. 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: