"odometer" smartCORE module
Description
The task of the odometer module is to determine the distance traveled (in km) by a vehicle using GPS information. It continuously records the mileage and saves it regularly in a file on the device so that the old mileage is used when the system is restarted. For the odometer module to function correctly, it must be able to access the GPS information of the GPS module. To do this, the names of the GPS signals must be specified in the config. If they are not found by the module, no data will be recorded!
The following signals must be present and available to the odometer module for the module to function correctly:
- Location signal with longitude and latitude
- PosFixMode signal. Indicates a GPS fix is present (2D fix, 3D fix or no GPS)
- Number of satellites of the current GPS signal
If the odometer module is used, the GPS module must also be activated in the config and the corresponding signal names must be entered!
JSON configuration
The following section shows the entire JSON configuration of the odometer module including the GPS module. The signal names of the odometer module are always prefixed with the module name ("module": "Odometer").
Minimum configuration
{
"module": "GPS",
"factory": "gps",
"config": {
}
},
{
"module": "Odometer",
"factory": "odometer",
"config": {
}
}
Example The above configuration results in the following signal names:
- "Odometer.TotalDistance"
- "GPS.PositionFixMode"
- "GPS.SatelliteCount"
Configuration with all parameters
Note: For all parameters of the GPS module, see the corresponding documentation.
{
"module": "GPS",
"factory": "gps",
"config": {
}
},
{
"module": "Odometer",
"factory": "odometer",
"config": {
"debugMode": false,
"sendOdometerSettings": true,
"minimalAvailableSatCount": 10,
"timeoutMs": 1000,
"toleranceRadius_km": 0.06,
"gpsLocationChannelName": "GPS.Location",
"gpsPositionFixModeChannelName": "GPS.PositionFixMode",
"gpsSatelliteCountChannelName": "GPS.SatelliteCount",
"minimalAvailableFixMode": 2,
"distanceChannelName": "Odometer.Distance_km"
}
}
**Example The above configuration results in the following signal names:
- "Odometer.Distance_km"
- "Odometer.ToleranceRadius_km"
- "Odometer.MinSatelliteCount"
- "Odometer.MinFixMode"
- "GPS.PositionFixMode"
- "GPS.SatelliteCount"
Parameter list configuration
Parameter Name | Must-Have | Data Type | Default Value | Description |
---|---|---|---|---|
timeoutMs | No | int | 1000 | Execution interval of the module in Ms |
debugMode | No | bool | false | If active (true), more information is written to the logbook. |
sendOdometerSettings | No | bool | false | If active (true), the setting parameters (toleranceRadius_km, minimalAvailableFixMode, minimalAvailableSatCount...) are produced as signals and are available in Osf files and the cloud. |
minimalAvailableSatCount | No | int | 8 | Required minimum number of satellites of the GPS signal so that the GPS signal is considered valid and the mileage is updated. If fewer satellites are available, the mileage is not increased. Useful values are between 8-15. |
toleranceRadius_km | No | double | 0.05 | The minimum distance traveled (in km) for the mileage to be incremented. Based on the default value, 50 meters must have been driven in one go for the mileage to be increased. This behavior is intended to prevent the mileage from being falsified by jittering of the GPS signal. |
gpsLocationChannelName | No | String | gps.Location | Name of the GPS signal in the smartCORE data pool with longitude and latitude values. |
gpsPositionFixModeChannelName | No | String | gps.PositonFixMode | Name of the signal with GPS PositionFixMode information. Is required to check whether the GPS signal is valid for running kilometers. |
gpsSatelliteCountChannelName | No | String | gps.SatelliteCount | Name of the signal with the number of satellites of the GPS signal. Is required to check whether the GPS signal is valid for running kilometers. If |
minimalAvailableFixMode | No | int | 2 | Required minimum GPS PosFixMode value so that the GPS signal is considered valid and the running kilometer status is updated. Valid values are 2 (3D Fix) or 3 (3D Fix). |
distanceChannelName | No | String | ["module"].TotalDistance | Name of the running kilometer signal as it appears in the Osf files. Unit is "km". |
Module information/profile
Information | Value |
---|---|
Author | optiMEAS Measurement and Automation Systems GmbH |
Consumes signals | Yes |
Produces signals | Yes |
smartCORE Version | >= 0.175 |
Dependencies | gps Module |