Creation of tank object for usage in consumption part of a dive.

tank(
  vol,
  press,
  rules = list(rules = c(mid = 50, res = 25), sys = "%"),
  gas = c("Air"),
  typ = c("back", "relay"),
  limit = NULL,
  name = NULL
)

Arguments

vol

tank volume in litre.

press

tank pressure in bar.

rules

tank rules to watch during a dive. A list of two named element :

"rules"

vector of 2 named integer indicating a percentage or a pression. The names will be used in the plot function later

"sys"

character string, either ' between 0 and 100.

You can set them to 0 if you don't want to use them

gas

tank gas, by default "Air". Parameter is here for future dev.

typ

tank type, by default "back"

"solo"

single tank

"relay"

single tank to be dropped at certain time

limit

a two element vector with times between which the tank is not used. Can be used to mimic an accident, or a relay tank.

name

Possibility to name the tank for better understanding after. by default will be named after the typ and volume.

Details

To set a relay tank, rule1 and rule2 must be the same. Therefore the tank won't be usable once pressure reach rule2 and until all other tanks are not used. If multiple tanks are used, the relay must be the first one in order.

Author

Jaunatre Maxime <maxime.jaunatre@yahoo.fr>

Examples

tank(vol = 12, press = 200)
#> $carac #> vol press rule1 rule2 #> 12 200 100 50 #> #> $typo #> gas typ rule1 rule2 name #> "Air" "back" "mid" "res" "back12" #> #> $limit #> mind maxd t1 t2 #> 0 66 NA NA #> #> attr(,"class") #> [1] "tank"
tank(vol = 12, press = 200, rules = list(rules = c('retour' = 120, 'reserve' = 120), sys = "bar"), typ = 'relay')
#> $carac #> vol press rule1 rule2 #> 12 200 120 120 #> #> $typo #> gas typ rule1 rule2 name #> "Air" "relay" "retour" "reserve" "relay12" #> #> $limit #> mind maxd t1 t2 #> 0 66 NA NA #> #> attr(,"class") #> [1] "tank"