<div dir="ltr"><div>The logic for when to output a gasmix in the notes table is more complicated than it seems at first.<br>-On a descent leg, the gas is the gas used for descent<br>-At a stop (calculated or user defined), the gas is the gas used for that stop<br>-But on an ascent leg (if displayed), the gas is the gas that is ABOUT TO BE USED<br>-The gas should not be repeated if it's the same gas as used on the last row of the table<br>-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).<br><br>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.<br><br>This patch replaces the postponed gas logic with:<br>-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)<br>-Is it an ascent with a gaschange without a stop?<br>-Has the gas actually changed from the last output?<br>-Will the next leg be at the same level and same gas (in which case merge them)?<br><br><br></div>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.<br></div>