www/includes/formulas.php

changeset 653
aa25efa1d629
parent 544
f3faa54581ff
child 655
f4e00869f39f
equal deleted inserted replaced
652:a5d9ec7e2239 653:aa25efa1d629
113 } 113 }
114 114
115 115
116 116
117 function sg_to_plato($sg) { 117 function sg_to_plato($sg) {
118 if ($sg > 0.5) 118 // if ($sg > 0.5)
119 return 259 - 259 / $sg; 119 // return 259 - 259 / $sg;
120 return 0; 120 // return 0;
121 return -668.962 + (1262.45 * $sg) - (776.43 * $sg * $sg) + (182.94 * $sg * $sg * $sg);
121 } 122 }
122 123
123 124
124 125
125 function plato_to_sg($plato) { 126 function plato_to_sg($plato) {
126 if ($plato < 259) 127 // if ($plato < 259)
127 return 259 / (259 - $plato); 128 // return 259 / (259 - $plato);
128 return 1.000; 129 // return 1.000;
130 return 1.00001 + (0.0038661 * $plato) + (1.3488e-5 * $plato * $plato) + (4.3074e-8 * $plato * $plato * $plato);
129 } 131 }
130 132
131 133
132 134
133 /* 135 /*

mercurial