Vehicle Location

getVehicleLocation([, propertyNames])

Declaration

hmkit.commands.VehicleLocation.getVehicleLocation()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Returns

VehicleLocationResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.VehicleLocation.getVehicleLocation(),
  accessCertificate
);

VehicleLocationResponse

Parameters

coordinates(Object)
data.value

(Object)

timestamp

(Date)

heading(Object)
data.value

(Number) (angle) Heading angle

timestamp

(Date)

altitude(Object)
data.value

(Number) (length) Altitude above the WGS 84 reference ellipsoid

timestamp

(Date)

precision(Object)
data.value

(Number) (length)

timestamp

(Date)

Example

{
  "coordinates": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "latitude": {
          "value": 52.520008
        },
        "longitude": {
          "value": 13.404954
        }
      }
    }
  },
  "heading": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 13.370123,
        "unit": "degrees"
      }
    }
  },
  "altitude": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 133.5,
        "unit": "meters"
      }
    }
  },
  "precision": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 500,
        "unit": "meters"
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.VehicleLocation.getAvailability()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.VehicleLocation.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.VehicleLocation.getAvailability(['coordinates']),
  accessCertificate
);

Response

Parameters

availability(Object)
updateRate.value

(String) enum

rateLimit.value

(Number)

rateLimit.unit

(String)

appliesPer.value

(String)

Discussion

The response contains an availability object for each property, as shown in the example

Example

{
  "coordinates": {
    "availability": {
      "updateRate": {
        "value": "trip_high"
      },
      "rateLimit": {
        "value": 64,
        "unit": "hertz"
      },
      "appliesPer": {
        "value": "vehicle"
      }
    }
  }
}