Rockbox Development > Feature Ideas
Unit Conversion Plugin
MItaly:
--- Quote from: redblade8 on October 04, 2010, 06:25:22 PM ---the teacher is insistent on everything being in inches is not good, lol.
--- End quote ---
[OT]
Which is definitely right. The morons who invented Imperial units deserved painful death. ::)
[/OT]
redblade8:
--- Quote from: froggyman on October 04, 2010, 08:39:52 PM ---You could use the calculator in rockbox to help you with your conversions. Assuming you know your conversion factors.
--- End quote ---
True. It's like 2.5 cm to an inch I think...Instead of having a big sheet of all the conversions on it ,having a plugin would be a nice shortcut to all that.
'Which is definitely right. The morons who invented Imperial units deserved painful death. Roll Eyes'
lol very true. Because I live so close to the U.S ( In Canada FTW ) this is why my teacher is insistent on everything being in inches. -- T_T Right now I don't even know my height in cm's its that bad...
Damned Americans and their inches =P
Lope:
--- Quote from: oayz on October 04, 2010, 09:26:35 PM ---This may make plugin simple and expandable (if you agree)
--- End quote ---
Thats a good idea to standardize it so that it is expandable, but lets make it better!
The system you suggested won't work for temperature. And while we're at it, we might as well allow it to work for formulas requiring multiple inputs.
(first you choose a conversion type)
Length
Area
Volume
etc
(choose what you want to convert to)
for length group: Inches, Feet, Miles, etc
(then it asks you for the inputs)
(then you can change the output type)
Data format suggestion:
//group,to,formula
electronics,V,I*R
temperature,Tc,0.55555*(Tf-32)
length,cm,inches*2.54
length,inches,cm/2.54
The parser will ask for all the variables listed in the formula, then output the result.
Then the parser will look for possible conversions in the same group where the only variable in the 'formula' is the current output type. So when u press the 'change output type' button, it will cycle through other measurements.
oayz:
Lope, you're right for temp we need formula, not just a coefficient. Standard "=-/*" operations is not a problem but for more advanced stuff (power, exponent, log) we will need to come up with some notation ("pow" or "^", log/ln/logN etc.)
I like your "multiple input" idea - this way we will get something better than simple unit conversion. Just one suggestion - we probably need some way to help parser to identify variables in the expression. May be something like this:
area,area,2*3.141592654*pow(%radius%,2)
Lope:
oayz: sounds good! :)
Can't wait for this plugin :) its gonna be awesome
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version