Usage of gaschange event data

Anton Lundin glance at acc.umu.se
Wed Jul 16 14:22:32 PDT 2014


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.

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.


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

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.

//Anton

-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list