Skip to content

Commit

Permalink
Don't overwrite good gps headings (e.g. from a GPHDT message) with n/…
Browse files Browse the repository at this point in the history
…a values from another message

(cherry picked from commit 6a72939)
  • Loading branch information
nyalldawson authored and nirvn committed Dec 6, 2019
1 parent d752bd5 commit c396c0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/gps/qgsnmeaconnection.cpp
Expand Up @@ -223,7 +223,8 @@ void QgsNmeaConnection::processRmcSentence( const char *data, int len )
mLastGPSInformation.longitude = nmea_ndeg2degree( longitude );
mLastGPSInformation.latitude = nmea_ndeg2degree( latitude );
mLastGPSInformation.speed = KNOTS_TO_KMH * result.speed;
mLastGPSInformation.direction = result.direction;
if ( !std::isnan( result.direction ) )
mLastGPSInformation.direction = result.direction;
mLastGPSInformation.status = result.status; // A,V

//date and time
Expand Down

0 comments on commit c396c0b

Please sign in to comment.