diff -r aaefac2d08a3 -r 22d28dd9c041 www/js/global.js --- a/www/js/global.js Sat Dec 08 17:30:09 2018 +0100 +++ b/www/js/global.js Sun Dec 09 17:29:51 2018 +0100 @@ -106,6 +106,18 @@ /* + * Alcohol By Volume + */ +function abvol(og, fg) { + + if ((4.749804 - fg) != 0) + return 486.8693 * (og - fg) / (4.749804 - fg); + return 0; +} + + + +/* * Kleurwerking naar SRM */ function kw_to_srm(colormethod, c) { @@ -187,7 +199,7 @@ ibu = Math.round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) * 10) / 10; } - console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor); +// console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor); return ibu; }