Fix $--RMC sentence
Navigational status should be the last element Change-Id: Ifb201fe95de74e3419e7fe55c55657b41818c64d CRs-fixed: 2140835
This commit is contained in:
parent
08cbff337d
commit
ccd6716531
1 changed files with 10 additions and 3 deletions
|
@ -641,8 +641,7 @@ void loc_nmea_generate_pos(const UlpLocation &location,
|
||||||
pMarker = sentence;
|
pMarker = sentence;
|
||||||
lengthRemaining = sizeof(sentence);
|
lengthRemaining = sizeof(sentence);
|
||||||
|
|
||||||
// hardcode Navigation Status field to 'V'
|
length = snprintf(pMarker, lengthRemaining, "$%sRMC,%02d%02d%02d.%02d,A," ,
|
||||||
length = snprintf(pMarker, lengthRemaining, "$%sRMC,%02d%02d%02d.%02d,A,V" ,
|
|
||||||
talker, utcHours, utcMinutes, utcSeconds,utcMSeconds/10);
|
talker, utcHours, utcMinutes, utcSeconds,utcMSeconds/10);
|
||||||
|
|
||||||
if (length < 0 || length >= lengthRemaining)
|
if (length < 0 || length >= lengthRemaining)
|
||||||
|
@ -790,6 +789,14 @@ void loc_nmea_generate_pos(const UlpLocation &location,
|
||||||
else // A means autonomous
|
else // A means autonomous
|
||||||
length = snprintf(pMarker, lengthRemaining, "%c", 'A');
|
length = snprintf(pMarker, lengthRemaining, "%c", 'A');
|
||||||
|
|
||||||
|
pMarker += length;
|
||||||
|
lengthRemaining -= length;
|
||||||
|
|
||||||
|
// hardcode Navigation Status field to 'V'
|
||||||
|
length = snprintf(pMarker, lengthRemaining, ",%c", 'V');
|
||||||
|
pMarker += length;
|
||||||
|
lengthRemaining -= length;
|
||||||
|
|
||||||
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
|
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
|
||||||
nmeaArraystr.push_back(sentence);
|
nmeaArraystr.push_back(sentence);
|
||||||
|
|
||||||
|
@ -949,7 +956,7 @@ void loc_nmea_generate_pos(const UlpLocation &location,
|
||||||
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
|
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
|
||||||
nmeaArraystr.push_back(sentence);
|
nmeaArraystr.push_back(sentence);
|
||||||
|
|
||||||
strlcpy(sentence, "$GPRMC,,V,,,,,,,,,,N", sizeof(sentence));
|
strlcpy(sentence, "$GPRMC,,V,,,,,,,,,,N,V", sizeof(sentence));
|
||||||
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
|
length = loc_nmea_put_checksum(sentence, sizeof(sentence));
|
||||||
nmeaArraystr.push_back(sentence);
|
nmeaArraystr.push_back(sentence);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue