mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
QML UI: GPS location service - only show the fixes we store
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9a62685f0b
commit
b1037abdb7
1 changed files with 2 additions and 2 deletions
|
@ -118,8 +118,6 @@ void GpsLocation::newPosition(QGeoPositionInfo pos)
|
|||
{
|
||||
int64_t lastTime;
|
||||
QGeoCoordinate lastCoord;
|
||||
QString msg("received new position %1");
|
||||
status(qPrintable(msg.arg(pos.coordinate().toString())));
|
||||
int nr = m_trackers.count();
|
||||
if (nr) {
|
||||
gpsTracker gt = m_trackers.last();
|
||||
|
@ -133,6 +131,8 @@ void GpsLocation::newPosition(QGeoPositionInfo pos)
|
|||
if (!nr || waitingForPosition ||
|
||||
(int64_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
|
||||
lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) {
|
||||
QString msg("received new position %1");
|
||||
status(qPrintable(msg.arg(pos.coordinate().toString())));
|
||||
waitingForPosition = false;
|
||||
gpsTracker gt;
|
||||
gt.when = pos.timestamp().toTime_t();
|
||||
|
|
Loading…
Add table
Reference in a new issue