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

Stéphane Pontier shadow.walker at free.fr
Thu Mar 29 17:26:39 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         
           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)


More information about the Kde-imaging mailing list