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

Dennis Nienhüser earthwings at gentoo.org
Sun Nov 15 18:04:24 CET 2009


SVN commit 1049668 by nienhueser:

Forward available altitude values to the UI.
Altitude needs to be set here as well, otherwise the speed estimation gets confused by seemingly changing positions. Backport of commit 1048806 and 1049655
BUG: 202162



 M  +2 -1      GpsTracking.cpp  
 M  +9 -6      PositionTracking.cpp  


--- branches/KDE/4.3/kdeedu/marble/src/lib/gps/GpsTracking.cpp #1049667:1049668
@@ -207,7 +207,8 @@
         if ( m_gpsdData != 0 ){
             m_gpsdData =m_gpsd->query( "p" );
             m_gpsTracking->setPosition( m_gpsdData->fix.latitude,
-                                        m_gpsdData->fix.longitude );
+                                        m_gpsdData->fix.longitude,
+                                        m_gpsdData->fix.altitude );
 
             if (m_gpsTrackSeg == 0 ){
                 m_gpsTrackSeg = new TrackSegment();
--- branches/KDE/4.3/kdeedu/marble/src/lib/gps/PositionTracking.cpp #1049667:1049668
@@ -119,8 +119,9 @@
         PositionProviderStatusAvailable )
     {
         m_gpsTracking->setPosition( m_positionProvider->position() );
-        m_gpsTracking->setPosition( m_gpsTracking->position().latitude(GeoDataCoordinates::Degree),
-                                       m_gpsTracking->position().longitude( GeoDataCoordinates::Degree ) );
+        m_gpsTracking->setPosition( GeoDataCoordinates ( m_gpsTracking->position().longitude(GeoDataCoordinates::Degree),
+                                    m_gpsTracking->position().latitude( GeoDataCoordinates::Degree ),
+                                    m_gpsTracking->position().altitude(), GeoDataCoordinates::Degree ) );
 
 
         if (m_gpsTrackSeg == 0 ) {
@@ -167,10 +168,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