bestdoubledive {scuba} | R Documentation |
Find the Best Double Dive To Given Depths
Description
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.
Usage
bestdoubledive(d1, d2, surface = 30, verbose = FALSE, model = "D", asdive=TRUE)
Arguments
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 |
Details
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 d_1
metres
for t_1
minutes, followed by a surface interval of s
minutes, followed by a no-decompression dive to depth d_2
for t_2
minutes.
The ‘best’ double dive is defined by Baddeley and Bassom (2012)
as the one which maximises the integral of depth
\Phi = t_1 d_1 + t_2 d_2
.
Value
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.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
References
Baddeley, A. and Bassom, A.P. (2011) Classical theory of decompression and the design of scuba diving tables. The Mathematical Scientist 36, 75-88.
See Also
Examples
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)