R/arousalTime_fun.R

Defines functions arousalTime

Documented in arousalTime

#' Calculate time to arouse from torpor to euthermic temperatures
#'
#' \code{arousalTime} Calculates time to arouse to euthermic conditions
#' given ambient conditions
#'
#' @param Ta ambient temperature
#' @param bat.params list of parameters output from \code{\link{batLoad}}
#'
#' @example ExampleScripts/arousalTime_ex.R
#'
#' @family Arousal Functions
#' @seealso \code{\link{arousalEnergy}}, \code{\link{coolTime}},
#' \code{\link{coolEnergy}}, \code{\link{euthermicEnergy}},
#' \code{\link{flyingEnergy}}, \code{\link{flyingTime}}
#'
#' @references McKechnie & Wolf 2004 equation 3
#' @export
arousalTime <- function(Ta, bat.params){
  with(bat.params,{
    ifelse(Ta > Ttormin,
           ((Teu - Ta)/WR),
           ((Teu - Ttormin)/WR))
  })
}
cReedHranac/batwintor documentation built on Jan. 27, 2020, 7:39 p.m.