ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE
What it is
Measured distance from leading vehicle when using Adaptive Cruise Control (ACC) or Predictive Cruise Control.
Returns the measured distance in millimeters between the rear-most point of the leading vehicle and the front-most point of the ACC vehicle.
The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined. The minInt32Value should be 0. The maxInt32Value should be populated with the maximum range the distance sensor can support. This value should be non-negative.
When no lead vehicle is detected (that is, when there is no leading vehicle or the leading vehicle is too far away for the sensor to detect), this property should return StatusCode.NOT_AVAILABLE.
When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE is implemented and the state is set to an ErrorState value, then this property must return a StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return StatusCode#NOT_AVAILABLE_SPEED_LOW.
How the ID is built
A property ID is a 32-bit value packing four fields. Reading 0x11401015 apart:
| Field | Mask | Value | Means |
|---|---|---|---|
| Group | 0xf0000000 | 0x10000000 | SYSTEM |
| Area | 0x0f000000 | 0x01000000 | GLOBAL |
| Type | 0x00ff0000 | 0x00400000 | INT32 |
| Ordinal | 0x0000ffff | 0x00001015 | 0x1015 |
Reading it from an app
CarPropertyManager mgr = (CarPropertyManager)
car.getCarManager(Car.PROPERTY_SERVICE);
mgr.registerCallback(callback,
VehiclePropertyIds.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE,
CarPropertyManager.SENSOR_RATE_ONCHANGE);This property is read-only — writes are rejected. It changes continuously, so subscribe at a sample rate rather than polling.

