diff options
Diffstat (limited to 'src/org/traccar/model/Position.java')
-rw-r--r-- | src/org/traccar/model/Position.java | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java index 96dc1d2ad..82b7e03ce 100644 --- a/src/org/traccar/model/Position.java +++ b/src/org/traccar/model/Position.java @@ -31,15 +31,20 @@ public class Position extends Message { public static final String KEY_EVENT = "event"; public static final String KEY_ALARM = "alarm"; public static final String KEY_STATUS = "status"; - public static final String KEY_ODOMETER = "odometer"; // meters - public static final String KEY_TRIP_ODOMETER = "tripOdometer"; + public static final String KEY_ODOMETER = "odometer"; // meters + public static final String KEY_ODOMETER_SERVICE = "serviceOdometer"; // meters + public static final String KEY_ODOMETER_TRIP = "tripOdometer"; // meters public static final String KEY_HOURS = "hours"; public static final String KEY_INPUT = "input"; public static final String KEY_OUTPUT = "output"; - public static final String KEY_POWER = "power"; - public static final String KEY_BATTERY = "battery"; - public static final String KEY_FUEL = "fuel"; - public static final String KEY_FUEL_CONSUMPTION = "fuelConsumption"; + + // The units for the below four KEYs currently vary. + // The preferred units of measure are specified in the comment for each. + public static final String KEY_POWER = "power"; // volts + public static final String KEY_BATTERY = "battery"; // volts (or percentage appending '%') + public static final String KEY_FUEL_LEVEL = "fuel"; // liters + public static final String KEY_FUEL_CONSUMPTION = "fuelConsumption"; // liters/hour + public static final String KEY_RFID = "rfid"; public static final String KEY_VERSION_FW = "versionFw"; public static final String KEY_VERSION_HW = "versionHw"; @@ -49,22 +54,23 @@ public class Position extends Message { public static final String KEY_CHARGE = "charge"; public static final String KEY_IP = "ip"; public static final String KEY_ARCHIVE = "archive"; - public static final String KEY_DISTANCE = "distance"; // meters - public static final String KEY_TOTAL_DISTANCE = "totalDistance"; + public static final String KEY_DISTANCE = "distance"; // meters + public static final String KEY_TOTAL_DISTANCE = "totalDistance"; // meters public static final String KEY_RPM = "rpm"; public static final String KEY_VIN = "vin"; public static final String KEY_APPROXIMATE = "approximate"; public static final String KEY_THROTTLE = "throttle"; public static final String KEY_MOTION = "motion"; public static final String KEY_ARMED = "armed"; - public static final String KEY_ACCURACY = "accuracy"; public static final String KEY_GEOFENCE = "geofence"; public static final String KEY_ACCELERATION = "acceleration"; - public static final String KEY_DEVICE_TEMP = "deviceTemp"; + public static final String KEY_DEVICE_TEMP = "deviceTemp"; // celsius + public static final String KEY_OPERATOR = "operator"; + public static final String KEY_COMMAND = "command"; public static final String KEY_DTCS = "dtcs"; - public static final String KEY_OBD_SPEED = "obdSpeed"; - public static final String KEY_OBD_ODOMETER = "obdOdometer"; + public static final String KEY_OBD_SPEED = "obdSpeed"; // knots + public static final String KEY_OBD_ODOMETER = "obdOdometer"; // meters public static final String KEY_RESULT = "result"; @@ -215,7 +221,7 @@ public class Position extends Message { this.longitude = longitude; } - private double altitude; + private double altitude; // value in meters public double getAltitude() { return altitude; |