diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2021-01-23 22:06:11 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2021-01-23 22:06:11 -0800 |
commit | 3a45bce09376ea4ea86ccc414f65d0c8ef441178 (patch) | |
tree | 27c7cf3780d1f4ff5a2fb9b602288671b7ce737a /android/2.1/location_api/LocationUtil.cpp | |
parent | 67346ca8894725ddd8d5e2f80d702ce05f30d655 (diff) | |
parent | fd1721bc52c2595d6fc143425c1a6e68ca9201d8 (diff) |
Merge fd1721bc52c2595d6fc143425c1a6e68ca9201d8 on remote branch
Change-Id: I20f9ad1b3250e8a4fd2f7a906e223c190cc28bec
Diffstat (limited to 'android/2.1/location_api/LocationUtil.cpp')
-rw-r--r-- | android/2.1/location_api/LocationUtil.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/android/2.1/location_api/LocationUtil.cpp b/android/2.1/location_api/LocationUtil.cpp index e5b49b2..5154e70 100644 --- a/android/2.1/location_api/LocationUtil.cpp +++ b/android/2.1/location_api/LocationUtil.cpp @@ -218,7 +218,11 @@ void convertGnssSvid(GnssSv& in, int16_t& out) out = in.svId; break; case GNSS_SV_TYPE_GLONASS: - out = in.svId - GLO_SV_PRN_MIN + 1; + if (!isGloSlotUnknown(in.svId)) { // OSN is known + out = in.svId - GLO_SV_PRN_MIN + 1; + } else { // OSN is not known, report FCN + out = in.gloFrequency + 92; + } break; case GNSS_SV_TYPE_QZSS: out = in.svId; @@ -230,8 +234,6 @@ void convertGnssSvid(GnssSv& in, int16_t& out) out = in.svId - GAL_SV_PRN_MIN + 1; break; case GNSS_SV_TYPE_NAVIC: - /*Android doesn't define Navic svid range yet, use Naviv svid [1, 14] now - will update this once Android give Navic svid definiitons */ out = in.svId - NAVIC_SV_PRN_MIN + 1; break; default: @@ -250,7 +252,7 @@ void convertGnssSvid(GnssMeasurementsData& in, int16_t& out) out = in.svId; break; case GNSS_SV_TYPE_GLONASS: - if (in.svId != 255) { // OSN is known + if (!isGloSlotUnknown(in.svId)) { // OSN is known out = in.svId - GLO_SV_PRN_MIN + 1; } else { // OSN is not known, report FCN out = in.gloFrequency + 92; @@ -266,8 +268,6 @@ void convertGnssSvid(GnssMeasurementsData& in, int16_t& out) out = in.svId - GAL_SV_PRN_MIN + 1; break; case GNSS_SV_TYPE_NAVIC: - /*Android doesn't define Navic svid range yet, use Naviv svid [1, 14] now - will update this once Android give Navic svid definiitons */ out = in.svId - NAVIC_SV_PRN_MIN + 1; break; default: |