Question
I need to calculate the Vapor Pressure Deficit (VPD) using a php function and the given is temprature in fahrenheit and relative humidity as a
I need to calculate the Vapor Pressure Deficit (VPD) using a php function and the given is temprature in fahrenheit and relative humidity as a whole number so if the relative humidity is 60% the $humidity variable equals 60. This is what I have but its not producing the correct value.
Im using the formula from:
https://betterorganix.com/blog/what-is-how-to-calculate-vapour-pressure-deficit/
My code is:
function VPD($temp,$humidity) { $p1=(7.5*$temp); $p2=(237.3+$temp); $power=$p1/$p2;
$SVP = (610.7*10^$power)/1000; $VPD = ((100 - $humidity)/100)*$SVP;
return $VPD; }
echo(VPD(21.5,49.0));
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started