Added in API level 37

DlTdoaMeasurement


class DlTdoaMeasurement : Parcelable
kotlin.Any
   ↳ android.ranging.DlTdoaMeasurement

Represents a single measurement from a Downlink Time Difference of Arrival (DL-TDoA) ranging session.

For more details, refer to the FiRa 2.0 and FiRa 4.0 specification.

Summary

Nested classes

Class to represent the anchor location.

Represents a location in a relative coordinate system.

Represents a location in the WGS-84 coordinate system.

Represents a Z-element extension regarding the height of a anchor.

Constants
static Int

DL-TDoA Message Type: Final DTM

static Int

DL-TDoA Message Type: Poll DTM

static Int

DL-TDoA Message Type: Response DTM

Inherited constants
Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

MutableList<Int!>

Returns a list of active ranging round indexes.

Float

Returns the Clock Frequency Offset (CFO) of a Responder DT-Anchor.

DlTdoaMeasurement.AnchorLocation?

Returns the anchor location, if available.

Float

Returns the Angle of Arrival (AoA) azimuth in degrees.

Int

Returns the Figure of Merit (FoM) of the AoA azimuth.

Float

Returns the Angle of Arrival (AoA) elevation in degrees.

Int

Returns the Figure of Merit (FoM) of the AoA elevation.

Int

Returns the block index of the current ranging block.

Float

Returns the locally measured Clock Frequency Offset (CFO) by the DT-Tag.

Long

Returns the time difference measured by the Initiator DT-Anchor.

Int

Returns the Time of Flight (ToF) between the Responder and Initiator DT-Anchors.

Int

Returns the measurement version.

Int

Returns the raw MessageControl field.

Int

Returns the message type of the received DL-TDoA Message (DTM).

Int

Returns an indicator of the Line of Sight (LoS) status.

Long

Returns the time difference measured at the Responder DT-Anchor.

Int

Returns the round index of the current ranging round within the current ranging block.

Int

Returns the Received Signal Strength Indicator (RSSI) in dBm.

ByteArray

Returns the local reception timestamp of the message by the DT-Tag (Android device).

Int

Returns the Supercluster ID, if available.

ByteArray

Returns the transmission timestamp of the message reported by the DT-Anchor.

Boolean

Returns true if Supercluster ID is present.

Int

Returns a hash code value for the object.

Boolean

Returns true if TX timestamp is based on a common time base.

String

Returns a string representation of the object.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<DlTdoaMeasurement!>

Constants

MESSAGE_TYPE_FINAL_DTM

Added in API level 37
static val MESSAGE_TYPE_FINAL_DTM: Int

DL-TDoA Message Type: Final DTM

Value: 2

MESSAGE_TYPE_POLL_DTM

Added in API level 37
static val MESSAGE_TYPE_POLL_DTM: Int

DL-TDoA Message Type: Poll DTM

Value: 0

MESSAGE_TYPE_RESPONSE_DTM

Added in API level 37
static val MESSAGE_TYPE_RESPONSE_DTM: Int

DL-TDoA Message Type: Response DTM

Value: 1

Public methods

describeContents

Added in API level 37
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

equals

Added in API level 37
fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getActiveRangingRoundIndexes

Added in API level 37
fun getActiveRangingRoundIndexes(): MutableList<Int!>

Returns a list of active ranging round indexes.

These are the rounds in which the DT-Anchor associated with this measurement result is present.

Return
MutableList<Int!> The list of active ranging round indexes. An empty list is returned if active ranging round indexes are not present.
This value cannot be null.

getAnchorCfo

Added in API level 37
fun getAnchorCfo(): Float

Returns the Clock Frequency Offset (CFO) of a Responder DT-Anchor.

This offset is relative to the Initiator DT-Anchor of the ranging round, in ppm units.

Return
Float The Anchor CFO as a float, or Float.NaN if not available.
Value is between -32.0f and 32.0f inclusive

getAnchorLocation

Added in API level 37
fun getAnchorLocation(): DlTdoaMeasurement.AnchorLocation?

Returns the anchor location, if available.

Return
DlTdoaMeasurement.AnchorLocation? The anchor location, or null if not available.

getAoaAzimuth

Added in API level 37
fun getAoaAzimuth(): Float

Returns the Angle of Arrival (AoA) azimuth in degrees.

This value ranges from -180 to 180 degrees. If the value is not available, it returns Float.NaN.

Return
Float The AoA azimuth value in degrees, or Float.NaN if not available.
Value is between -180.0f and 180.0f inclusive

getAoaAzimuthFom

Added in API level 37
fun getAoaAzimuthFom(): Int

Returns the Figure of Merit (FoM) of the AoA azimuth.

This value ranges from 0 to 100. If the value is not available, it returns 0.

Return
Int The AoA azimuth FoM value in percentage, or 0 if not available.
Value is between 0 and 100 inclusive

getAoaElevation

Added in API level 37
fun getAoaElevation(): Float

Returns the Angle of Arrival (AoA) elevation in degrees.

This value ranges from -90 to 90 degrees. If the value is not available, it returns Float.NaN.

Return
Float The AoA elevation value in degrees, or Float.NaN if not available.
Value is between -90.0f and 90.0f inclusive

getAoaElevationFom

Added in API level 37
fun getAoaElevationFom(): Int

Returns the Figure of Merit (FoM) of the AoA elevation.

This value ranges from 0 to 100. If the value is not available, it returns 0.

Return
Int The AoA elevation FoM value in percentage, or 0 if not available.
Value is between 0 and 100 inclusive

getBlockIndex

Added in API level 37
fun getBlockIndex(): Int

Returns the block index of the current ranging block.

This identifies the specific ranging block during which the measurement occurred.

