2015-08-18 13:12 GMT+02:00 Robert C. Helling <[email protected]>:
>
> On 18 Aug 2015, at 12:18, Davide DB <[email protected]> wrote:
>
> Ok
>
> Should we copy the entire profile or just the runtime? :)
>
>
> Let’s do the entire profile, getting the runtime from there should be
> trivial in a spread sheet.
>
> Here is the link:
>
> https://docs.google.com/spreadsheets/d/1ZWs6eOW2pF4yBRRj4JYtVxIr0vlyFNxS9Z4nka2PP6k/edit?usp=sharing
>
> Please give me a few minutes to set it up.
>
> Best
> Robert

Hi!
Thanks for doing this.
Here is one more small patch that fixes when Boyle's compensation is
run. It's important when the first gas change during the deco is
before the first deco stop.


-- 
Jan Darowski
From 81a792e1209e0943b6ff848c1b54467b5066845c Mon Sep 17 00:00:00 2001
From: Jan Darowski <[email protected]>
Date: Tue, 18 Aug 2015 13:20:56 +0200
Subject: [PATCH] VPM-B: Fix calculating Boyles compensation on gas change
 stops.

Previously we were calculating the compensation only on the deco
stops, gas change stops appearing before the first deco stop were
ommited.

Signed-off-by: Jan Darowski <[email protected]>
---
 planner.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/planner.c b/planner.c
index a4aacc0..f9ede6e 100644
--- a/planner.c
+++ b/planner.c
@@ -1167,6 +1167,11 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
 					plan_add_segment(diveplan, clock - previous_point_time, depth, gas, po2, false);
 				previous_point_time = clock;
 				stopping = true;
+				
+				// Boyles Law compensation
+				if (first_stop_pressure == 0)
+					first_stop_pressure = depth_to_mbar(depth, &displayed_dive);
+				boyles_law(first_stop_pressure / 1000.0, depth_to_mbar(stoplevels[stopidx], &displayed_dive) / 1000.0);
 
 				/* Check we need to change cylinder.
 				 * We might not if the cylinder was chosen by the user
-- 
2.2.2

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

Reply via email to