diff options
Diffstat (limited to 'android/2.0/location_api/LocationUtil.cpp')
-rw-r--r-- | android/2.0/location_api/LocationUtil.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/android/2.0/location_api/LocationUtil.cpp b/android/2.0/location_api/LocationUtil.cpp index 0742f27..961b7b1 100644 --- a/android/2.0/location_api/LocationUtil.cpp +++ b/android/2.0/location_api/LocationUtil.cpp @@ -217,7 +217,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; @@ -229,8 +233,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: @@ -249,7 +251,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; @@ -265,8 +267,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: |