GPS coordinate parsing
dirk at hohndel.org
Tue Dec 24 07:34:05 UTC 2013
On Tue, 2013-12-24 at 15:27 +0200, Willem Ferguson wrote:
> I run 4.0-45-ga2bf4e76e465. I may be doing it wrongly, but the program
> only appears to take the conventional coordinate format, not any of the
> new ones.
So yes, that's the correct version.
If you edit a dive, the first and third of the strings below should work
(and give a roughly similar location in Palau). The second one actually
shows a bug in my code (how ironic). For now it will work if you add
decimals to the seconds:
N7° 16' 17.0" , E134° 14' 44.0"
I'll fix that in the code.
Thanks for catching this!
> On 24/12/2013 01:14, Dirk Hohndel wrote:
> > I just pushed a commit that attempts to improve the parsing of GPS
> > coordinates:
> > We used to only support full degrees and decimal minutes. We now also
> > support fully decimal and degrees, minutes and decimal seconds.
> > The previous implementation only accepted a decimal point. We now support
> > both point and comma, regardless of locale.
> > The previous implementation would color the input field red if either it
> > couldn't parse the string, or if it was able to parse it but it was the
> > same as the previous location. That's misleading.
> > The previous implementation also changed all gps coordinates to the new
> > coordinates in a multi-dive edit - instead of just changing the ones that
> > are the same as the master dive.
> > Since I am hoping to release 4.0.1 before the end of the year I would
> > really appreciate if people could beat on this change a bit. Try the
> > multi dive edit to make sure it makes sense (basically, if several dives
> > are at the same location, then changing the gps coordinates should be
> > tracked in all of them - but if they have different locations, then this
> > should only affect the selected dive). And please test the parsing of
> > the different GPS formats. Supported are
> > N7° 16.29924' , E134° 14.74350'
> > N7° 16' 17" , E134° 14' 44"
> > 7.271654 , 134.245725
> > I'm sure there are a few bugs still hidden in there somewhere. And I'd
> > like to catch them before we release this on our users :-)
> > Thanks
> > /D
> > _______________________________________________
> > subsurface mailing list
> > subsurface at hohndel.org
> > http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
More information about the subsurface