Vicky/Pete,
I finally got around to doing the next version.
Changes:
- Method of calculation now uses a third degree polynomial to determine Brix from SG, rather than assuming 8 gravity points per gallon of honey in 5 gallons. (thenew value is between 6 and 7 gravity points)
- Switched layout location of Target SG & Vol with Current SG & Vol (as suggested by Angus)
- Potential Alcohol Conversion utility added
- Conversion of quarts/pints/cups/... to Gallons fixed
- Blending utility selects the volume when you click the associated text entry box
- Blending utility added radio buttons to change the headings (eye candy!)
- Batch Util calculations now use 3rd degree polynomials to convert SG to Plato/Brix/Balling
- Blending Utility now has buttons to select which value to calculate
- Changing the Gravity type or PA type on the Batch Utility changes the selection on the Potential Alc utility (but not vice versa)
- Added reset and clear buttons to the Blending Util
Note, the change in layout (2nd dot point) may confuse people for a bit, since the results are at the top, not the bottom now.
An obvious addition is dot point 3, the Potential Alcohol Conversion (I've forgotten who suggested this, but thanks!)
[Note: the attached doc files contain html. I had to save it as a doc file to attach them. Attaching as a zip file didn't work]
Ooooooh....This sounds great! When do we get to see this beauty?
Last edited by Medsen Fey; 01-13-2010 at 09:17 PM.
Lanne pase toujou pi bon
(Past years are always better)
Hello James. Looking forward to it. I see you changed some volume conversions, but did you fix the liter conversion too?
Well, when going from 1kg of honey to liters, it will say that this will be equal to 1.333 liters
If this were true the density of honey would be around 0,75 kg/liter, which isn't right.
The density of water should be around 1 kg/liter
The density of honey should be around 1.36 kg/liter
So I think you may have gotten the relationship inversed somehow.
It is fixed in V1.0 (1kg honey <-> 0.6955 Litre)
However, weight to volume conversion is not fully accurate without including the density of the "material". I haven't added that much complexity to the calculator (yet).
So weight measures are assuming that "sugars" plus water contributes fully to the density, which of course is not true, but is close enough for honey.
If you puree fruit, then weight/volume conversion should be close enough also.
James, I uploaded the new code, and created the new help page. The help window is a bit narrow, suggestions on how to change the code so it opens up wider?
Looks *fab*. Thanks *so* much for doing this. You are a true friend, and I can't tell you how much I appreciate your work on this.
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
It looks great, but it doesn't seem to be calculating. Is is turned on yet?
Lanne pase toujou pi bon
(Past years are always better)
The code is in, and it should work.
James, when I put in code like that, I can only use what's between the body tags. Does this affect the code's ability to work?
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
Looks good, but it isn't calculating for me either. This message popped up when I clicked on the link: "overLIB 4.10 or later is required for the HideForm Plugin."
BTW, I am using Firefox 3.5.7
Workin on it guys. I'll get with James and we'll get it fixed.
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
Looks like it won't calc because the <body onclick> function is missing. However, I can't put that in a php generated page, so I'll get James to give me a function to put in, that should fix it.
Sorry about the problems, folks, we'll get 'er done.
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
Vicky,
looks like not all the javascript code got copied in. Maybe it exceeded the amount of data allowed. (Also check that the data I sent you wasn't somehow truncated).
Either way, he scripts won't run because there will be javascript errors - hence why the calculate button didn't work.
How do we proceed from here?
PS - did you check out the SG table generator ?
James
OK, I re-inserted the code, by hand using the sql tables, and I'm showing all the code in the source when I open the page, but the buttons still don't work...
Thoughts?
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
Vicky,
Yes, all the code is there now.
The only thing I can think of, is to remove the tags that hide the script from HTML,
so change
toCode:<SCRIPT LANGUAGE="Javascript"> <!-- //
Code:<SCRIPT LANGUAGE="Javascript"> //
and remove at the end of the javascript section the corresponding
===============================================Code:// -->
There is another error:
should beCode:onClick="window.open(‘index.php?option=
Code:onClick="window.open('index.php?option=
OK, did this, and help button is working now. But the rest seems to be having issues.
OK, next idea? LOL...
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
Vicky,
The forum is too smart. It converted & into & in the javascript which stopped the scripts working.
Starting from
search for & in an if statement, and replace with just the ampersand symbolCode:<SCRIPT type="text/javascript" LANGUAGE="JavaScript"> // // Residual Sugar at SG=1.000 //
as in
becomesCode:if ( (vMask & 12) == 8) { // do **Target Gravity** (targVol checked, targGrav uncheched)
There should be about seven of these to change.Code:if ( (vMask & 12) == 8) { // do **Target Gravity** (targVol checked, targGrav uncheched)
====================================
Also, I left a degugging statement in there. Can this alert() statement be removed by changing
toCode:vTVol = (vSugar*1000 + (SGToSugarConc(vCSg) * vCVol)) / SGToSugarConc(vTSg); // convert g/L to kg/L //alert(vCSg+' '+vCVol+' '+vTSg+' '+vTVol); theForm.vol_valt.value = Number(vTVol / Number(theForm.targvol_s.options[theForm.targvol_s.selectedIndex].value));
====================================Code:vTVol = (vSugar*1000 + (SGToSugarConc(vCSg) * vCVol)) / SGToSugarConc(vTSg); // convert g/L to kg/L theForm.vol_valt.value = Number(vTVol / Number(theForm.targvol_s.options[theForm.targvol_s.selectedIndex].value));
Also, if you can, change the body tag to be
(the forum software might not let you do this)Code:<BODY onClick="i_updateStats()">
Thanks, heaps!!!
::grumble:: I have been working on this directly in the DB, and it doesn't *have* the & signs converted there, which means it's converting them when the page renders, and I'll have to figure that out. I'll surf the joomla support and figure it out.
The only alert statment I"m turning up is:
I can't use body tags in a content management system, it creates its own body tags, so I can only use what's between the body tags. I did a bit of googling, and found a couple pages where they discuss creating a bit of code to deal with that when you can't do it in the body tag. I closed the page tho and can't seem to turn them back up. But the code looked pretty straightforward (if you're good with javascript, which I'm not, LOL).Code:var vCD = Number(theForm.blend_totvol.value); //alert(vA+'!'+vB+'!'+vC+'!'+vD+'!'+vM+'!'+vCD); // ensure blen value is BETWEEN value#1 and value#2
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
OK, by hacking the core code of the site, I think its working ok now. Test it folks, and make sure it comes back with stuff that looks right.
James, get back to me on the other items, we'll get 'em working...
Wassail!
Vicky Rowe
Owner & Webmistress, Gotmead.com
Executive Director, American Mead Makers Association
http://www.mead-makers.org
Making Mead since 1995
Looks like it's working now. Thanks Vicky and James!
Bookmarks