General Category > BeerXML Projects
Too many units!
Michele:
BeerXML should standardize a recipe, so I'm missing the point of using so many weight and volume units... I think conversion should be a "program feature" following "user's preferences" and BeerXML should ALWAYS be written in standard units (like BeerXML 1.0).
Instead of "complicating" BeerXML I would suggest to "expand" BeerXML. I.e. I do support the idea of implementing batches xml's description.
AntonW:
Hi Michele,
The convention for unit support in a recipe is to record the specific amount in the units native to the device performing the measurement. By default, SI units are preferred but not required. It is up to the brewing software to convert those values to display them in a reasonable way to the brewing software user. While the BeerXML v1 approach was simpler, it also introduces small systematic errors in conversion for those users not using all SI units and records those errors directly in the BeerXML v1 data. Unit-specific attributes were added to avoid those errors in BeerXML v2 data and to add more explicit visibility to the unit type being recorded.
If you'd like to discuss this further or have questions please let me know,
-Anton
Michele:
Yes, I understand that conversion may introduce some small errors, but keeping enough decimal places and the use of a simple "Round" function can solve this problem. :)
Instead of this "simple way" BeerXML 2.0 will introduce a complication. ???
AntonW:
Hi Michele,
Most brewing software developers already support storing the values as one base unit and displaying those values in a different base unit if the user prefers a specific unit type. So I'm having a tough time understanding the difficulty you're having supporting these conversions. Again, there is a problem with enforcing a "standardized" recipe unit as you are suggesting (as per BeerXML v1). For example If my scale reads out in pounds and is accurate to say (0-500 lbs +/- 0.05 lb ) and I accurately measure 245.0 lbs of grain. Now when I convert that to kilograms I can only state an accurate measurement of 111.1 kg grain, based on the significance of the pounds measure. Now when I go to convert the 111.1 kg into pounds I get 244.9 lbs instead of the 245.0 measurement above. While 0.2 lbs of grain won't be significant in a 2 bbl batch why introduce these small systematic errors if we can take a more elegant approach?
If we choose to store more decimal places as you suggest, then we completely ignore the accuracy of the original measurement and will be required to set an arbitrary accuracy within each brewing program. While that is possible, it's not reasonable for others to have to know the rounding approach your software is taking when you create a BeerXML recipe. That's one of the reasons why we decided to change the approach to record the units along with the measurement. That way you can internally keep as many decimal places as you'd like within your brewing program while it's running and displaying those units. As a side benefit, there is no question as to which units the value was measured because they are associated explicitly with the numerical value within the same element.
-Anton
Michele:
--- Quote from: AntonW on October 23, 2010, 12:55:00 PM ---If we choose to store more decimal places as you suggest, then we completely ignore the accuracy of the original measurement
--- End quote ---
That's true. So you probably think to manage every measured value as a string in the program else you'll loose the accuracy. That's "quite annoying" to develop, but honestly good.
BTW: If a user inserts "10000 grams" of a malt how many significance digit would you consider? 1? 5? :P Does your user really know that you consider exactly the number of digits he used? Will he really write 245.0 or will he simply write 245? For basic users I think it's better that the developer decide the number of significant digits. Of course that's just my opinion... ;)
Ciao
Michele
Navigation
[0] Message Index
[#] Next page
Go to full version