[PATCH] Planner notes - revise logic for gasmix output

Dirk Hohndel dirk at hohndel.org
Sat Jun 20 18:13:22 PDT 2015


On Sat, Jun 20, 2015 at 03:30:58PM +1000, Rick Walsh wrote:
> The logic for when to output a gasmix in the notes table is more
> complicated than it seems at first.
> -On a descent leg, the gas is the gas used for descent
> -At a stop (calculated or user defined), the gas is the gas used for that
> stop
> -But on an ascent leg (if displayed), the gas is the gas that is ABOUT TO
> BE USED
> -The gas should not be repeated if it's the same gas as used on the last
> row of the table
> -Ascent legs should only be displayed if the display transitions option is
> selected, OR if there is a gas change without a stop (the user can now set
> a minimum duration for a gaschange, but zero is still allowed).
> 
> The existing code tries to track what gas is being used/switched to at each
> waypoint, and whether the gas should be printed or postponed to the next
> leg.  It works sometimes but not always.
> 
> This patch replaces the postponed gas logic with:
> -Is this an ascent leg? (determines whether the applicable gas is the
> preceding or following leg, and whether the leg should be displayed at all
> if the transitions option isn't selected)

I wonder if we use the best possible data structures here. The fact that
the meaning of data in the node changes depending on the depth of the next
node seems... worrysome.

> -Is it an ascent with a gaschange without a stop?
> -Has the gas actually changed from the last output?
> -Will the next leg be at the same level and same gas (in which case merge
> them)?
> 
> 
> I have been convinced that the zero time gas switch stop table entry is not
> correct.  Instead it should be merged into the preceding ascent, which is
> what this patch does.  It is now less of an issue since the user can set a
> minimum duration for gas switches.

Robert, I consider you the maintainer of the planner. I took Rick's rather
straight forward looking patches earlier, but would you take a look at
this one before I apply it?

Thanks

/D


More information about the subsurface mailing list