Summary: | GPS Sync: not optimal correlation | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Fabien <fabien.ubuntu> |
Component: | Geolocation-Correlator | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.1.0 | |
Sentry Crash Report: | |||
Attachments: |
picture with no GPS tags
picture with no GPS tags Picture with GPS tags GPX file Small and dirty patch |
Description
Fabien
2006-09-27 15:52:27 UTC
Created attachment 17939 [details]
picture with no GPS tags
Created attachment 17940 [details]
picture with no GPS tags
Created attachment 17941 [details]
Picture with GPS tags
Created attachment 17942 [details]
GPX file
Created attachment 17943 [details]
Small and dirty patch
This is a very dirty hack to get the best gps values...
BTW, timezone is GMT+2 Fabien, 3 images are the same with the same date ! Gilles SVN commit 590452 by cgilles: kipi-plugins from trunk : GPSSync : optimize GPX data parsing to search the minimal diff time. Fabien, your patch is not optimum because it don't check all items in the list. In fact if the date list of GPS point isn't sorted using time stamp, your optimization don't work. Of course i will very surprise if the gps data list is not sorted in time (:=))). But like I have none experience with GPS data, we must care about this point. Please test this patch indeep and give me your feedback. Thanks in advance. CCBUGS: 134747 M +9 -3 gpsdataparser.cpp --- trunk/extragear/libs/kipi-plugins/gpssync/gpsdataparser.cpp #590451:590452 @@ -68,6 +68,8 @@ QDateTime cameraGMTDateTime = photoDateTime.addSecs(timeZone*3600*(-1)); // We trying to find the right date in the GPS points list. + bool findItem = false; + int nbSecItem = maxGapTime; for (GPSDataMap::Iterator it = m_GPSDataMap.begin(); it != m_GPSDataMap.end(); ++it ) @@ -77,13 +79,17 @@ int nbSecs = abs(cameraGMTDateTime.secsTo( it.key() )); - if( nbSecs < maxGapTime ) + // We tring to find the minimal accuracy. + if( nbSecs < maxGapTime && nbSecs < nbSecItem) { - gpsData = m_GPSDataMap[it.key()]; - return true; + gpsData = m_GPSDataMap[it.key()]; + findItem = true; + nbSecItem = nbSecs; } } + if (findItem) return true; + // If we can't find it, we will trying to interpolate the GPS point. if (interpolate) Fabien, Can you give me a fresh feedback about my last fix ? Its work fine for you ? Gilles Hello, Sorry for this late answer... Yes, it's working really fine ! I tried with different gpx files containing 1 or more tracks and it's ok ! I even tried to merge in a single gpx file 2 tracks from 2 different GPSr taken at the same time (so with the same dates) and it works perfectly fine : the best position is taken between the 2 tracks. So, it looks really ok for me ! Thanks a lot Gilles ! ok. Thanks for the report Fabien. I close this file now. Gilles Caulier |