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
altitude | (Object) |
data.value | (Number) (length) Altitude above the WGS 84 reference ellipsoid |
timestamp | (Date) |
coordinates | (Object) |
data.value | (Object) |
timestamp | (Date) |
fuzzyCoordinates | (Object) |
data.value | (Object) Fuzzy coordinates for the vehicle location. |
timestamp | (Date) |
gpsSignalStrength | (Object) |
data.value | (Number) (double) GPS signal strength percentage between 0.0-1.0 |
timestamp | (Date) |
gpsSource | (Object) |
data.value | (String) (enum) Type of GPS source |
timestamp | (Date) |
heading | (Object) |
data.value | (Number) (angle) Heading angle |
timestamp | (Date) |
precision | (Object) |
data.value | (Number) (length) |
timestamp | (Date) |
Example
{
"altitude": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 133.5,
"unit": "meters"
}
},
"coordinates": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"latitude": {
"value": 52.520008
},
"longitude": {
"value": 13.404954
}
}
},
"fuzzyCoordinates": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"latitude": {
"value": 52.52
},
"longitude": {
"value": 13.4049
}
}
},
"gpsSignalStrength": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.8
}
},
"gpsSource": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "real"
}
},
"heading": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 13.370123,
"unit": "degrees"
}
},
"precision": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"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"
}
}
}
}