I've been reading through the calculations in Deco for Divers, and for some reason, I'm not figuring out where to get certain values. There's a table, but for some reason, when calculating the b-variable, I keep getting a negative number. Very annoying, but a work in progress.
Here is the text from the comment header of the subroutine I use to calculate the ceiling in my Excel spreadsheet:
'=============================================================================
' calc_ceiling
'
' For every segment of the dive check that ascents do not violate a deco
' ceiling. Calculate the first deco stop based on GFLo.
'
' This routine works with the a/b coefficients developed from the m-values
' and slope values. The m-values and slope are called Workman values after
' Robert Workman, a captain in the U.S. Navy refined John S. Haldane's work
' in the early 1900's. Workman developed linear equations to describe the
' relationship between depth and tissue pressure. The equation he came up
' with is:
'
' M = S(D) + Mo
'
' where M = m-value pressure of the tissue compartment at the current
' depth, S = slope of the m-value line, D = current depth, and
' Mo = surfacing m-value.
'
' Rearranging this equation and solving for depth gives:
'
' D = (P - Mo) / S
'
' where P = the pressure of the TC at the current depth
'
' Albert A. Buhlmann M.D., a researcher with the University Hospital in
' Zurich, Switzerland developed equations that were useful for diving at
' altitudes. This type of diving was common in the high altitude lakes of
' Switzerland. Dr. Buhlmann in order to get rid of the divisor (S) in the
' equation came up with a and b coefficients. A and b coefficients can be
' derived from Workman's equations where:
'
' a = Mo - S(Ps) ;Ps is the absolute pressure at the surface
' b = 1 / S
'
' As an example in converting from Workman to Buhlmann to get the a/b
' coefficients for TC 1 nitrogen we have: Mo = 106.4, S = 1.9082
'
' a = 106.4 - 1.9082(33) = 43.4294 ;fsw
' b = 1 / 1.9082 = 0.524 ;ft/fsw
'
' Here are alternate formulas for calculating the a and b coefficients:
'
' a = 2 x (HT ^ (-1/3)) ;in ata, x 33 to get fsw, x 10 to get msw
' b = 1.005 - (HT ^ (-1/2)) ;dimensionaless
'
' To convert from Buhlmann to Workman use these equations:
'
' Mo = a + Ps/b
' S = 1 / b
'
' To find the ceiling use the tolerated ambient pressure formula:
'
' Ptol = (Pigas - GF x a) / (GF / b - GF + 1)
'
' where: pigas = inert gas pressure in compartment, GF = the current
' gradient factor, a = a coefficient, b = b coefficient.
'
' pamb = WorksheetFunction.RoundUp(pamb, 0) 'just for reference
'=============================================================================
The b coefficient, as per the above text, is simply 1 divided by the slope. There are tables in the paper "Understanding m-values" that give the slope, M0 (surfacing m-value), and half-time for each of the Buhlmann 16 tissue compartments. All the numbers are positive so I don't understand how you can get a negative result for the b coefficient using the formula. Also included in the paper are various formulas for calculating tissue pressues and depths between Workman and the Buhlmann style formulas. Attached is Baker's paper for your reference.