Rick,

On 27 Aug 2015, at 00:39, Rick Walsh <[email protected]> wrote:

^^^This last line changes the calculated plan but I don't know why.  I have attached the results of the test run twice: firstly with the current master (80e7213582c203a128270a0e2e8fcc850eede063), the second with the line vpmb_start gradient() removed.  Removing it improves the test results (passes 8/10 compared to 6/10, and one of the two failing is failing by 3 seconds using the within-1%+1min-of-vpmb-comparison-result-is-good-enough logic).  The results are replicated when the plan is calculated by running Subsurface properly.

My problem is that I can't work out why this line should have any effect at all.  Otherwise I would have sent a patch.  Do you understand what it's changing?

let me add to this confusion: In my branch, I had computed the first stop depth for each round of the CVA, as done in this patch:

From 26770a42a4b12dd24d0e40adbb361ba4d972537e Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <[email protected]>
Date: Thu, 27 Aug 2015 14:13:12 +0200
Subject: [PATCH] Compute first stop pressure for each round of CVA

Signed-off-by: Robert C. Helling <[email protected]>
---
 planner.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/planner.c b/planner.c
index 5afc117..1dda2f4 100644
--- a/planner.c
+++ b/planner.c
@@ -1143,6 +1143,12 @@ bool plan(struct diveplan *diveplan, char 
**cached_datap, bool is_planner, bool
                breaktime = -1;
                breakcylinder = 0;
                o2time = 0;
+               first_stop_pressure.mbar = 
depth_to_mbar(deco_allowed_depth(tissue_tolerance,
+                                                                           
diveplan->surface_pressure / 1000.0,
+                                                                           
&displayed_dive,
+                                                                           1),
+                                                        &displayed_dive);
+
                last_ascend_rate = ascent_velocity(depth, avg_depth, 
bottom_time);
                if ((current_cylinder = get_gasidx(&displayed_dive, &gas)) == 
-1) {
                        report_error(translate("gettextFromC", "Can't find gas 
%s"), gasname(&gas));
-- 
1.9.5 (Apple Git-50.3)

This makes all but one test pass and even the fail I would say (looking at the spread sheet) actually passes but the comparison is for a wrong goal.

With this, when I now remove that vpmb_start_gradient I get a totally off test (which is what I remembered adding this line in the first place, I think it was to set the bottom pressure, but right now I haven’t gotten to confirm this). So, I would argue for taking this patch here and keeping the call.

Best
Robert

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to