bestdoubledive | R Documentation |
For two no-decompression dives,
to depths d1
and d2
metres respectively,
separated by a given time interval, find the
optimal durations of the two dives.
bestdoubledive(d1, d2, surface = 30, verbose = FALSE, model = "D", asdive=TRUE)
d1 |
Depth of first dive in metres. |
d2 |
Depth of second dive in metres. |
surface |
Length of surface interval between dives, in minutes. |
verbose |
Logical. If |
model |
The decompression model. Either
a character string, containing the name of a decompression model
recognised by |
asdive |
Logical. If |
This command implements the algorithm described by Baddeley and Bassom (2012) which calculates the ‘best’ double dive to two given depths separated by a given surface interval, without exceeding the no-decompression limits.
Consider a no-decompression dive to depth d1 metres for t1 minutes, followed by a surface interval of s minutes, followed by a no-decompression dive to depth d2 for t2 minutes. The ‘best’ double dive is defined by Baddeley and Bassom (2012) as the one which maximises the integral of depth Phi = t1 * d1 + t2 * d2.
By default (when verbose=FALSE
and asdive=TRUE
)
the result is a dive object (object of class "dive"
).
Otherwise, the result is a data frame with
columns t1
and t2
containing the
dive durations in minutes, phi
containing the value of
Phi, and case
specifying which of the cases
specified in Baddeley and Bassom (2012) provided the optimum.
If verbose=FALSE
this data frame has only one
row, giving the best double dive. If verbose=TRUE
then the
data frame has several rows giving the candidates for optimal dive
in each case of the algorithm.
.
Baddeley, A. and Bassom, A.P. (2011) Classical theory of decompression and the design of scuba diving tables. The Mathematical Scientist 36, 75-88.
pickmodel
,
hm
,
ndl
,
haldane
d <- bestdoubledive(40, 12, 15) plot(d) # Table 3 in Baddeley and Bassom (2012) bestdoubledive(40, 12, 15, verbose=TRUE) # Brief description of optimal dive summary(bestdoubledive(40, 12, 15)) # Data for optimal dive bestdoubledive(40, 12, 15, asdive=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.