R/atm_pressure.R

Defines functions atm_pressure

Documented in atm_pressure

#' @title Barometric formula (Atm. Pressure)
#' @description The barometric formula, sometimes called the exponential atmosphere or
#' isothermal atmosphere, is a formula used to model how the pressure
#' or density of the air changes with altitude. The pressure drops
#' approximately by 11.3 Pa per meter in first 1000 meters above sea level.
#' 1 Kilopascals (kPa)	=	0.01 bar
#' See more about the Barometric formula at the
#' [barometric-formula](https://www.math24.net/barometric-formula/)
#'
#' @author Dr. Raúl Trujillo Álvarez
#' @param masl metres above sea level
#' @return Atmospheric pressure in bar
#' @export
#' @examples
#' atm_pressure(2600)
#'
#'@section Last updated by:
#'Dr. Trujillo
#'
#'@section Last update date:
#'2021/10/24

atm_pressure  <- function(masl = 0 ) {
  p_at <- 101.325*exp(-0.000118547*masl)*0.01
  return(p_at)
}
ratral/hyd4gpv documentation built on Feb. 5, 2022, 10:30 p.m.