//------------------------------------------------------------------------------------------------------------------------------
function CalcSiple(td,ws: double; Units: TWSUnits): double;
var
mps : double;
begin
if (td<>missing) and (ws<>missing) then
begin
if Units=wuMPS then
mps:=ws
else
mps:=KtsToMps*ws;
if ((mps>1.79) and (td<33)) then
result:=33+(td-33)*(0.474+(0.454*sqrt(mps))-(0.0454*mps))
else
result:=td;
end
else result:=missing;
end;
//------------------------------------------------------------------------------------------------------------------------------
function CalcCourt(td: double; ws: integer; Units: TWSUnits): double;
var
mps : double;
begin
if (td<>missing) and (ws<>missing) then
begin
if Units=wuMPS then
mps:=ws
else
mps:=KtsToMps*ws;
if ((mps>1.79) and (td<33)) then
result:=33+(td-33)*(0.550+(0.4178*sqrt(mps))-(0.0454*mps))
else
result:=td;
end
else result:=missing;
end;
//------------------------------------------------------------------------------------------------------------------------------