wrongly displayed Safetystop

Jan Schubert Jan.Schubert at GMX.li
Sat Feb 2 15:55:58 PST 2013


On 02/01/13 01:04, Dirk Hohndel wrote:
> Jan Schubert <Jan.Schubert at GMX.li> writes:
>
> > In all of my profiles from OSTC and Predator I get a Safetystop
> > displayed in the mouse over dialog after the official deco is finished
> > until surfacing. The stop seems to be displayed regardless if the
> > calculated deco is finished or not but only seems to be there in cases
> > there is deco calculated. Funny enough, in some cases it also seems to
> > be there before a deco got calculated, I did not find any specific
> > pattern so far.
> >
> > Tracking down I found that the there is even an entry for "stoptime" in
> > the XML, so the GUI is correct, but I've no idea where this is coming from.
> >
> > The safety stop should not be there and there is not even such a thing
> > like safety stop implemented in the Predator. Any ideas?
>
> If you have a stopdepth > 0 and positive NDL then Subsurface thinks your
> computer wants you to do a safety stop. Because what else could that
> mean? You have NDL, so you don't have a ceiling, so you are not in
> deco... so your divecomputer wants you to be at a certain depth...
> that's a safety stop, right?
>
> And you can see that pattern in the XML file that you sent.
>
> So I think the issue is that we don't see the end of the deco
> obligation, i.e., the stopdepth doesn't reset back down to 0 for some
> reason.
>
> My guess is that this is an issue with what libdivecomputer gives us (or
> how we interpret it). Here's the code in src/shearwater_predator_parser.c:
>
>                  // Deco stop / NDL.
>                  unsigned int decostop = array_uint16_be (data + offset + 2);
>                  if (decostop) {
>                          sample.deco.type = DC_DECO_DECOSTOP;
>                          if (units == IMPERIAL)
>                                  sample.deco.depth = decostop * FEET;
>                          else
>                                  sample.deco.depth = decostop;
>                  } else {
>                          sample.deco.type = DC_DECO_NDL;
>                          sample.deco.depth = 0.0;
>                  }
>                  sample.deco.time = data[offset + 9] * 60;
>                  if (callback) callback (DC_SAMPLE_DECO, sample, userdata);
>
> It definitely gives us a depth of 0 once we see positive NDL. But it
> looks like we are ignoring that.
>
> Can you try this patch?

Thx Dirk, seems to work. Tested with OSTC I now get a NDL of 240min 
displayed instead which is fine and much better than a (never ending) 
safety stop :-).

Thx,
Jan


More information about the subsurface mailing list