[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [marble] src/lib: use GPS timestamp rather than the system's time in gps tracks
From:       Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date:       2012-06-30 19:27:35
Message-ID: 20120630192735.6A3C1A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 885507fd224f613c1b9fd936d528e5eeae5f2bc1 by Bernhard Beschow.
Committed on 30/06/2012 at 21:21.
Pushed by beschow into branch 'master'.

use GPS timestamp rather than the system's time in gps tracks

A GPS timestamp should be more exact than the system's clock.

M  +2    -1    src/lib/PositionTracking.cpp

http://commits.kde.org/marble/885507fd224f613c1b9fd936d528e5eeae5f2bc1

diff --git a/src/lib/PositionTracking.cpp b/src/lib/PositionTracking.cpp
index 4aaf599..0f450a3 100644
--- a/src/lib/PositionTracking.cpp
+++ b/src/lib/PositionTracking.cpp
@@ -73,13 +73,14 @@ void PositionTrackingPrivate::updatePosition()
 
     const GeoDataAccuracy accuracy = m_positionProvider->accuracy();
     const GeoDataCoordinates position = m_positionProvider->position();
+    const QDateTime timestamp = m_positionProvider->timestamp();
 
     if ( m_positionProvider->status() == PositionProviderStatusAvailable ) {
         if ( accuracy.horizontal < 250 ) {
             if ( m_currentTrack->size() ) {
                 m_length += distanceSphere( m_currentTrack->coordinatesAt( \
m_currentTrack->size() - 1 ), position );  }
-            m_currentTrack->addPoint( QDateTime::currentDateTime(), position );
+            m_currentTrack->addPoint( timestamp, position );
         }
 
         //if the position has moved then update the current position


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic