Coordinates and dive mapping

Dirk Hohndel dirk at hohndel.org
Tue Sep 29 03:45:08 PDT 2015


On Tue, Sep 29, 2015 at 05:16:41AM +0200, Willem Ferguson wrote:
> I have three issues with a very recent git master (SHA c4eb957).

That's 21 commits ago :-)
(but I doubt this matters here)

> 1) Entering coordinates by hand.
> When I enter GPS coordinates by hand, Subsurface often loses some of these,
> even though they were shown correctly before closing down Subsurface and I
> exited Subsurface with a Save divelog command. Inspecting the XML shows
> that several divesite location entries were created, typically with
> identical names and identical uuids, both WITHOUT GPS coordinates; and then
> a third entry with exactly the same name as the previous two but WITH the
> GPS coordinates. Here is an example:
> 
> <site uuid='d3b62d9f' name='Ventura, Santa Cruz Island, Cavern Point,
> California' gps='34.055880 -119.566110'/>
> <site uuid='d3b62d9f' name='Ventura, Santa Cruz island, Cavern Point,
> California'/>
> <site uuid='d3b62d9f' name='Ventura, Santa Cruz island, Cavern Point,
> California'/>

Ouch. That's bad. We should NEVER create a new entry with the same uuid.
That first 'u' stands for "unique"...

I'll need to try and reproduce this and then shoot the culprit, err, I
mean, fix the bug.

> Eliminating the two 'bogus' entries by hand solves all the coordinates
> problems and all dives then show the appropriate coordinates. There are two
> issues here. My feeling is that, when a dive location is saved with
> coordinates, it should first check if already-existing sites have exactly
> that same dive site name (case insensitive) and then follow a standard rule
> on how to deal with this situation. But creating yet another location is
> clearly inappropriate.

No, that is not correct. I have quite a few sites that have identical
names. We discussed this hear at length. There's a Blue Hole in many dive
areas. Even in the same dive area there can be multiple sites with a
common "catch all name" (the famous "turtle reef" in Maui). It's perfectly
fine to have multiple dive sites of the same name. That's the reason why
the uuid also adds in the time stamp of the first dive that was used to
create this site. The likelihood of identical hashes for two different
dive sites is fairly small (as in "won't happen as long as I maintain
Subsurface - unless I am seriously underestimating my life expectancy).

> Maybe, (1) when entering coordinates by hand, the
> user needs to understand the rules Subsurface uses when entering this info
> by hand. (2) or it is user error because I mostly enter the dive site name
> into the appropriate text box then save the change (because clicking the
> orange bar with the new location name does not do anything), then provide
> the coordinates in the dive site panel then save again. So every time I
> save, it creates a new location. In this case it is user ignorance. But
> then we need to specify the appropriate procedure explicitly in the manual.
> I would prefer automatic overwrite of duplicate dive site names. However, I
> am not sure what the most appropriate way forwards with this is. It would
> be nice if V4.5 had this solved.

No - it's imply a bug. Somewhere in the code we create a new dive site
instead of checking if one exists, first. As I said, I'll fix this. But
first I'll head for breakfast and then for the morning dive boat :-)

> 2) After everything is shown correctly by editing of the XML, and I wish to
> inspect the present location information by clicking the globe icon the the
> right of the dive location name, the location panel is not opened. It is
> not possible to review this information.

Are you currently editing the dive? This is a fairly recent change that we
will keep and that should be documented. You cannot edit at the same time
both a dive and a dive location. So while a dive is being edited, the
globe is grayed out. Yes, this is a bit inconvenient and we may change
this again in the future, but this is how it is going to be in 4.5.

Tomaz, can you add a tooltip to that button that states that you can't
edit a dive site while the dive is being edited? Something like "Please
accept the changes to the dive before editing the dive site details"?
And only show this when the globe button is disabled...

> 3) For several recent versions of Subsurface, the marble panel is
> black/blank. When highlighting dives that used to be shown perfectly on the
> map, there is nothing now. I build the above version from scratch by
> creating an empty src directory, cloning the subsurface git master and
> rebuilding. Stll no solution.

So I have used Subsurface, built from the latest sources, a lot over the
last few days. On Arch Linux, Mac and Windows. I know that Linus has been
using it on Fedora and Miika on Ubuntu. If Marble didn't show up I know
that one of us would have noticed. So I'm suspecting there is something
wrong on your end (I know, easy to say for me - but look at it from my
point of view).

Can you try to debug this a bit more? Is Linux linked against
libssrfmarblewidget.so? What happens when you select the globe full screen
under the View menu entry? Does the mouse change to a hand when you are
over the area where the globe should be? What happens when you zoom
(scroll on your mouse)?

/D



More information about the subsurface mailing list