diff -r 023ca640b5af -r 1365b5e47130 www/js/global.js --- a/www/js/global.js Mon May 13 12:50:24 2019 +0200 +++ b/www/js/global.js Mon May 13 16:26:28 2019 +0200 @@ -294,9 +294,10 @@ var IBUmethodAdapter = new $.jqx.dataAdapter(IBUmethodSource); var ColorMethodData = [ - { id: 0, en: 'Morey', nl: 'Morey' }, - { id: 1, en: 'Mosher', nl: 'Mosher' }, - { id: 2, en: 'Daniels', nl: 'Daniels' } + { id: 0, en: 'Morey', nl: 'Morey' }, + { id: 1, en: 'Mosher', nl: 'Mosher' }, + { id: 2, en: 'Daniels', nl: 'Daniels' }, + { id: 3, en: 'Halberstadt', nl: 'Halberstadt' } ]; var ColorMethodSource = { localdata: ColorMethodData, @@ -735,6 +736,36 @@ /* + * Return incremented color by the boil and yeast. + * https://www.hobbybrouwen.nl/forum/index.php/topic,19020.msg281132.html#msg281132 + */ +function get_kt(ebc) { + + var kt = 1; + if (ebc < 3) + kt = 3.5; + else if (ebc < 6) + kt = 3; + else if (ebc < 8) + kt = 2.75; + else if (ebc < 10) + kt = 2.5; + else if (ebc < 20) + kt = 1.8; + else if (ebc < 30) + kt = 1.6; + else if (ebc < 60) + kt = 1.3; + else if (ebc < 100) + kt = 1.2; + else if (ebc < 300) + kt = 1.1; + return kt; +} + + + +/* * Alcohol By Volume */ function abvol(og, fg) { @@ -768,7 +799,7 @@ /* - * Kleurwerking naar SRM + * Kleurwerking naar SRM. Niet voor Halberstadt. */ function kw_to_srm(colormethod, c) { @@ -778,6 +809,8 @@ return 0.3 * c + 4.7; if (colormethod == 2) // Daniels return 0.2 * c + 8.4; + if (colormethod == 3) // Halberstadt + return 0; }