[Patch] Fix planner notes gas change output logic

Rick Walsh rickmwalsh at gmail.com
Fri Jun 19 02:57:56 PDT 2015


Thanks Robert,

On 19 June 2015 at 18:12, Robert Helling <helling at atdotde.de> wrote:

> Thanks a lot for this. Too bad I currently have virtually no time to look
> at this in any detail and due to a family wedding this weekend possibly not
> before Monday.
>

No worries.  I have things to do over the weekend too.  Your comments
include plenty of good suggestions.  I'll try to get closer to a good
solution, but that probably won't be before Monday.


>
> Still a few remarks:
>
> 1) Could you split your patch into 2-3 patches, one for the segment type,
> another one for the new logic? git add -p is very helpful in doing this (as
> I recently learned).
>

The process for altering the code involved a lot of trial and error and
doing / undoing changes.  I'm sure that's not the ideal method, and it
doesn't lend itself to split patches.  I'll see if I can improve that, and
will look up what add -p does.


>
> 2) Don’t use the gamix.gas.permille members directly or you will run into
> problems since air is stored as 0%O2+0%2He. If you want to treat the
> special cases separately, you are likely doublicating code. Please always
> use the helper functions get_o2(&gasmix) and get_he(&gasmix) if you really
> want the content and to test if two gases are the same, there is
> gasmix_distance(&gasmix1, &gasmix2).
>

Thanks for the tip, that makes much more sense than comparing .permille and
dealing with a new set of mathematical rules where 0% = 21%.  I saw
gasmix_distance use in parts of the code, but had no idea what it did and
assumed it related to some physical distance.


>
> 3) I must say, I am not really a fan of the 0min stops. But people might
> convince me. What I had intended to do is to change the plan() such that
> after doing a gas change, it always waits for a minute (and that minute
> might later be configurable by the user). I think this is realistic as
> doing a gas change with all checks while continuously ascending is just
> unrealistic.
>

Yes, if there is a minimum stop time in the calculated profile, the issue
of 0min stops goes away - it makes executing the dive as well as outputting
the plan easier.  An alternative (option) would be to postpone the gas
switch until the first deco stop as Anton prefers.


>
> 4) We could have a checkbox to turn on and off the segment type symbols
> (as we have for duration and runtime). If you want to try that, simply copy
> the code for those options.
>

I'll have a go.  I originally added symbols to help me track what the code
logic was actually doing, then I decided it was actually useful info that
could add clarity to the plan.

>
> 5) Just a personal preference, i would use ↗
> <https://en.wikipedia.org/wiki/%E2%86%97>, ↘
> <https://en.wikipedia.org/wiki/%E2%86%98>, →
> <https://en.wikipedia.org/wiki/%E2%86%92_(disambiguation)> for ascent,
> descent and stop and not distinguish between stop and constant depth
> planned segment.
>

Sounds Reasonable.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150619/5dde39a0/attachment.html>


More information about the subsurface mailing list