DlTdoaMeasurement


public final class DlTdoaMeasurement
extends Object implements Parcelable

java.lang.Object
   ↳ 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.

See also:

Summary

Nested classes

class DlTdoaMeasurement.AnchorLocation

Class to represent the anchor location. 

class DlTdoaMeasurement.RelativeLocation

Represents a location in a relative coordinate system. 

class DlTdoaMeasurement.Wgs84Location

Represents a location in the WGS-84 coordinate system. 

class DlTdoaMeasurement.ZElementExtension

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

Constants

int MESSAGE_TYPE_FINAL_DTM

DL-TDoA Message Type: Final DTM

int MESSAGE_TYPE_POLL_DTM

DL-TDoA Message Type: Poll DTM

int MESSAGE_TYPE_RESPONSE_DTM

DL-TDoA Message Type: Response DTM

Inherited constants

Fields

public static final Creator<DlTdoaMeasurement> CREATOR

Public methods

int describeContents()

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

boolean equals(Object o)

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

List<Integer> getActiveRangingRoundIndexes()

Returns a list of active ranging round indexes.

float getAnchorCfo()

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

DlTdoaMeasurement.AnchorLocation getAnchorLocation()

Returns the anchor location, if available.

float getAoaAzimuth()

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

int getAoaAzimuthFom()

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

float getAoaElevation()

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

int getAoaElevationFom()

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

int getBlockIndex()

Returns the block index of the current ranging block.

float getCfo()

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

long getInitiatorReplyTime()

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

int getInitiatorResponderTof()

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

int getMeasurementVersion()

Returns the measurement version.

int getMessageControl()

Returns the raw MessageControl field.

int getMessageType()

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

int getNlos()

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

long getResponderReplyTime()

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

int getRoundIndex()

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

int getRssi()

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

byte[] getRxTimestamp()

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

int getSuperclusterId()

Returns the Supercluster ID, if available.

byte[] getTxTimestamp()

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

boolean hasSuperclusterId()

Returns true if Supercluster ID is present.

int hashCode()

Returns a hash code value for the object.

boolean isTxTimestampInCommonTimeBase()

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

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

MESSAGE_TYPE_FINAL_DTM

public static final int MESSAGE_TYPE_FINAL_DTM

DL-TDoA Message Type: Final DTM

Constant Value: 2 (0x00000002)

MESSAGE_TYPE_POLL_DTM

public static final int MESSAGE_TYPE_POLL_DTM

DL-TDoA Message Type: Poll DTM

Constant Value: 0 (0x00000000)

MESSAGE_TYPE_RESPONSE_DTM

public static final int MESSAGE_TYPE_RESPONSE_DTM

DL-TDoA Message Type: Response DTM

Constant Value: 1 (0x00000001)

Fields

CREATOR

public static final Creator<DlTdoaMeasurement> CREATOR

Public methods

describeContents

public int describeContents ()

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.

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

equals

public boolean equals (Object o)

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
o Object: the reference object with which to compare.

Returns
boolean true if this object is the same as the obj argument; false otherwise.

getActiveRangingRoundIndexes

public List<Integer> getActiveRangingRoundIndexes ()

Returns a list of active ranging round indexes.

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

Returns
List<Integer> 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

public float getAnchorCfo ()

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.

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

getAnchorLocation

public DlTdoaMeasurement.AnchorLocation getAnchorLocation ()

Returns the anchor location, if available.

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

getAoaAzimuth

public float getAoaAzimuth ()

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.

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

getAoaAzimuthFom

public int getAoaAzimuthFom ()

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.

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

getAoaElevation

public float getAoaElevation ()

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.

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

getAoaElevationFom

public int getAoaElevationFom ()

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.

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

getBlockIndex

public int getBlockIndex ()

Returns the block index of the current ranging block.

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

Returns
int The block index as an integer.
Value is between 0 and 65535 inclusive

getCfo

public float getCfo ()

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.

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

getInitiatorReplyTime

public long getInitiatorReplyTime ()

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.

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

getInitiatorResponderTof

public int getInitiatorResponderTof ()

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.

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

getMeasurementVersion

public int getMeasurementVersion ()

Returns the measurement version.

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

getMessageControl

public int getMessageControl ()

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).

Returns
int The integer bitmask representing message control flags.
Value is between 0 and 2047 inclusive

getMessageType

public int getMessageType ()

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

Returns
int The message type, e.g., MESSAGE_TYPE_POLL_DTM.
Value is one of the following:

getNlos

public int getNlos ()

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

Returns
int The NLoS status as ERROR(UwbSpecificData.LineOfSight/android.ranging.uwb.UwbSpecificData#LineOfSight UwbSpecificData.LineOfSight).
Value is one of the following:

getResponderReplyTime

public long getResponderReplyTime ()

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.

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

getRoundIndex

public int getRoundIndex ()

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

This specifies the active ranging round.

Returns
int The round index as an integer.
Value is between 0 and 255 inclusive

getRssi

public int getRssi ()

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.

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

getRxTimestamp

public byte[] getRxTimestamp ()

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).

Returns
byte[] The RX timestamp integer value as a byte array in little endian byte order.
This value cannot be null.

getSuperclusterId

public int getSuperclusterId ()

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.

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

getTxTimestamp

public byte[] getTxTimestamp ()

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

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

Returns
byte[] The TX timestamp integer value as a byte array in little endian byte order.
This value cannot be null.

hasSuperclusterId

public boolean hasSuperclusterId ()

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.

Returns
boolean true if Supercluster ID is present, false otherwise.

hashCode

public int hashCode ()

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by 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.

Returns
int a hash code value for this object.

isTxTimestampInCommonTimeBase

public boolean isTxTimestampInCommonTimeBase ()

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.

Returns
boolean true if the TX timestamp is in the common time base, false otherwise.

toString

public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

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.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following: