Summary: | bad Interpolation in correlate gpssync | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Stéphane Pontier <shadow.walker> |
Component: | Geolocation-Correlator | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, gerhard |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.1.0 | |
Sentry Crash Report: | |||
Attachments: | interpolation fix in gpssync |
Description
Stéphane Pontier
2007-03-29 17:26:38 UTC
Created attachment 20121 [details]
interpolation fix in gpssync
patch for fix the interrpolation formula and rename variable t3 to tCor for
more readability
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 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; } |