mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +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;
|
int64_t lastTime;
|
||||||
QGeoCoordinate lastCoord;
|
QGeoCoordinate lastCoord;
|
||||||
QString msg("received new position %1");
|
|
||||||
status(qPrintable(msg.arg(pos.coordinate().toString())));
|
|
||||||
int nr = m_trackers.count();
|
int nr = m_trackers.count();
|
||||||
if (nr) {
|
if (nr) {
|
||||||
gpsTracker gt = m_trackers.last();
|
gpsTracker gt = m_trackers.last();
|
||||||
|
@ -133,6 +131,8 @@ void GpsLocation::newPosition(QGeoPositionInfo pos)
|
||||||
if (!nr || waitingForPosition ||
|
if (!nr || waitingForPosition ||
|
||||||
(int64_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
|
(int64_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
|
||||||
lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) {
|
lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) {
|
||||||
|
QString msg("received new position %1");
|
||||||
|
status(qPrintable(msg.arg(pos.coordinate().toString())));
|
||||||
waitingForPosition = false;
|
waitingForPosition = false;
|
||||||
gpsTracker gt;
|
gpsTracker gt;
|
||||||
gt.when = pos.timestamp().toTime_t();
|
gt.when = pos.timestamp().toTime_t();
|
||||||
|
|
Loading…
Add table
Reference in a new issue