Skip to content

Commit

Permalink
[gps] Correctly set initial value of hoz/vert accuracy and direction …
Browse files Browse the repository at this point in the history
…as not available
  • Loading branch information
nyalldawson committed Dec 5, 2019
1 parent 6a72939 commit d182cf2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions python/core/auto_generated/gps/qgsgpsconnection.sip.in
Expand Up @@ -44,7 +44,9 @@ struct QgsGpsInformation
double pdop;
double hdop;
double vdop;
//! Horizontal accuracy in meters
double hacc;
//! Vertical accuracy in meters
double vacc;
QDateTime utcDateTime;
QChar fixMode;
Expand Down
19 changes: 16 additions & 3 deletions src/core/gps/qgsgpsconnection.h
Expand Up @@ -61,13 +61,26 @@ struct CORE_EXPORT QgsGpsInformation
double longitude = 0;
double elevation = 0;
double speed = 0; //in km/h
double direction = 0;
#ifndef SIP_RUN
double direction = std::numeric_limits< double >::quiet_NaN();
#else
double direction;
#endif
QList<QgsSatelliteInfo> satellitesInView;
double pdop = 0;
double hdop = 0;
double vdop = 0;
double hacc = -1; //horizontal accuracy in meters
double vacc = -1; //vertical accuracy in meters
#ifndef SIP_RUN
//! Horizontal accuracy in meters
double hacc = std::numeric_limits< double >::quiet_NaN();
//! Vertical accuracy in meters
double vacc = std::numeric_limits< double >::quiet_NaN();
#else
//! Horizontal accuracy in meters
double hacc;
//! Vertical accuracy in meters
double vacc;
#endif
QDateTime utcDateTime;
QChar fixMode;
int fixType = 0; // valid values: 1,2,3
Expand Down

0 comments on commit d182cf2

Please sign in to comment.