DC ceiling not shown

Dirk Hohndel dirk at hohndel.org
Fri Feb 22 20:16:38 PST 2013


Miika Turkia <miika.turkia at gmail.com> writes:

> On Sat, Feb 23, 2013 at 1:21 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> Linus Torvalds <torvalds at linux-foundation.org> writes:
>>>
>>> and when the dive goes into deco at the 8:00 mark, subsurface still
>>> remembers that "ndl='1:00 min'". And because there is a NDL time, we
>>> then don't print the ceiling, because we consider the stop to be just
>>> a safety stop, not a deco ceiling.
>>
>> Which I still think is the reasonable thing to do.
>>
>>> Now, we should be able to figure this out, because we do have:
>>>
>>>   <event time='8:00 min' name='deco' />
>>>   <event time='31:40 min' name='PPO2 HIGH' />
>>>   <event time='0:00 min' value='21' name='gaschange' />
>>>   <event time='30:50 min' value='50' name='gaschange' />
>>>
>>> so that event at time 8:00 should give us a big hint that we should
>>> clear NDL. But we don't match that up with the samples at XML parse
>>> time, and Dirk at some point confused things further with the whole
>>> "in_deco" flag that is not matched against ndl *either*.
>>>
>>> In short, we're confused. We have three different ways of showing
>>> deco: deco events, the in_deco flag, and ndl. And none of them talk to
>>> each other.
>>>
>>> You can force it right now by adding "ndl='0:00 min'" to that sample
>>> at time 8:00, but we really should do better.
>>
>> Yes, this needs to get rewritten. On my todo list for 3.1
>> A big part of the problem is that the data we get on deco from dive
>> computers is pretty shitty and extremely inconsistent. Add to that that
>> Jef and I went through a couple of iterations of how libdivecomputer
>> would report all this to the application and throw in the fact that the
>> Uemis support is separate from that and the whole thing turned into
>> quite a mess.
>
> Here is a patch to get this working on JDiveLog import. The hack is
> explained in the commit message.

It is indeed a hack but it works - and of course our smart XML saving
algorithm will make all the spurious NDL entries go away again, so I
think this is a viable solution.

Pushed

Thanks

/D


More information about the subsurface mailing list