List Info

Thread: New: bad Interpolation in correlate gpssync




New: bad Interpolation in correlate gpssync
user name
2007-03-29 10:26:39
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.
         
http://bug
s.kde.org/show_bug.cgi?id=143594         
           Summary: bad Interpolation in correlate gpssync
           Product: kipiplugins
           Version: unspecified
          Platform: Mandriva RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kde-imaging kde org
        ReportedBy: shadow.walker free fr


Version:            (using KDE KDE 3.5.6)
Installed from:    Mandriva RPMs
OS:                Linux

when trying to see the result of a gpssync on a map, I found
that points that had been correlated were wrong. I found out
that the code taking care of the correlation was:
point1 + (point2-point1) * (time2-time1)/(timeCor-time1)
(where point can be lat,long or alt)

but it should be:
point1 + (point2-point1) * (timeCor-time1)/(time2-time1)

for example, if you have 2 gps points
 - at time1 0 :   altitude 0
 - at time2 3mn : altitude 30meters
 - a picture taken at timeCor 2mn.

if you take the first formula, you correlate the altitude of
the picture at:
  0 + (30-0) * (3-0)/(2-0)
  that give = 45meters which is obviously wrong

but if you calculate this using the second formula you
obtain:
  0 + (30-0) * (2-0)/(3-0)
  that give = 20meters which is correct


you can test the following patch that correct formula and
rename the t3 variable to tCor to avoid confusion (which
occur each time I reread the formula where t3 is after t1
but before t2)
_______________________________________________
Kde-imaging mailing list
Kde-imagingkde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-imaging

bad Interpolation in correlate gpssync
user name
2007-03-29 10:28:05
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.
         
http://bug
s.kde.org/show_bug.cgi?id=143594         




------- Additional Comments From shadow.walker free fr 
2007-03-29 17:28 -------
Created an attachment (id=20121)
 --> (http://bugs.kde.org/attachment.cgi?id=20121&actio
n=view)
interpolation fix in gpssync

patch for fix the interrpolation formula and rename variable
t3 to tCor for
more readability
_______________________________________________
Kde-imaging mailing list
Kde-imagingkde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-imaging

bad Interpolation in correlate gpssync
user name
2007-03-29 10:40:14
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.
         
http://bug
s.kde.org/show_bug.cgi?id=143594         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
------------------------------------------------------------
----------------
                 CC|                            |gerhard
kulzer net



------- Additional Comments From caulier.gilles gmail com 
2007-03-29 17:40 -------
Gerhard,

Like you have a GPS device, can you confirm this bug ? If
yes, can you test the patch and apply it on svn ?

Thanks in advance

Gilles
_______________________________________________
Kde-imaging mailing list
Kde-imagingkde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-imaging

bad Interpolation in correlate gpssync
user name
2007-03-30 03:12:47
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.
         
http://bug
s.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;
             }
_______________________________________________
Kde-imaging mailing list
Kde-imagingkde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-imaging

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )