www/includes/formulas.php

changeset 88
0a39cbdcf085
parent 87
7f1d0abe5571
child 89
082c23b26055
equal deleted inserted replaced
87:7f1d0abe5571 88:0a39cbdcf085
161 if ($attenuation < 30) 161 if ($attenuation < 30)
162 $attenuation = 77; 162 $attenuation = 77;
163 163
164 $AttBeer = 0.00825 * $attenuation + 0.00817 * $BD - 0.00684 * $Temp + 0.00026 * $TotTme - 0.00356 * $percCara + 0.00553 * $percSugar + 0.547; 164 $AttBeer = 0.00825 * $attenuation + 0.00817 * $BD - 0.00684 * $Temp + 0.00026 * $TotTme - 0.00356 * $percCara + 0.00553 * $percSugar + 0.547;
165 $fg = 1 + (1 - $AttBeer) * ($og - 1); 165 $fg = 1 + (1 - $AttBeer) * ($og - 1);
166 // echo $percSugar.' '.$percCara.' '.$attenuation.' attn '.$AttBeer.' FG '.$fg.PHP_EOL;
167 return $fg; 166 return $fg;
167 }
168
169
170
171 function abvol($og, $fg) {
172 if ((4.749804 - $fg) <> 0)
173 return 486.8693 * ($og - $fg) / (4.749804 - $fg);
174 return 0;
168 } 175 }
169 176
170 177
171 178
172 /* 179 /*

mercurial