318 * -0.00356 Attenuation factor percentage crystal malt |
315 * -0.00356 Attenuation factor percentage crystal malt |
319 * 0.00553 Attenuation factor percentage simple sugars |
316 * 0.00553 Attenuation factor percentage simple sugars |
320 * 0.547 Attenuation factor constant |
317 * 0.547 Attenuation factor constant |
321 * 0.597 Attenuation factor constant when STA1 gen is true. |
318 * 0.597 Attenuation factor constant when STA1 gen is true. |
322 */ |
319 */ |
323 double AttBeer = 0.00825 * svg + 0.00817 * BD - 0.00684 * mashtemp + 0.00026 * mashtime - 0.00356 * pcara + 0.00553 * psugar; |
320 double top_mashtemp = 66.11; /* Highest fermentable at 151 degrees fahrenheit */ |
|
321 /* |
|
322 * Derived from Karl Troester's data and Matt Kahn. |
|
323 */ |
|
324 if (mashtemp > top_mashtemp) { |
|
325 /* Above optimum mash temperature decrease attenuation */ |
|
326 att_mashtemp = - 0.00684 * mashtemp; |
|
327 } else { |
|
328 /* Below optimum mash temperature decrease slowly attenuation */ |
|
329 att_mashtemp = - 0.00684 * (top_mashtemp + (top_mashtemp - mashtemp) / 4); |
|
330 } |
|
331 |
|
332 double AttBeer = 0.00825 * svg + 0.00817 * BD + att_mashtemp + 0.00026 * mashtime - 0.00356 * pcara + 0.00553 * psugar; |
324 AttBeer += (sta1) ? 0.597:0.547; |
333 AttBeer += (sta1) ? 0.597:0.547; |
325 qDebug() << "estimate_fg(" << psugar << pcara << wgratio << mashtime << mashtemp << svg << og << sta1 << ") AttBeer:" << AttBeer; |
334 qDebug() << "estimate_fg(" << psugar << pcara << wgratio << mashtime << mashtemp << svg << og << sta1 << ") AttBeer:" << AttBeer; |
326 return round((1 + (1 - AttBeer) * (og -1)) * 10000) / 10000; |
335 return round((1 + (1 - AttBeer) * (og -1)) * 10000) / 10000; |
327 } |
336 } |
328 |
337 |