[PATCH 1/2] git-format: save dive picture data

Dirk Hohndel dirk at hohndel.org
Sun Jun 29 17:58:04 PDT 2014


On Sun, Jun 29, 2014 at 05:49:59PM -0700, Linus Torvalds wrote:
> On Sun, Jun 29, 2014 at 5:22 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> > If there is GPS data (think of someone taking a phone in a case and taking
> > a picture of the boat right at the start of the dive or something) we
> > should encode it in a reasonable fashion, too :-)
> 
> The code is there. I don't have any such pictures, so it's not tested
> at all, though.
> 
> If there is gps data, the picture file should end up looking something like
> 
>     filename "/home/torvalds/Pictures/..."
>     gps <lat> <long>
> 
> and both the writing and the reading side has the code to save/load
> the gps data, but without any testing I'm not going to claim that it
> necessarily works..

I will create such a picture (easy enough, just add the GPS info to a
picture) and test later today.

> Also, from my very limited picture testing, I have to say that I'm not
> a huge fan. The "offset" thing is incomprehensible (a zero offset
> shows as "12:00 am" in a US locale),

Yep, on my todo list. The time widget is just being stupid...

> and if you just select a whole
> subdirectory of pictures and expect subsurface to just match them by
> date, it "works", but it actually selects *all* pictures, regardless
> of whether the date offset then ends up being sane or not (ie negative
> offsets, or offsets past the end of the dive).

That was by design. People wanted to be able to have pictures right before
and after the dive show up as well (think of us taking pictures of the
whiteboard with the briefing information).
Of course, reasonably, there should be a limit, something like "30 minutes
before until 30 minutes after"...

> It's also very slow - it seems to re-create the thumbnails every time
> you select that dive.

I never tested with more than a handful of dives. It certainly should
cache the thumbnails...

> None of this is about the loading/saving part, though, I just feel
> that there's some room for improvement in this whole thing. I'd
> personally really prefer to just prefer to select all dives of a day,
> select all pictures of a day, and say "import the matching dates".

I totally agree with you.
The goal should be "select all dives of the trip, select all the pictures
you took during the trip, have it do something reasonable".

So we need to implement the +/- 30 minutes rule and make sure that this
all works as intended. I'll file a trac ticket for that.

/D


More information about the subsurface mailing list