summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2019-11-04 17:59:31 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-04 17:59:31 -0800
commit1a16cbc20ca334b0a0a2793db3aa2984a6b6b66a (patch)
tree3f3d7e60b66ac747274303a552cd3c6056c33ac0 /utils
parent465d7647f0020fc94f1d89cfe0bfd66802b55a0f (diff)
parent7eb1dcf0c743c27dde4814ad6ce22ee50876bbec (diff)
downloadgps-1a16cbc20ca334b0a0a2793db3aa2984a6b6b66a.tar.gz
Merge "GPS NMEA: generate empty GSA sentence for dead reckoning fixes"
Diffstat (limited to 'utils')
-rw-r--r--utils/loc_nmea.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/loc_nmea.cpp b/utils/loc_nmea.cpp
index 61db2be..cf738ba 100644
--- a/utils/loc_nmea.cpp
+++ b/utils/loc_nmea.cpp
@@ -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';