[PATCH] Ignore events for gaz change if there is no change.

Dirk Hohndel dirk at hohndel.org
Sun Nov 24 07:23:18 UTC 2013


On Sun, 2013-11-24 at 15:38 +0100, Patrick Valsecchi wrote:
> Hi,
> 
> On 22. 11. 13 19:30, Dirk Hohndel wrote: 
> > In which language is gas spelled 'gaz'?
> 
> French, Crimean Tatar, Polish, Romanian and Turkish.
> ;-)
> 
Not English, though :-)

> > But besides that... I don't think this is correct. We don't correctly
> > handle that because of architecture limitations (and we just in the last
> > few days had suggestions how to fix that), but it's entirely possible
> > that someone might have two tanks with the same gas (even air) and wants
> > to switch between them. So simply hiding those events isn't really a
> > great idea.
> 
> Didn't think some people wanted to track more than one cylinder with
> the same gaz.
> Then we could ignore events where entry->cylinderindex doesn't change.

Once we fix our code, yes we could do that. But the question is "why". I
think seeing these events is useful - and if they bug you, delete them.
When I see an event like this I tend to ask 'why is it there'? Why did
the DC report that event. I don't like to hide things that I don't
understand, yet.

The 30sec thing is there for exactly that reason. We figured out that
some DCs brilliantly send a first event "within about 15 seconds" (we
doubled that to be on the safe side) to pick the first gas...

> > The 30sec vs. merged dive comment is correct.
> > 
> > The other comment I don't quite understand. The gas change event has a
> > time associated with it. That can be right at a sample, or between two
> > samples. We should be using the time of the event to track the change in
> > gas - but then if you want to be that artificially precise, we don't
> > know the actual depth at that time. Fact is that all of our computations
> > are approximations based on coarse data. This one item isn't really
> > going to make any real difference, given the coarseness of all the other
> > data.
> 
> I didn't make myself clear. What I don't like is line 936. It is now:
>   if (ev->time.seconds < entry->sec)
> 
> To me, it's weird that it is not:
>   if (ev->time.seconds <= entry->sec)
> 
> Then if you do that, it's even weirder, since it looks like the
> plot_data has the wrong cylinder at the exact time of the event. Just
> an off by one error, I guess.

That's a good point. '<=' would seem better. Blame Tomaz (who I'm sure
just faithfully reimplemented a bug in the Gtk code...).

But that has nothing to do with the deco computation. That just means
that the triangle might be drawn in the wrong spot. Please send a patch
to fix THAT for now :-)

/D



More information about the subsurface mailing list