GPS NMEA: generate empty GSA sentence for dead reckoning fixes

For dead reckoning fixes when number of SV used in fix is 0,
we need to generate an empty GSA sentence

CRs-fixed: 2542163

Change-Id: Icb89981d04ecdfeb81fbdc16b2a8d3676319b18d
This commit is contained in:
Wei Chen 2019-10-03 13:29:47 -07:00 committed by Gerrit - the friendly Code Review server
parent 5c568ca1bd
commit 7eb1dcf0c7

View file

@ -1327,6 +1327,14 @@ void loc_nmea_generate_pos(const UlpLocation &location,
talker[1] = sv_meta.talker[1];
}
// if svUsedCount is 0, it means we do not generate any GSA sentence yet.
// in this case, generate an empty GSA sentence
if (svUsedCount == 0) {
strlcpy(sentence, "$GPGSA,A,1,,,,,,,,,,,,,,,,", sizeof(sentence));
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
nmeaArraystr.push_back(sentence);
}
char ggaGpsQuality[3] = {'0', '\0', '\0'};
char rmcModeIndicator = 'N';
char vtgModeIndicator = 'N';