Skip to content
Vehicle properties
ADAS & driver assistance

ULTRASONICS_SENSOR_ORIENTATION

What it is

Static data for the orientation of each ultrasonic sensor installed on the vehicle.

Each individual sensor is identified by its VehicleAreaConfig#areaId and returns the sensor's orientation formatted as [qw, qx, qy, qz] where:

    int32Values[0] = qw, the quaternion coefficient w within the quaterinion (w + xi + yj +
                     zk) describing the rotation of the sensor relative to the Android
                     Automotive sensor coordinate frame.
    int32Values[1] = qx, the quaternion coefficient x within the quaterinion (w + xi + yj +
                     zk) describing the rotation of the sensor relative to the Android
                     Automotive sensor coordinate frame.
    int32Values[2] = qy, the quaternion coefficient y within the quaterinion (w + xi + yj +
                     zk) describing the rotation of the sensor relative to the Android
                     Automotive sensor coordinate frame.
    int32Values[3] = qz, the quaternion coefficient z within the quaterinion (w + xi + yj +
                     zk) describing the rotation of the sensor relative to the Android
                     Automotive sensor coordinate frame.

This assumes each sensor uses the same axes conventions as Android Automotive.

If the data is aggregated by another ECU, then OEMs have the option of reporting the same reading across all included sensors or reporting a virtual representation of all the included sensors as if they were one sensor.

How the ID is built

A property ID is a 32-bit value packing four fields. Reading 0x18610c21 apart:

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x08000000VENDOR
Type0x00ff00000x00610000FLOAT_VEC
Ordinal0x0000ffff0x00000c210xc21

Reading it from an app

CarPropertyManager mgr = (CarPropertyManager)
        car.getCarManager(Car.PROPERTY_SERVICE);

CarPropertyValue<Float> value =
        mgr.getProperty(VehiclePropertyIds.ULTRASONICS_SENSOR_ORIENTATION, areaId);

This property is read-only — writes are rejected. It is static for the life of the vehicle, so read it once and cache it.