On Sun, Sep 20, 2015 at 06:22:24PM +1000, Rick Walsh wrote: > We do not want to remember max_bottom_ceiling_pressure from the previous > planned > dive - it makes the Boyle's law compensation incorrect if the previous planned > dive was a deeper deep-to-shallow multi-level dive. > > E.g. Plan these dives (without applying this patch) with VPM-B nominal > conservatism: > Plan 30 m for 20 min (total run time = 28 min) > Now plan 100 m for 20 min, followed by 70 m @ 23 min and 70 m at 30 min > Re-plan 30 m for 20 min (total run time = 50 min) > > With this change, the re-planned dive run time is 28 min, as it should be.
Could you add this as a test case? I'm trying to track down two other bugs right now and just don't have the time, but it should be easy to do in tests/testplan.cpp Simply plan those three dives and check that the run time for the first and third are identical. This way we will notice if some change in the future breaks the "full reset" of all starting values. > We probably don't have to reset first_ceiling_pressure too, but it's cleaner > if > we do. Thanks for the patch, I'll apply this right now - I'd still love to see the test. /D _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
