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

Dirk Hohndel dirk at hohndel.org
Fri Nov 22 10:30:41 UTC 2013


On Fri, 2013-11-22 at 09:14 +0100, Patrick Valsecchi wrote:
> Hi,
> 
> The trick of ignoring gaz change if time<30 is not working for
> merged dives. We should instead remember the previous gaz (initialized
> to air) and ignore the event if it is the same.
> 
> While on the subject, why do we get the next plot_data event and not the 
> one that have the same time? I saw that the cylinder change appears 
> actually in the next plot_data, but that should not be. Isn't that 
> slightly messing with the deco computation? IMHO, we should change the 
> code that sets the cylinder in plot_data to do it one item before (on 
> the one that have the same time as the event) or fix the event time, I 
> don't know which one is correct. But the current way of doing things 
> gives us the wrong y coordinate and is a bit weird.
> What do you think?

In which language is gas spelled 'gaz'?
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.

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.

/D



More information about the subsurface mailing list