Race
getState([, propertyNames])
Declaration
hmkit.commands.Race.getState()
Parameters
| propertyNames | (optional) Array of names of the properties you want returned. |
Returns
RaceResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.Race.getState(),
accessCertificate
);
RaceResponse
Parameters
| accelerations | (Object) |
| data.value | (Array |
| timestamp | (Date) |
| acceleratorDurations | (Object) |
| data.value | (Array |
| timestamp | (Date) |
| acceleratorPedalIdleSwitch | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| acceleratorPedalKickdownSwitch | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| brakePedalPosition | (Object) |
| data.value | (Number) (double) The brake pedal position between 0.0-1.0, wheras 1.0 (100%) is full brakes |
| timestamp | (Date) |
| brakePedalSwitch | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| brakePressure | (Object) |
| data.value | (Number) (pressure) Brake pressure |
| timestamp | (Date) |
| brakeTorqueVectorings | (Object) |
| data.value | (Array |
| timestamp | (Date) |
| clutchPedalSwitch | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| drivetrainState | (Object) |
| data.value | (String) (enum) State of the drivetrain for starts. |
| timestamp | (Date) |
| electronicStabilityProgram | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| gasPedalPosition | (Object) |
| data.value | (Number) (double) The gas pedal position between 0.0-1.0, whereas 1.0 (100%) is full throttle |
| timestamp | (Date) |
| gearMode | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| oversteering | (Object) |
| data.value | (Number) (double) The oversteering percentage between 0.0-1.0 whereas up to 0.2 (20%) is considered OK, up to 30% marginal, over 30% critical |
| timestamp | (Date) |
| rearSuspensionSteering | (Object) |
| data.value | (Number) (angle) Rear suspension steering |
| timestamp | (Date) |
| selectedGear | (Object) |
| data.value | (Number) (integer) The selected gear value, if any |
| timestamp | (Date) |
| steeringAngle | (Object) |
| data.value | (Number) (angle) The steering angle, whereas 0.0 is straight ahead, positive number to the right and negative number to the left |
| timestamp | (Date) |
| understeering | (Object) |
| data.value | (Number) (double) The understeering percentage between 0.0-1.0 whereas up to 0.2 (20%) is considered OK, up to 0.3 (30%) marginal, over 30% critical |
| timestamp | (Date) |
| vehicleMoving | (Object) |
| data.value | (String) (enum) |
| timestamp | (Date) |
| yawRate | (Object) |
| data.value | (Number) (angular_velocity) Yaw turning rate |
| timestamp | (Date) |
Example
{
"accelerations": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"direction": {
"value": "longitudinal"
},
"acceleration": {
"value": 0.864,
"unit": "gravity"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"direction": {
"value": "lateral"
},
"acceleration": {
"value": -0.753,
"unit": "gravity"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"direction": {
"value": "front_lateral"
},
"acceleration": {
"value": 0.753,
"unit": "gravity"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"direction": {
"value": "rear_lateral"
},
"acceleration": {
"value": -0.864,
"unit": "gravity"
}
}
}
],
"acceleratorDurations": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"pedalPositionThreshold": {
"value": 0.5
},
"duration": {
"value": 1234,
"unit": "seconds"
}
}
}
],
"acceleratorPedalIdleSwitch": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"acceleratorPedalKickdownSwitch": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"brakePedalPosition": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.12
}
},
"brakePedalSwitch": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"brakePressure": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 20,
"unit": "bars"
}
},
"brakeTorqueVectorings": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"axle": {
"value": "front"
},
"state": {
"value": "active"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"axle": {
"value": "rear"
},
"state": {
"value": "inactive"
}
}
}
],
"clutchPedalSwitch": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"drivetrainState": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "race_start"
}
},
"electronicStabilityProgram": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"gasPedalPosition": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.98
}
},
"gearMode": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "drive"
}
},
"oversteering": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.05
}
},
"rearSuspensionSteering": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 3.3,
"unit": "degrees"
}
},
"selectedGear": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 4
}
},
"steeringAngle": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 10,
"unit": "degrees"
}
},
"understeering": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.19
}
},
"vehicleMoving": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "moving"
}
},
"yawRate": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 6.66,
"unit": "degrees_per_second"
}
}
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.Race.getAvailability()
Parameters
| propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.Race.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.Race.getAvailability(['accelerations']),
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
{
"accelerations": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}