[Marble-commits] KDE/kdeedu/marble/src/lib/gps

Dennis Nienhüser earthwings at gentoo.org
Sun Nov 15 17:38:53 CET 2009


SVN commit 1049655 by nienhueser:

Altitude needs to be set here as well, otherwise the speed estimation gets confused by seemingly changing positions


 M  +6 -4      PositionTracking.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/gps/PositionTracking.cpp #1049654:1049655
@@ -170,10 +170,12 @@
     QPointF previousPosition;
 
     //FIXME: this is a workaround for dealing with NAN values. we need to protect against that in the future
-    m_gpsCurrentPosition->setPosition( m_gpsCurrentPosition->position().latitude(GeoDataCoordinates::Degree),
-                                       m_gpsCurrentPosition->position().longitude( GeoDataCoordinates::Degree ) );
-    m_gpsPreviousPosition->setPosition( m_gpsPreviousPosition->position().latitude(GeoDataCoordinates::Degree),
-                                       m_gpsPreviousPosition->position().longitude( GeoDataCoordinates::Degree ) );
+    m_gpsCurrentPosition->setPosition( GeoDataCoordinates ( m_gpsCurrentPosition->position().longitude(GeoDataCoordinates::Degree),
+                                       m_gpsCurrentPosition->position().latitude( GeoDataCoordinates::Degree ),
+                                       m_gpsCurrentPosition->position().altitude(), GeoDataCoordinates::Degree ) );
+    m_gpsPreviousPosition->setPosition( GeoDataCoordinates ( m_gpsPreviousPosition->position().longitude(GeoDataCoordinates::Degree),
+                                       m_gpsPreviousPosition->position().latitude( GeoDataCoordinates::Degree ),
+                                       m_gpsPreviousPosition->position().altitude(), GeoDataCoordinates::Degree) );
 
 
     m_gpsCurrentPosition->getPixelPos( canvasSize, viewParams, &position );


More information about the Marble-commits mailing list