[Kde-imaging] [Bug 143594] bad Interpolation in correlate gpssync

Gerhard Kulzer gerhard at kulzer.net
Fri Mar 30 10:12:47 CEST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=143594         
gerhard kulzer net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From gerhard kulzer net  2007-03-30 10:12 -------
SVN commit 648020 by gkulzer:

correcting interpolation
CCMAIL:caulier.gilles gmail com, shadow.walker free fr
BUG:143594

 M  +5 -5      gpsdataparser.cpp  


--- trunk/extragear/libs/kipi-plugins/gpssync/gpsdataparser.cpp #648019:648020
 @ -113,13 +113,13  @
             double lon2 = nextGPSPoint.longitude();
             double lat2 = nextGPSPoint.latitude();
             uint   t2   = nextDateTime.toTime_t();
-            uint   t3   = cameraGMTDateTime.toTime_t();
+            uint   tCor   = cameraGMTDateTime.toTime_t();
 
-            if (t3-t1 != 0)  
+            if (tCor-t1 != 0)  
             {
-                gpsData.setAltitude(alt1  + (alt2-alt1) * (t2-t1)/(t3-t1));
-                gpsData.setLatitude(lat1  + (lat2-lat1) * (t2-t1)/(t3-t1));
-                gpsData.setLongitude(lon1 + (lon2-lon1) * (t2-t1)/(t3-t1));
+                gpsData.setAltitude(alt1  + (alt2-alt1) * (tCor-t1)/(t2-t1));
+                gpsData.setLatitude(lat1  + (lat2-lat1) * (tCor-t1)/(t2-t1));
+                gpsData.setLongitude(lon1 + (lon2-lon1) * (tCor-t1)/(t2-t1));
                 gpsData.setInterpolated(true);
                 return true;
             }


More information about the Kde-imaging mailing list