diff options
author | Sasha Kuznetsov <sashakuznetsov@google.com> | 2020-02-11 18:17:06 -0800 |
---|---|---|
committer | Sasha Kuznetsov <sashakuznetsov@google.com> | 2020-02-13 15:11:41 -0800 |
commit | 20ba50645cf1a5abd2692b035f6d47d68ca76638 (patch) | |
tree | 6b3e0f0cfda019104559cb889f4b873d87439f70 /location | |
parent | 0946037764e60d43a6abfcf0c9a1cb3fda54235e (diff) |
Clarify environment bearing docs in framework API
Bug: 149299473
Test: build cuttlefish
Change-Id: Iab7ce87fb872ba4a356633cde3835aa41b29443c
Diffstat (limited to 'location')
-rw-r--r-- | location/java/android/location/GnssMeasurementCorrections.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/location/java/android/location/GnssMeasurementCorrections.java b/location/java/android/location/GnssMeasurementCorrections.java index 19c3992ebed3..ffbe11a8ca31 100644 --- a/location/java/android/location/GnssMeasurementCorrections.java +++ b/location/java/android/location/GnssMeasurementCorrections.java @@ -179,6 +179,10 @@ public final class GnssMeasurementCorrections implements Parcelable { * Gets the environment bearing in degrees clockwise from true north, in the direction of user * motion. Environment bearing is provided when it is known with high probability that * velocity is aligned with an environment feature (such as edge of a building, or road). + * + * {@link #hasEnvironmentBearing} should be called to check the environment bearing is available + * before calling this method. The value is undefined if {@link #hasEnvironmentBearing} returns + * false. */ @FloatRange(from = 0.0f, to = 360.0f) public float getEnvironmentBearingDegrees() { @@ -186,7 +190,15 @@ public final class GnssMeasurementCorrections implements Parcelable { } /** - * Gets the environment bearing uncertainty in degrees. + * Gets the environment bearing uncertainty in degrees. It represents the standard deviation of + * the physical structure in the circle of position uncertainty. The uncertainty can take values + * between 0 and 180 degrees. The {@link #hasEnvironmentBearing} becomes false as the + * uncertainty value passes a predefined threshold depending on the physical structure around + * the user. + * + * {@link #hasEnvironmentBearing} should be called to check the environment bearing is available + * before calling this method. The value is undefined if {@link #hasEnvironmentBearing} returns + * false. */ @FloatRange(from = 0.0f, to = 180.0f) public float getEnvironmentBearingUncertaintyDegrees() { @@ -358,6 +370,8 @@ public final class GnssMeasurementCorrections implements Parcelable { * user motion. Environment bearing is provided when it is known with high probability * that velocity is aligned with an environment feature (such as edge of a building, or * road). + * + * Both the bearing and uncertainty must be set for the environment bearing to be valid. */ @NonNull public Builder setEnvironmentBearingDegrees( @FloatRange(from = 0.0f, to = 360.0f) @@ -369,6 +383,8 @@ public final class GnssMeasurementCorrections implements Parcelable { /** * Sets the environment bearing uncertainty in degrees. + * + * Both the bearing and uncertainty must be set for the environment bearing to be valid. */ @NonNull public Builder setEnvironmentBearingUncertaintyDegrees( @FloatRange(from = 0.0f, to = 180.0f) |