Added debug messages for SV Info

Added constellation field in the debug messages for SV Info

Change-Id: Ie02b1284cc5c24f526c82c52ff1ecda066655aac
CRs-fixed: 1013650
This commit is contained in:
Mike Cailean 2016-07-22 17:35:40 -07:00
parent 8e217e229d
commit fae54f18a2

View file

@ -258,24 +258,35 @@ void LocApiBase::reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended, GpsLocationExtended &locationExtended,
void* svExt) void* svExt)
{ {
const char* constellationString[] = { "Unknown", "GPS", "SBAS", "GLONASS",
"QZSS", "BEIDOU", "GALILEO" };
// print the SV info before delivering // print the SV info before delivering
LOC_LOGV("num sv: %d", svStatus.num_svs); LOC_LOGV("num sv: %d\n"
" sv: constellation svid cN0"
" elevation azimuth flags",
svStatus.num_svs);
for (int i = 0; i < svStatus.num_svs && i < GNSS_MAX_SVS; i++) { for (int i = 0; i < svStatus.num_svs && i < GNSS_MAX_SVS; i++) {
LOC_LOGV(" %03d: %02d %d %f %f %f 0x%02X", if (svStatus.gnss_sv_list[i].constellation >
i, sizeof(constellationString) / sizeof(constellationString[0]) - 1) {
svStatus.gnss_sv_list[i].svid, svStatus.gnss_sv_list[i].constellation = 0;
svStatus.gnss_sv_list[i].constellation, }
svStatus.gnss_sv_list[i].c_n0_dbhz, LOC_LOGV(" %03d: %*s %02d %f %f %f 0x%02X",
svStatus.gnss_sv_list[i].elevation, i,
svStatus.gnss_sv_list[i].azimuth, 13,
svStatus.gnss_sv_list[i].flags); constellationString[svStatus.gnss_sv_list[i].constellation],
svStatus.gnss_sv_list[i].svid,
svStatus.gnss_sv_list[i].c_n0_dbhz,
svStatus.gnss_sv_list[i].elevation,
svStatus.gnss_sv_list[i].azimuth,
svStatus.gnss_sv_list[i].flags);
} }
// loop through adapters, and deliver to all adapters. // loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS( TO_ALL_LOCADAPTERS(
mLocAdapters[i]->reportSv(svStatus, mLocAdapters[i]->reportSv(svStatus,
locationExtended, locationExtended,
svExt) svExt)
); );
} }
void LocApiBase::reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet) void LocApiBase::reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet)