anscarlett / chromey-calculator

Automatically exported from code.google.com/p/chromey-calculator
2 stars 0 forks source link

Convert to mixed scales #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Thanks for this extension, pretty neat.

Feature request: I'd like to be able to convert from one measurement system 
(say, SI) to another (say, Imperial). I know I can convert single 
measurements, or a combination of measurements, into another unit - but as 
far as I can tell, it can not give me integer values, moving down the 
scale. For example:

192 cm in feet = 6.2992126 feet
192 cm in inches = 75,5905512 inches

What I'd like to see instead:
192 in imperial = 6 feet + 3.5 inches

I know this is a limitation of both Google and Wolfram... but if you could 
proxy this request somehow and split it up, you'd be my heroes.

Original issue reported on code.google.com by k.an...@gmail.com on 20 Mar 2010 at 9:46

GoogleCodeExporter commented 9 years ago
Actually, I've been thinking about implementing something like this for a 
while. Are 
there other units combinations you can think of that might be useful?

Original comment by bwrobin...@gmail.com on 21 Mar 2010 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by bwrobin...@gmail.com on 21 Mar 2010 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by bwrobin...@gmail.com on 21 Mar 2010 at 1:04

GoogleCodeExporter commented 9 years ago
http://gwydir.demon.co.uk/jo/units/ contains a good overview of all the various 
Imperial units - it surprised me how ridiculously complex some of these are :S. 

I'm thinking not in fixed combinations, but in 'as big as needed'. If the value 
you 
want to convert is > 1 of a particular unit, it will use that as the start, 
then take 
the remainder and move down the scale until it reaches the smallest defined.

I'd like to see Weight, Length, Volume and Area.

Original comment by k.an...@gmail.com on 21 Mar 2010 at 10:35

GoogleCodeExporter commented 9 years ago
If something like this were going to be done, shouldn't it be by Google and/or 
Wolfram? Chromey's not going to be a simple calculator much longer if you start 
preprocessing the work you send out. :-p

Original comment by wearenot...@gmail.com on 1 Aug 2010 at 11:20

GoogleCodeExporter commented 9 years ago
Of course - but if the server doesn't do it, we could help it out a little. 
Question is, what do you want to be... a handy tool, or an interface to some 
serverside script? The way I envisioned it would be post- rather than 
preprocessing, though. You convert to "large unit" (say: 28.302 feet), then 
take the decimal part, and convert .302 feet into inches. Yes, this might 
introduce some minor rounding inaccuracy, but that still would be far more 
useful than having .302 feet :)

Original comment by k.an...@gmail.com on 2 Aug 2010 at 5:49

GoogleCodeExporter commented 9 years ago
Down with Imperial unitary scum! Hail decimal and metric clarity!

But in seriousness: current (slow) work around is to take each decimal unit 
less than one and request it in the next smaller unit.

Like:

if you get "7.63 ft" as a result,
then send back ".63 ft in in" so you receive "7.56 inches",
then remember .56 = 56/100 so you send "reduce 56/100" so you receive "14/25",
and finally reassemble the parts manually to get "7 ft. 7 14/25 in."

Whew! Would be handy to do this automagically. I believe WolframAlpha provides 
results in multiple formats, but currently we ask Google first, then ask Wolf' 
if Google doesn't seem to work, then use Wolf's first result. Wolf' doesn't 
always "unitize" fully anyway:

<<7' 7.56">>
http://m.wolframalpha.com/input/?i=7.63+ft&x=0&y=0

Unless we can get the desired behaviour added to Google Calc or WolframAlpha, 
this might wait until we have add a math library to Chromey.

Original comment by iisi50...@gmail.com on 29 Sep 2010 at 6:12

GoogleCodeExporter commented 9 years ago
Issue 45 has been merged into this issue.

Original comment by iisi50...@gmail.com on 29 Sep 2010 at 6:31

GoogleCodeExporter commented 9 years ago
Issue 64 has been merged into this issue.

Original comment by iisi50...@gmail.com on 29 Sep 2010 at 6:48

GoogleCodeExporter commented 9 years ago
>>I'm thinking not in fixed combinations, but in 'as big as needed'. If the 
value you 
>>want to convert is > 1 of a particular unit, it will use that as the start, 
then take 
>>the remainder and move down the scale until it reaches the smallest defined.
I concur with this thinking.  So if you ask for 5.65 feet in feet, inches, and 
16ths you should get 5 feet 7 inches 3/4 inches and 0.8 16ths of an inch.  

This elicits two nuances:
1. If one of the units is in fractions, does the fraction get reduced to lowest 
terms?  My example did.
2. Is the remainder expresssed as a decimal of the smallest unit?

>>I'd like to see Weight, Length, Volume and Area
Another common one would is time.

Original comment by eggy.isl...@gmail.com on 30 Sep 2010 at 4:11