237 return plato_to_sg(brix / my_brix_correction); |
237 return plato_to_sg(brix / my_brix_correction); |
238 return plato_to_sg(brix); |
238 return plato_to_sg(brix); |
239 } |
239 } |
240 |
240 |
241 |
241 |
|
242 /* |
|
243 * @brief Calculate Final Gravity. |
|
244 * Formula by Petr Novotny, Zymurgy July/August 2017. |
|
245 * @param o_plato Original Plato. |
|
246 * @param refracto the refractometer reading. |
|
247 * @return Final gravity. |
|
248 */ |
|
249 double Utils::brix_to_fg(double o_plato, double refracto) |
|
250 { |
|
251 double FBc = refracto / my_brix_correction; |
|
252 |
|
253 double rc = round((1 + (0.006276 * FBc) - (0.002349 * o_plato)) * 10000.0) / 10000.0; |
|
254 // qDebug() << "brix_to_plato" << o_plato << refracto << FBc << "rc" << rc; |
|
255 return rc; |
|
256 } |
|
257 |
|
258 |
242 double Utils::calc_svg(double og, double fg) |
259 double Utils::calc_svg(double og, double fg) |
243 { |
260 { |
244 if (og == 0.0 || fg == 0.0) |
261 if (og == 0.0 || fg == 0.0) |
245 return 0; |
262 return 0; |
246 |
263 |