Merge "Adding SBAS offset to Gps/Gnss SvStatus converter" into nyc-dev
am: 0f6363e8b3
* commit '0f6363e8b3b091508181ea6cef5f5f87a4f75016':
Adding SBAS offset to Gps/Gnss SvStatus converter
Change-Id: If32179b0ea76b730b4944d0e487abf9427a69bc5
This commit is contained in:
@@ -34,6 +34,7 @@ public final class GpsStatus {
|
|||||||
private static final int NUM_SATELLITES = 255;
|
private static final int NUM_SATELLITES = 255;
|
||||||
private static final int GLONASS_SVID_OFFSET = 64;
|
private static final int GLONASS_SVID_OFFSET = 64;
|
||||||
private static final int BEIDOU_SVID_OFFSET = 200;
|
private static final int BEIDOU_SVID_OFFSET = 200;
|
||||||
|
private static final int SBAS_SVID_OFFSET = -87;
|
||||||
|
|
||||||
/* These package private values are modified by the LocationManager class */
|
/* These package private values are modified by the LocationManager class */
|
||||||
private int mTimeToFirstFix;
|
private int mTimeToFirstFix;
|
||||||
@@ -166,9 +167,10 @@ public final class GpsStatus {
|
|||||||
prn += GLONASS_SVID_OFFSET;
|
prn += GLONASS_SVID_OFFSET;
|
||||||
} else if (constellationType == GnssStatus.CONSTELLATION_BEIDOU) {
|
} else if (constellationType == GnssStatus.CONSTELLATION_BEIDOU) {
|
||||||
prn += BEIDOU_SVID_OFFSET;
|
prn += BEIDOU_SVID_OFFSET;
|
||||||
|
} else if (constellationType == GnssStatus.CONSTELLATION_SBAS) {
|
||||||
|
prn += SBAS_SVID_OFFSET;
|
||||||
} else if ((constellationType != GnssStatus.CONSTELLATION_GPS) &&
|
} else if ((constellationType != GnssStatus.CONSTELLATION_GPS) &&
|
||||||
(constellationType != GnssStatus.CONSTELLATION_QZSS) &&
|
(constellationType != GnssStatus.CONSTELLATION_QZSS)) {
|
||||||
(constellationType != GnssStatus.CONSTELLATION_SBAS)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (prn > 0 && prn <= NUM_SATELLITES) {
|
if (prn > 0 && prn <= NUM_SATELLITES) {
|
||||||
|
|||||||
@@ -72,15 +72,18 @@ static const GnssConfigurationInterface* sGnssConfigurationInterface = NULL;
|
|||||||
#define GPS_MAX_SATELLITE_COUNT 32
|
#define GPS_MAX_SATELLITE_COUNT 32
|
||||||
#define GNSS_MAX_SATELLITE_COUNT 64
|
#define GNSS_MAX_SATELLITE_COUNT 64
|
||||||
|
|
||||||
// Let these through, with ID remapped by offset
|
// Let these through, with ID remapped down to 1, 2... by offset
|
||||||
#define GLONASS_SVID_OFFSET 64
|
#define GLONASS_SVID_OFFSET 64
|
||||||
#define GLONASS_SVID_COUNT 24
|
#define GLONASS_SVID_COUNT 24
|
||||||
#define BEIDOU_SVID_OFFSET 200
|
#define BEIDOU_SVID_OFFSET 200
|
||||||
#define BEIDOU_SVID_COUNT 35
|
#define BEIDOU_SVID_COUNT 35
|
||||||
|
|
||||||
|
// Let these through, with ID remapped up (33->120 ... 64->151, etc.)
|
||||||
|
#define SBAS_SVID_MIN 33
|
||||||
|
#define SBAS_SVID_MAX 64
|
||||||
|
#define SBAS_SVID_ADD 87
|
||||||
|
|
||||||
// Let these through, with no ID remapping
|
// Let these through, with no ID remapping
|
||||||
#define SBAS_SVID_MIN 120
|
|
||||||
#define SBAS_SVID_MAX 151
|
|
||||||
#define QZSS_SVID_MIN 193
|
#define QZSS_SVID_MIN 193
|
||||||
#define QZSS_SVID_MAX 200
|
#define QZSS_SVID_MAX 200
|
||||||
|
|
||||||
@@ -159,6 +162,7 @@ static void sv_status_callback(GpsSvStatus* sv_status)
|
|||||||
info.svid -= BEIDOU_SVID_OFFSET;
|
info.svid -= BEIDOU_SVID_OFFSET;
|
||||||
} else if (info.svid >= SBAS_SVID_MIN && info.svid <= SBAS_SVID_MAX) {
|
} else if (info.svid >= SBAS_SVID_MIN && info.svid <= SBAS_SVID_MAX) {
|
||||||
info.constellation = GNSS_CONSTELLATION_SBAS;
|
info.constellation = GNSS_CONSTELLATION_SBAS;
|
||||||
|
info.svid += SBAS_SVID_ADD;
|
||||||
} else if (info.svid >= QZSS_SVID_MIN && info.svid <= QZSS_SVID_MAX) {
|
} else if (info.svid >= QZSS_SVID_MIN && info.svid <= QZSS_SVID_MAX) {
|
||||||
info.constellation = GNSS_CONSTELLATION_QZSS;
|
info.constellation = GNSS_CONSTELLATION_QZSS;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user