Usage of gaschange event data

Dirk Hohndel dirk at hohndel.org
Wed Jul 16 16:24:35 PDT 2014


On Wed, Jul 16, 2014 at 11:22:32PM +0200, Anton Lundin wrote:
> This started out yesterday with me looking at dives/test20.xml and saw
> that the gasname text in the info box is wrong there. It uses the
> gaschange event data via get_gasmix_from_event and then on to gasname.
> 
> The problem with using the result from get_gasmix_from_event is that it
> doesn't care about the difference between SAMPLE_EVENT_GASCHANGE and
> SAMPLE_EVENT_GASCHANGE2, and thus doesn't map the gaschange event to the
> cylinder its changing to.

??? That sounds odd...

> I dug around and found the same type of assumption in lots of places
> allover the code. A while back pre 4.0 somewhere i fixed up
> get_cylinder_index to do the right thing and switched all the places to
> using it, but now we have reverted to using event data again.

I don't think using event data is WRONG per se - as long as it's done
correctly. After all, that's how we track gas changes.

> Should we stop supporting SAMPLE_EVENT_GASCHANGE and converting
> everything into actually relying on having the exact correct gas in the
> event?

It should be there. I'm lost why / where you think it isn't.
I must be missing something.

> The other option is to stop looking at whats in the event and start only
> looking at what gas is mapped to different times in the dive. We can't
> do both, and mix and match them.

Well, post 4.2 I really want to change the way we deal with events, but it
sounds like this is somewhat independednt from that intended change.

But I think I need to understand better the actual underlying issue before
I can make any sane suggestions...

/D


More information about the subsurface mailing list