Dirk,
> On 12 May 2015, at 01:39, Dirk Hohndel <[email protected]> wrote: > > It feels like we talked about this before. But after playing around with > both the planner and the dive editor for a while I'm not sure I like what > we do (or, frankly, fully understand what we do). > > So let's enter "add dive" mode. A very basic profile shows up. > Now add a second tank with pure oxygen. > Click on the handle at the beginning of the safety stop and try to switch to > pure oxygen > (right click, context menu offers AIR and OXYGEN, select OXYGEN) > No error, no nothing, doesn't work. > > OK, maybe there's some magic to keep my PO2 in a safe range, but no message? > No, this is a bug related to oxygen. It does not occur for EAN99. BTW, just realised I can create a gas with EAN101. But that cannot be switched to either. I have to look at the code, but probably there is some sanity check on selecting the gas from the context menu that does not recognise the word „OXYGEN“. > Next attempt, change the tank to EAN80 > > Again, right click on the handle at the beginning of the safety stop (at > 5m). Pick EAN80 > > Now the ascent from depth to 5m is using EAN80 and there (at the node I > clicked on) we switch back to air. Not exactly intuitive. And of course > this means that I cannot actually end the dive on a different gas than I > started with. > > But quite frankly, why DOES it change the previous segment. > If I click at a spot in the profile in normal view mode and add a tank > change then the gas from that point on changes. That seems to be the > logical thing to do. Yet here we change the gas used during the segment up > the point we are on. > > Can someone explain why this makes sense? It does not make sense. But I think I can explain how this comes about: As the code is shared with the planner, think of it from the planner perspective: There we have the continuing problem of the two semantics: Waypoints as instants of time and legs of the dive plan. In the logic of the planner (think for a moment of the dive planner points table) the relation between the two is that a waypoint (i.e. a row of the table) always belongs to the leg _preceeding_ it. In the table, I would argue that this is the expected semantics: There, a leg (with its gas) is listed with its final depth and time at its end. And if I want to change its gas, I enter it in the corresponding row. This is a question of what the gas information really means: Currently it means „I want to use this gas for this leg of the dive“. The semantics you have in mind is „I enter a gas change here“ (as we do in the rest of the program). I would argue that what we currently do is the correct semantics in terms of the dive points table. When you enter the information in the profile (which is the only way to do it in „Add dive“) I agree this is not correct and we should change that. There, we should probably stick to the „gas change“ semantics, i.e. not only change the gas of the _following_ leg but of all following legs until the next gas change. Which brings as to the problem of the current inability to change the gas of the final leg. That of course would go away with the change of semantics. But then you could no longer change the initial gas as there is no handle at the start of the dive. Of course we don’t want the the start of the dive (0m at 0sec) to be moved. But maybe we should still display a handle so the gas can be changed? I am currently travelling and the plan is that I will spend the rest of the week with sight seeing rather than staring into a computer screen. But I promise I will take care of this (unless somebody else feels like jumping in in the meantime) when I am back. Best Robert _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
