[Digikam-devel] GPS wrong coordinate conversion?

Arnd Baecker arnd.baecker at web.de
Sat Sep 9 10:19:57 BST 2006


Hi Gilles,

On Sat, 9 Sep 2006, Caulier Gilles wrote:

> Le Vendredi 08 Septembre 2006 05:43 PM, Arnd Baecker a écrit :
> > Hi,
> >
> > maybe I am wrong, but I think that the conversion in the example
> > given at
> > http://docs.kde.org/development/en/extragear-graphics/digikam/using-kapp-ca
> >mera.html#using-kapp-gps is not correct:
> >
> > """The positional data (e.g. 13.44088333) must be converted into H.MS
> > format (13.235990) and split into its constituents as shown in the given
> > example."""
> >
> > which leads to the entry
> >   add Exif.GPSInfo.GPSLatitude Rational "13/1 23/1 5990/100"
> >
> > Doesn't 13.44088333 convert to: 13 26 27.18:
> >   int(13.44088333)       = 13
> >   int(0.44088333*60)     = 26
> >   (0.44088333*60-26) *60 = 27.18
> >
> > The converter at http://www2.comp.polyu.edu.hk/~04329143d/Location.html
> > also gives these numbers.
> > If this is correct, it should read
> >   add Exif.GPSInfo.GPSLatitude Rational "13/1 26/1 2718/100"
> >
> > The other way round, "13/1 23/1 5990/100"
> > would correspond to: 13.399972.
> >
> > Best, Arnd
>
> Arnd,
>
> The code relevant of GPS position decoding is in this source file :
>
> http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/widgets/metadata/gpswidget.cpp?rev=580664&view=auto
>
> Look the method decodeGPSPosition() at end of file.

I think that the code in the routine PSWidget::decodeGPSPosition
is alright.
It is just the example in the documentation which I cannot reproduce
(Maybe I am messing up things, as I don't have any experience
with GPS and all the coordinate stuff...).

> I'm busy this week end to check if something is wrong...

No problem - nothing urgent anyway ;-)

> Gerhard, can you check this part please. Thanks in advance.

I just checked the GPS plugin with two different places
(using exiv2 to add GPS info) and it seems to work fine
(of course I cannot check it precisely due to the lack of zooming
and also not to the accuracy of a few meters
because of the scale of the map - don't  get me wrong, no criticism
here, I know that further GPS stuff is post 0.9, and all this is a
great start!!)

Many thanks, Arnd




More information about the Digikam-devel mailing list