Gases in divelist

Miika Turkia miika.turkia at gmail.com
Mon Mar 18 08:47:05 PDT 2013


On Mon, Mar 18, 2013 at 5:42 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Miika Turkia <miika.turkia at gmail.com> writes:
>
>> On Mon, Mar 18, 2013 at 5:22 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>> Linus Torvalds <torvalds at linux-foundation.org> writes:
>>>
>>>> On Mon, Mar 18, 2013 at 8:11 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>>>>
>>>>> The bookmark comes with a heading?
>>>>
>>>> Not for me it doesn't. A "bookmark" is without a heading, there's a
>>>> separate notion of a heading (which is the same as a bookmark but
>>>> *does* have a heading).
>>>
>>> So my guess is that DM4 combines them into the same.
>>> libdivecomputer uses SAMPLE_EVENT_HEADING instead.
>>>
>>> Sadly, once DM4 has combined the two things into one we can't tell them
>>> apart anymore (is this a HEADING of 0 or a BOOKMARK without a heading?).
>>
>> It is actually quite clear in the DB. If there is a heading value, it
>> is always the heading. Otherwise this field is empty.
>> sqlite> select * from Mark where DiveId = 305;
>> DiveId|MarkTime|Type|Heading
>> 305|2076|258|130
>> 305|3341|19|
>
> So type 258 is a heading and type 19 is a bookmark? Or am I misreading this?

Sorry for not explaining. The 258 is bookmark with heading of 130
degrees. The 19 is surface. Most of the bookmarks I have seen do not
have the heading at all, but some do (I suppose there is some logic so
the heading is recorded only when relatively sure that we are heading
that way).

>>> Not sure what to do here. My gut feeling would be to say "whatever" and
>>> just drop the value for bookmarks. What do people think?
>>
>> I can change the DM4 import to generate a heading event if that is
>> preferred. Then we would have both bookmark and heading at same time.
>
> Well, only if there are two events, right?
> I there is only a heading event in the database (as it appears to be at
> time 2876 in the example above), why would you create a bookmark event
> as well?

I wonder if it is clear to the users that when there is heading event,
that is actually the bookmark they stored. (Heading is recorded only
when one stores a bookmark, otherwise there are no headings recorded
at all.) Other than that I don't see any reason to store the bookmark
event in this case.

miika


More information about the subsurface mailing list