summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Han Yang <yuhany@google.com>2019-12-20 11:48:00 -0800
committerYu-Han Yang <yuhany@google.com>2020-01-08 12:19:34 -0800
commitcb162534b66bf2685d7c8b54d471c4d0c841f36a (patch)
tree0647184d7ff803d193fefb185e05b197432db652
parent06194d4dc77dfcd9bfe5950b499ff12d7cdef192 (diff)
Make cN0Db and basebandCn0Db ranges consistent with HAL
Bug: 136136192 Test: existing tests passing Change-Id: I7ffc40f7f00e3d5e141d10025de6fe7886c61ba7
-rw-r--r--api/current.txt4
-rw-r--r--location/java/android/location/GnssMeasurement.java9
2 files changed, 8 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt
index 86aa80b159bd..106caa212e10 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -23199,12 +23199,12 @@ package android.location {
method public int getAccumulatedDeltaRangeState();
method public double getAccumulatedDeltaRangeUncertaintyMeters();
method public double getAutomaticGainControlLevelDb();
- method @FloatRange(from=0, to=50) public double getBasebandCn0DbHz();
+ method @FloatRange(from=0, to=63) public double getBasebandCn0DbHz();
method @Deprecated public long getCarrierCycles();
method public float getCarrierFrequencyHz();
method @Deprecated public double getCarrierPhase();
method @Deprecated public double getCarrierPhaseUncertainty();
- method public double getCn0DbHz();
+ method @FloatRange(from=0, to=63) public double getCn0DbHz();
method @NonNull public String getCodeType();
method public int getConstellationType();
method public int getMultipathIndicator();
diff --git a/location/java/android/location/GnssMeasurement.java b/location/java/android/location/GnssMeasurement.java
index 70abbb3019fc..3eeb3a2051e9 100644
--- a/location/java/android/location/GnssMeasurement.java
+++ b/location/java/android/location/GnssMeasurement.java
@@ -778,10 +778,12 @@ public final class GnssMeasurement implements Parcelable {
/**
* Gets the Carrier-to-noise density in dB-Hz.
*
- * <p>Typical range: 10-50 db-Hz.
+ * <p>Typical range: 10-50 dB-Hz. The range of possible C/N0 values is 0-63 dB-Hz to handle
+ * some edge cases.
*
* <p>The value contains the measured C/N0 for the signal at the antenna input.
*/
+ @FloatRange(from = 0, to = 63)
public double getCn0DbHz() {
return mCn0DbHz;
}
@@ -805,13 +807,14 @@ public final class GnssMeasurement implements Parcelable {
/**
* Gets the baseband carrier-to-noise density in dB-Hz.
*
- * <p>Typical range: 0-50 dB-Hz.
+ * <p>Typical range: 10-50 dB-Hz. The range of possible baseband C/N0 values is 0-63 dB-Hz to
+ * handle some edge cases.
*
* <p>The value contains the measured C/N0 for the signal at the baseband. This is typically
* a few dB weaker than the value estimated for C/N0 at the antenna port, which is reported
* in {@link #getCn0DbHz()}.
*/
- @FloatRange(from = 0, to = 50)
+ @FloatRange(from = 0, to = 63)
public double getBasebandCn0DbHz() {
return mBasebandCn0DbHz;
}