1477 sugarsm = 0, // fermentable sugars in mash |
1477 sugarsm = 0, // fermentable sugars in mash |
1478 vol = 0, // Volume sugars after boil |
1478 vol = 0, // Volume sugars after boil |
1479 addedS = 0, // Added sugars after boil |
1479 addedS = 0, // Added sugars after boil |
1480 addedmass = 0, // Added mass after boil |
1480 addedmass = 0, // Added mass after boil |
1481 mvol = 0, // mash volume |
1481 mvol = 0, // mash volume |
|
1482 infuse = 0, // mash infuse volume |
1482 colort = 0, // Colors srm * vol totals |
1483 colort = 0, // Colors srm * vol totals |
1483 colorh = 0, // Colors ebc * vol * kt |
1484 colorh = 0, // Colors ebc * vol * kt |
1484 colorn = 0, // Colors ebc * pt * pct |
1485 colorn = 0, // Colors ebc * pt * pct |
1485 my_100 = false, |
1486 my_100 = false, |
1486 mashtime = 0, // Total mash time |
1487 mashtime = 0, // Total mash time |
1501 if (dataRecord.mashs.length) { |
1502 if (dataRecord.mashs.length) { |
1502 for (i = 0; i < dataRecord.mashs.length; i++) { |
1503 for (i = 0; i < dataRecord.mashs.length; i++) { |
1503 row = dataRecord.mashs[i]; |
1504 row = dataRecord.mashs[i]; |
1504 if (parseFloat(row.step_type) == 0) // Infusion |
1505 if (parseFloat(row.step_type) == 0) // Infusion |
1505 mvol += parseFloat(row.step_infuse_amount); |
1506 mvol += parseFloat(row.step_infuse_amount); |
1506 if (row.step_temp <= 75) { // Ignore mashout |
1507 if (row.step_temp <= 75 && row.step_temp >= 60) { // Ignore mashout |
1507 timem = row.step_time + row.ramp_time; |
1508 timem = row.step_time; |
|
1509 if (i > 0) |
|
1510 timem += row.ramp_time; |
1508 mashtime += timem; |
1511 mashtime += timem; |
1509 mashtemp += timem * row.step_temp; |
1512 mashtemp += timem * row.step_temp; |
1510 } |
1513 } |
1511 } |
1514 } |
1512 if (mashtime > 5) |
1515 infuse = mvol; |
1513 mashtime -= 5; //Correct last ramp > 75 |
|
1514 mashtemp = Round(mashtemp / mashtime, 2); |
1516 mashtemp = Round(mashtemp / mashtime, 2); |
1515 } else { |
1517 } else { |
1516 console.log("calcFermentables() no mash steps"); |
1518 console.log("calcFermentables() no mash steps"); |
1517 } |
1519 } |
1518 |
1520 |
1693 } |
1695 } |
1694 } |
1696 } |
1695 calcSupplies(); |
1697 calcSupplies(); |
1696 if (svg == 0) |
1698 if (svg == 0) |
1697 svg = 77; |
1699 svg = 77; |
1698 |
1700 if ((mashkg > 0) && (infuse > 0) && (mashtime > 0) && (mashtemp > 0)) { |
1699 if ((mashkg > 0) && (mash_infuse > 0) && (mashtime > 0) && (mashtemp > 0)) { |
1701 dataRecord.est_fg = estimate_fg(psugar, pcara, infuse / mashkg, mashtime, mashtemp, svg, dataRecord.est_og); |
1700 dataRecord.est_fg = estimate_fg(psugar, pcara, mash_infuse / mashkg, mashtime, mashtemp, svg, dataRecord.est_og); |
|
1701 } else { |
1702 } else { |
1702 dataRecord.est_fg = estimate_fg(psugar, pcara, 0, 0, 0, svg, dataRecord.est_og); |
1703 dataRecord.est_fg = estimate_fg(psugar, pcara, 0, 0, 0, svg, dataRecord.est_og); |
1703 } |
1704 } |
1704 $('#est_fg').val(dataRecord.est_fg); |
1705 $('#est_fg').val(dataRecord.est_fg); |
1705 $('#est_fg2').val(dataRecord.est_fg); |
1706 $('#est_fg2').val(dataRecord.est_fg); |