diff options
Diffstat (limited to 'utils/loc_nmea.cpp')
-rw-r--r-- | utils/loc_nmea.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/loc_nmea.cpp b/utils/loc_nmea.cpp index 1dcbedd..6b5e60e 100644 --- a/utils/loc_nmea.cpp +++ b/utils/loc_nmea.cpp @@ -864,11 +864,17 @@ static void loc_nmea_generate_GSV(const GnssSvNotification &svNotify, if (GNSS_SV_TYPE_SBAS == svNotify.gnssSvs[svNumber - 1].type) { svIdOffset = SBAS_SV_ID_OFFSET; } - length = snprintf(pMarker, lengthRemaining,",%02d,%02d,%03d,", + if (GNSS_SV_TYPE_GLONASS == svNotify.gnssSvs[svNumber - 1].type && + GLO_SV_PRN_SLOT_UNKNOWN == svNotify.gnssSvs[svNumber - 1].svId) { + length = snprintf(pMarker, lengthRemaining, ",,%02d,%03d,", + (int)(0.5 + svNotify.gnssSvs[svNumber - 1].elevation), //float to int + (int)(0.5 + svNotify.gnssSvs[svNumber - 1].azimuth)); //float to int + } else { + length = snprintf(pMarker, lengthRemaining, ",%02d,%02d,%03d,", svNotify.gnssSvs[svNumber - 1].svId - svIdOffset, (int)(0.5 + svNotify.gnssSvs[svNumber - 1].elevation), //float to int (int)(0.5 + svNotify.gnssSvs[svNumber - 1].azimuth)); //float to int - + } if (length < 0 || length >= lengthRemaining) { LOC_LOGE("NMEA Error in string formatting"); |