R/projman.r

Defines functions projman

Documented in projman

#' projman
#'
#' Calculate the Human Body Projection Area factor in function to sun elevation. 
#'
#' @param sunelev numeric Sun elevation in degrees.
#'
#' @return Projection factor
#'
#' @author Istituto per la Bioeconomia CNR Firenze Italy  Alfonso Crisci \email{alfonso.crisci@@ibe.cnr.it}
#'
#' @keywords  Area projection factor. 
#' @references Jendritzky G (1990) Bioklimatische Bewertungsgrundlage der Raume am Beispiel von. 27 mesoskaligen Bioklimakarten.
#' @export
#'
#'
#'
#'

projman=function(sunelev) {
                         ct$assign("sunelev", as.array(sunelev))
                         ct$eval("var res=[]; for(var i=0, len=sunelev.length; i < len; i++){ res[i]=proj(sunelev[i])};")
                         res=ct$get("res")
                         return(ifelse(res==9999,NA,res))
}
alfcrisci/rBiometeo documentation built on Feb. 1, 2024, 4:47 p.m.