summaryrefslogtreecommitdiff
path: root/android/1.0/location_api/LocationUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'android/1.0/location_api/LocationUtil.cpp')
-rw-r--r--android/1.0/location_api/LocationUtil.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/android/1.0/location_api/LocationUtil.cpp b/android/1.0/location_api/LocationUtil.cpp
index 7bbc064..870a8aa 100644
--- a/android/1.0/location_api/LocationUtil.cpp
+++ b/android/1.0/location_api/LocationUtil.cpp
@@ -157,7 +157,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;
@@ -169,8 +173,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:
@@ -189,7 +191,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;
@@ -205,8 +207,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: