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)

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)

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)

gasPedalPosition(Object)
data.value

(Number) (double) The gas pedal position between 0.0-1.0, whereas 1.0 (100%) is full throttle

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)

brakePressure(Object)
data.value

(Number) (pressure) Brake pressure

timestamp

(Date)

yawRate(Object)
data.value

(Number) (angular_velocity) Yaw turning rate

timestamp

(Date)

rearSuspensionSteering(Object)
data.value

(Number) (angle) Rear suspension steering

timestamp

(Date)

electronicStabilityProgram(Object)
data.value

(String) (enum)

timestamp

(Date)

brakeTorqueVectorings(Object)
data.value

(Array)

timestamp

(Date)

gearMode(Object)
data.value

(String) (enum)

timestamp

(Date)

selectedGear(Object)
data.value

(Number) (integer) The selected gear value, if any

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)

clutchPedalSwitch(Object)
data.value

(String) (enum)

timestamp

(Date)

acceleratorPedalIdleSwitch(Object)
data.value

(String) (enum)

timestamp

(Date)

acceleratorPedalKickdownSwitch(Object)
data.value

(String) (enum)

timestamp

(Date)

vehicleMoving(Object)
data.value

(String) (enum)

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"
        }
      }
    }
  ],
  "understeering": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.19
    }
  },
  "oversteering": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.05
    }
  },
  "gasPedalPosition": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.98
    }
  },
  "steeringAngle": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 10,
      "unit": "degrees"
    }
  },
  "brakePressure": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 20,
      "unit": "bars"
    }
  },
  "yawRate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 6.66,
      "unit": "degrees_per_second"
    }
  },
  "rearSuspensionSteering": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 3.3,
      "unit": "degrees"
    }
  },
  "electronicStabilityProgram": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "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"
        }
      }
    }
  ],
  "gearMode": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "drive"
    }
  },
  "selectedGear": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 4
    }
  },
  "brakePedalPosition": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.12
    }
  },
  "brakePedalSwitch": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "clutchPedalSwitch": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "acceleratorPedalIdleSwitch": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "acceleratorPedalKickdownSwitch": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "vehicleMoving": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "moving"
    }
  }
}

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"
      }
    }
  }
}