Return
Int The block index as an integer.
Value is between 0 and 65535 inclusive

getCfo

Added in API level 37
fun getCfo(): Float

Returns the locally measured Clock Frequency Offset (CFO) by the DT-Tag.

This offset is relative to the DT-Anchor that sent the message, in ppm units.

Return
Float The CFO as a float, or Float.NaN if not supported.
Value is between -32.0f and 32.0f inclusive

getInitiatorReplyTime

Added in API level 37
fun getInitiatorReplyTime(): Long

Returns the time difference measured by the Initiator DT-Anchor.

It's between the RX timestamp of a Responder's DTM and the TX timestamp of the Final DTM, in Ranging Ticks (~15.65 ps). If the ranging method SS-TWR is used between DT-Anchors, then there is no Final DTM at all and this value is 0.

Return
Long The Initiator Reply Time as a long.
Value is between 0 and 4294967295L inclusive

getInitiatorResponderTof

Added in API level 37
fun getInitiatorResponderTof(): Int

Returns the Time of Flight (ToF) between the Responder and Initiator DT-Anchors.

This is measured by the Responder DT-Anchor, in Ranging Ticks (~15.65 ps). This field is only valid for the Response DTM. For Poll DTM and Final DTM, this value is 0.

Return
Int The Initiator-Responder ToF as an integer.
Value is between 0 and 65535 inclusive

getMeasurementVersion

Added in API level 37
fun getMeasurementVersion(): Int

Returns the measurement version.

Return
Int The measurement version,e.g., DlTdoaRangingParams.MEASUREMENT_VERSION_1.
Value is one of the following:

getMessageControl

Added in API level 37
fun getMessageControl(): Int

Returns the raw MessageControl field.

Note: This is an advanced-use field. The value is a bitmask constructed according to the layout described in the FiRa 4.0 UCI specification mentioned in the DlTdoaMeasurement class documentation. The representation is version-specific and depends on the measurement version (see Table 31 for v1, and Table 32 for v2).

Return
Int The integer bitmask representing message control flags.
Value is between 0 and 2047 inclusive

getMessageType

Added in API level 37
fun getMessageType(): Int

Returns the message type of the received DL-TDoA Message (DTM).

Return
Int The message type, e.g., MESSAGE_TYPE_POLL_DTM.
Value is one of the following:

getNlos

Added in API level 37
fun getNlos(): Int

Returns an indicator of the Line of Sight (LoS) status.

Return
Int The NLoS status as android.ranging.uwb.UwbSpecificData#LineOfSight.
Value is one of the following:

getResponderReplyTime

Added in API level 37
fun getResponderReplyTime(): Long

Returns the time difference measured at the Responder DT-Anchor.

It's between the RX timestamp of the Poll DTM and the TX timestamp of its Response DTM, in Ranging Ticks (~15.65 ps). For Poll DTM and Final DTM, this value is 0.

Return
Long The Responder Reply Time as a long.
Value is between 0 and 4294967295L inclusive

getRoundIndex

Added in API level 37
fun getRoundIndex(): Int

Returns the round index of the current ranging round within the current ranging block.

This specifies the active ranging round.

Return
Int The round index as an integer.
Value is between 0 and 255 inclusive

getRssi

Added in API level 37
fun getRssi(): Int

Returns the Received Signal Strength Indicator (RSSI) in dBm.

This value ranges from -127dBm to -1dBm. If the value is not available, it returns 0.

Return
Int The RSSI value in negative dBm, or 0 if not available.
Value is between -127 and 0 inclusive

getRxTimestamp

Added in API level 37
fun getRxTimestamp(): ByteArray

Returns the local reception timestamp of the message by the DT-Tag (Android device).

This timestamp is measured locally in Ranging Ticks (~15.65 ps).

Return
ByteArray The RX timestamp integer value as a byte array in little endian byte order.
This value cannot be null.

getSuperclusterId

Added in API level 37
fun getSuperclusterId(): Int

Returns the Supercluster ID, if available.

If this value is available, Supercluster common timebase is valid for Initiator DT-Anchors using the same Supercluster ID.

Return
Int The Supercluster ID, or indeterminate value if not available. Check hasSuperclusterId() before using the return value of this method.
Value is between #SUPERCLUSTER_ID_MIN_VALUE and #SUPERCLUSTER_ID_MAX_VALUE inclusive

getTxTimestamp

Added in API level 37
fun getTxTimestamp(): ByteArray

Returns the transmission timestamp of the message reported by the DT-Anchor.

This timestamp is in Ranging Ticks (~15.65 ps).

Return
ByteArray The TX timestamp integer value as a byte array in little endian byte order.
This value cannot be null.

hasSuperclusterId

Added in API level 37
fun hasSuperclusterId(): Boolean

Returns true if Supercluster ID is present.

If this value is available, Supercluster common timebase is valid for Initiator DT-Anchors using the same Supercluster ID.

Return
Boolean true if Supercluster ID is present, false otherwise.

hashCode

Added in API level 37
fun hashCode(): Int

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Return
Int a hash code value for this object.

isTxTimestampInCommonTimeBase

Added in API level 37
fun isTxTimestampInCommonTimeBase(): Boolean

Returns true if TX timestamp is based on a common time base.

This value is derived from bit 0 of the MessageControl field. If TX timestamp is not based on a common time base, it is based on the local time base and cannot be used for localization.

Return
Boolean true if the TX timestamp is in the common time base, false otherwise.

toString

Added in API level 37
fun toString(): String

Returns a string representation of the object.

Return
String a string representation of the object.

writeToParcel

Added in API level 37
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:

Properties

CREATOR

Added in API level 37
static val CREATOR: Parcelable.Creator<DlTdoaMeasurement!>