This sensor from TPF collection
Article | |
---|---|
Collibration | |
Precision | |
Ranges | |
Renew sensors |
source("utilities_tpf.r"); sensors.t.hbl_pl_spear_1981_b <- function(Hbl, Pl, P, ...){ Pl <- tpf.recalc_minaral("PL",Pl); Hbl <- tpf.recalc_minaral("HBL",Hbl); X <- Pl$Na_pfu / (Pl$Na_pfu + Pl$K_pfu + Pl$Ca_pfu); Y <- Hbl$Ca_pfu; Z <- Hbl$Na_pfu; K <- Hbl$Mg_pfu + Hbl$Fe_p2_pfu + Hbl$Fe_p3_pfu + Hbl$Ti_pfu + Hbl$Cr_pfu + Hbl$Al_c4_pfu + Hbl$Al_c6_pfu + Hbl$Si_pfu; N <- 13 / K; Y <- Y * N; Z <- Z * N; if (Y<2) { if (Y + Z>2) { N <- Z - 2 + Y; T <- ( - 0.257 * P * 1000 + 7075) / ( - 1.9872 * log(N / (1 - N) / X) + 6.86) - 273; } if (Y + Z<2) { warning(" CANNOT BE USED FOR (CA+NA) IN HBL < 2"); } } if (Y>2) { warning(" CANNOT BE USED FOR CA IN HBL > 2"); } return(data.frame(Name=paste0(Pl$Name,"-", Hbl$Name),P=P,T_calc=T)); } sensors.t.hbl_pl_spear_1981_b.args <- function(){ ars <- list(); ars$minerals <- c("Hbl", "Pl"); ars$ranges <- c("P"); return(ars); } #sensors.t.hbl_pl_spear_1981_b.test <- function(){ # #}