[PULL REQUEST] VPM-B
Rick Walsh
rickmwalsh at gmail.com
Mon Aug 17 03:59:34 PDT 2015
On 17 August 2015 at 19:46, Jan Darowski <jan.darowski at gmail.com> wrote:
> > I think that currently first_stop is being calculated for each stop (so
> > isn't actually first_stop) rather than just the first. That's what it
> > looked like from my limited running under gdb with a break every time
> > first_stop is calculated, and printing the depth variable.
> >
> > To calculate the first stop for every cva iteration we need to be more
> > clever than what my patch does, but I'm not sure you'll get a very
> different
> > resulting plan. From my understanding, cva is significant for short deco
> /
> > no deco dives, whereas Boyle's law compensation is significant for long
> deco
> > dives.
>
> I can't reproduce this. I've checked, there are only two places setting
> this
> variable, the only place it's used is passing it to the boyles_law().
> Printing it
> there gives the same value several times...
>
My bad - I read the code incorrectly and the examples I tested gave the
impression that it was run at every stop because there were 3m depth
difference between the depth variable at the breakpoints.
Your explanation is correct - it was the different CVA iterations
calculating different first stop depths. E.g. gdb output for a dive to
45m for 20min, breathing 18/45, with 50% and 100% deco gasses and zero
conservatism:
Breakpoint 1, plan (diveplan=0xad85d0, cached_datap=0x7fffffffcee8,
is_planner=true, show_disclaimer=false) at
/home/rick/src/subsurface/planner.c:1210
1210 first_stop_pressure
= depth_to_mbar(depth, &displayed_dive);
(gdb) p depth
$40 = 18000
(gdb) c
Continuing.
Breakpoint 1, plan (diveplan=0xad85d0, cached_datap=0x7fffffffcee8,
is_planner=true, show_disclaimer=false) at
/home/rick/src/subsurface/planner.c:1210
1210 first_stop_pressure
= depth_to_mbar(depth, &displayed_dive);
(gdb) p depth
$41 = 15000
(gdb) c
Continuing.
Breakpoint 1, plan (diveplan=0xad85d0, cached_datap=0x7fffffffcee8,
is_planner=true, show_disclaimer=false) at
/home/rick/src/subsurface/planner.c:1210
1210 first_stop_pressure
= depth_to_mbar(depth, &displayed_dive);
(gdb) p depth
$42 = 12000
(gdb) c
Continuing.
Breakpoint 1, plan (diveplan=0xad85d0, cached_datap=0x7fffffffcee8,
is_planner=true, show_disclaimer=false) at
/home/rick/src/subsurface/planner.c:1210
1210 first_stop_pressure
= depth_to_mbar(depth, &displayed_dive);
(gdb) p depth
$43 = 12000
(gdb) c
Continuing.
Breakpoint 1, plan (diveplan=0xad85d0, cached_datap=0x7fffffffcee8,
is_planner=true, show_disclaimer=false) at
/home/rick/src/subsurface/planner.c:1210
1210 first_stop_pressure
= depth_to_mbar(depth, &displayed_dive);
(gdb) p depth
$44 = 12000
(gdb) c
Continuing.
depth
duration
runtime
gas
45m
3min
3min
(18/45)
45m
18min
20min
21m
3min
23min
EAN50
12m
1min
24min
9m
2min
26min
6m
2min
28min
oxygen
3m
5min
33min
0m
0min
33min
The problem remains with different profiles being calculated when compared
to other programs. The same dive in the Fortran VPM-B program:
DECOMPRESSION CALCULATION PROGRAM
Developed in FORTRAN by Erik C. Baker
Description: TRIMIX DIVE TO 45
MSW
Gasmix Summary: FO2 FHe FN2
Gasmix # 1 0.180 0.450 0.370
Gasmix # 2 0.500 0.000 0.500
Gasmix # 3 1.000 0.000 0.000
DIVE PROFILE
Seg- Segm. Run | Gasmix | Ascent From To Rate | Constant
ment Time Time | Used | or Depth Depth +Dn/-Up | Depth
# (min) (min) | # | Descent (mswg) (mswg) (msw/min) | (mswg)
----- ----- ----- | ------ | ------- ------ ------ --------- | --------
1 2.5 2.5 | 1 | Descent 0. 45. 18.0 |
2 17.5 20.0 | 1 | | 45.
DECOMPRESSION PROFILE
Leading compartment enters the decompression zone at 33.9 mswg
Deepest possible decompression stop is 33.0 mswg
Seg- Segm. Run | Gasmix | Ascent Ascent Col | DECO STOP RUN
ment Time Time | Used | To Rate Not | STOP TIME TIME
# (min) (min) | # | (mswg) (msw/min) Used | (mswg) (min) (min)
----- ----- ----- | ------ | ------ --------- ------ | ------ ----- -----
3 3.0 23.0 | 1 | 18. -9.0 |
4 1.0 24.0 | 2 | | 18 2 24
5 0.3 24.3 | 2 | 15. -9.0 |
6 0.7 25.0 | 2 | | 15 1 25
7 0.3 25.3 | 2 | 12. -9.0 |
8 0.7 26.0 | 2 | | 12 1 26
9 0.3 26.3 | 2 | 9. -9.0 |
10 1.7 28.0 | 2 | | 9 2 28
11 0.3 28.3 | 2 | 6. -9.0 |
12 2.7 31.0 | 3 | | 6 3 31
13 0.3 31.3 | 3 | 3. -9.0 |
14 4.7 36.0 | 3 | | 3 5 36
15 0.3 36.3 | 3 | 0. -9.0 |
That's 13 minutes vs 16 minutes deco, or roughly 25% difference in deco
time.
For a longer dive, 60 m for 30 min, it's 43 vs 49 min (14%)
depth
duration
runtime
gas
60m
3min
3min
(18/45)
60m
27min
30min
30m
4min
34min
27m
2min
36min
24m
2min
38min
21m
2min
40min
EAN50
18m
2min
42min
15m
3min
45min
12m
4min
49min
9m
5min
54min
6m
6min
60min
oxygen
3m
13min
73min
0m
0min
73min
DECOMPRESSION CALCULATION PROGRAM
Developed in FORTRAN by Erik C. Baker
Description: TRIMIX DIVE TO 60
MSW
Gasmix Summary: FO2 FHe FN2
Gasmix # 1 0.180 0.450 0.370
Gasmix # 2 0.500 0.000 0.500
Gasmix # 3 1.000 0.000 0.000
DIVE PROFILE
Seg- Segm. Run | Gasmix | Ascent From To Rate | Constant
ment Time Time | Used | or Depth Depth +Dn/-Up | Depth
# (min) (min) | # | Descent (mswg) (mswg) (msw/min) | (mswg)
----- ----- ----- | ------ | ------- ------ ------ --------- | --------
1 3.3 3.3 | 1 | Descent 0. 60. 18.0 |
2 26.7 30.0 | 1 | | 60.
DECOMPRESSION PROFILE
Leading compartment enters the decompression zone at 46.0 mswg
Deepest possible decompression stop is 45.0 mswg
Seg- Segm. Run | Gasmix | Ascent Ascent Col | DECO STOP RUN
ment Time Time | Used | To Rate Not | STOP TIME TIME
# (min) (min) | # | (mswg) (msw/min) Used | (mswg) (min) (min)
----- ----- ----- | ------ | ------ --------- ------ | ------ ----- -----
3 2.7 32.7 | 1 | 36. -9.0 |
4 0.3 33.0 | 1 | | 36 1 33
5 0.3 33.3 | 1 | 33. -9.0 |
6 0.7 34.0 | 1 | | 33 1 34
7 0.3 34.3 | 1 | 30. -9.0 |
8 0.7 35.0 | 1 | | 30 1 35
9 0.3 35.3 | 1 | 27. -9.0 |
10 1.7 37.0 | 1 | | 27 2 37
11 0.3 37.3 | 1 | 24. -9.0 |
12 2.7 40.0 | 1 | | 24 3 40
13 0.3 40.3 | 1 | 21. -9.0 |
14 1.7 42.0 | 2 | | 21 2 42
15 0.3 42.3 | 2 | 18. -9.0 |
16 1.7 44.0 | 2 | | 18 2 44
17 0.3 44.3 | 2 | 15. -9.0 |
18 2.7 47.0 | 2 | | 15 3 47
19 0.3 47.3 | 2 | 12. -9.0 |
20 4.7 52.0 | 2 | | 12 5 52
21 0.3 52.3 | 2 | 9. -9.0 |
22 5.7 58.0 | 2 | | 9 6 58
23 0.3 58.3 | 2 | 6. -9.0 |
24 7.7 66.0 | 3 | | 6 8 66
25 0.3 66.3 | 3 | 3. -9.0 |
26 12.7 79.0 | 3 | | 3 13 79
27 0.3 79.3 | 3 | 0. -9.0 |
Cheers,
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150817/f599d537/attachment-0001.html>
More information about the subsurface
mailing list