www/includes/formulas.php

changeset 11
d341f0a91a91
child 83
85521c6e0022
equal deleted inserted replaced
10:606b4af8f918 11:d341f0a91a91
1 <?php
2
3
4 function ebc_to_srm($ebc)
5 {
6 // Srm = -1.32303E-12*Ebc4-0.00000000291515*Ebc3+0.00000818515*Ebc2+0.372038*Ebc+0.596351
7 return -1.32303E-12 * pow($ebc, 4) - 0.00000000291515 * pow($ebc, 3) + 0.00000818515 * pow($ebc, 2) + 0.372038 * $ebc + 0.596351;
8 // return $ebc * 0.508;
9 }
10
11
12 function srm_to_ebc($srm)
13 {
14 // EBC = 0.000000000176506*Srm4+ 0.000000154529*Srm3-0.000159428*Srm2+2.68837*Srm-1.6004
15 //
16 // Formule van Adrie Otten. brouwhulp.
17 $ebc = 0.000000000176506 * pow($srm, 4) + 0.000000154529 * pow($srm, 3) - 0.000159428 * pow($srm, 2) + 2.68837 * $srm - 1.6004;
18 return round($ebc);
19 }
20
21
22 ?>

mercurial