Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to show calculations #763

Open
matty0ung opened this issue Jul 18, 2023 · 4 comments
Open

Option to show calculations #763

matty0ung opened this issue Jul 18, 2023 · 4 comments

Comments

@matty0ung
Copy link
Contributor

matty0ung commented Jul 18, 2023

          Good morning programmers,

Just a thought from a user trying to understand a bit more without the
desire or skills to dive into programming.

Would it be possible to build in a way to check and/or ajust formula's
according to ones own experience? I don't like the idea that I can not
see the calculations behind the outcome.
I know my input and I see the output but what's going on in the black
box?

Thanx

Rob

Originally posted by @ID2GO in #715 (comment)

@matty0ung
Copy link
Contributor Author

Hello,

I haven't looked at this in detail, but I imagine it would be possible in most cases to show the calculations, albeit with a couple of caveats:

  • Internally, the code does everything in metric units (kilograms, liters, degrees Celsius, etc). So, for anyone using US Customary or Imperial units, the calculations might be a bit harder to follow.
  • In a small number of places, we use "look-up tables", where the explanation would have to be something along the lines of "from amount X, we look up the closest corresponding amount Y from a standard look-up table". Eg, all the data in https://github.com/Brewtarget/brewtarget/blob/develop/src/measurement/SucroseConversion.cpp was compiled from actual measurements by folks at the US Department of Agriculture back in 1936!
  • From memory there are a few cases where we have a formula for how to get x from y and we then use some numerical methods (eg divide and conquer) to do the reverse (get y from x) because the actual formula to get y from x would be more painful to use. This all works fine, but we'd have to think about how to show what's going on!

However, if you wanted to be able to arbitrarily adjust any formula in the program, that would be a somewhat taller order (and, in all honesty, not something I imagine many people would want). There are already a fair few parameters you can modify, and, in some cases, you have a choice of algorithms -- eg you can choose between Tinseth, Garetz, and Rager methods for estimating how hop additions affect bitterness levels in the wort at the end of the boil. So, it might, more realistically, be a question of finding out which existing parameters you need to tweak or whether there are any others that could usefully be added.

@matty0ung
Copy link
Contributor Author

I think being able to show our calculations is definitely a good idea by the way. For one thing, it would help ensure we are doing things correctly.

@ID2GO
Copy link

ID2GO commented Jul 19, 2023 via email

@matty0ung
Copy link
Contributor Author

Please keep asking questions! I'm still learning bits of the software myself, so I definitely don't know all the answers, but one way or another we can get to the solution.

I don't know if you already know about this feature, but you can put in actual figures for OG, FG and so-on in BrewNotes (select a recipe and click the right-most icon on the top row). But, yes, if you want to systematically tweak the formulas, that would be a new feature.

I'm still deep down a rabbit hole on BeerJSON at the moment. But when that's finally finished, I want to come back and look at all the formulas etc -- for this and for #728. It's in the nature of things that a lot of the calculations are estimates or approximations, but my ambition is that we should be as clear and as accurate as possible with them -- including allowing you to take account of factors such as insulated kettles etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants