Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Unit Conversion Plugin
« previous next »
  • Print
Pages: [1]

Author Topic: Unit Conversion Plugin  (Read 3941 times)

Offline Lope

  • Member
  • *
  • Posts: 30
Unit Conversion Plugin
« on: October 04, 2010, 06:46:37 AM »
Firstly thanks to all the RockBox contributors. You ROCK!
(more rambling at the bottom)

Unit conversion is something I always seem to need when out and about.
All the popular units with the most common ones at the top (or chronological order within a family)

MPG <> l/100km <> km/l
litres <> gallons <> ounces <> ml <> cubic feet <> cubic meters
fahrenheit <> centigrade
yards <> feet <> inches <> meters <> centimeters <> mm <> km <> miles <> light years
(flow rate) gpm <> lpm <> gph <> lph
mph <> km/h <> m/s <> mach <> light speed
acre <> hectare <> m^2 <> km^2 <> miles^2 <> inch^2 <> cm^2 <> mm^2 <> ft^2
(pressure) bar <> psi <> Pa <> kPa <> lbft
(energy usage) watt-second <> kWh
(force): pound force <> newtons <> kilogram force <> gram force
LED illumination: mcd * angle <> lumens
picowatt <> nanowatt <> watts <> kilowatts <> megawatts <> gigawatts <> horsepower <> BTU/second <> BTU/hour


basic math should be allowed on the final result.
Eg: Energy 250W convert to kWh * 24 = kWh per day.

==========
I've been keen for years to get a decent mp3 player with rockbox.
Finally the sansa Clip+ has arrived :)
If the sansa Fuze had controls that could be operated without looking I would have gotten that.
I absolutely love the clip and how powerful you guys have made this thing with RockBox!
Favourite features of the Sansa Clip+: Sound quality, Decent size internal memory, microSD slot, Affordable, folder browsing, standard mini-usb plug, Weighs nothing, tiny, can operate without looking at screen.
When I've got some time I'll also play around with making plugins and themes.
Thanks!
« Last Edit: October 04, 2010, 11:49:56 AM by Lope »
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Unit Conversion Plugin
« Reply #1 on: October 04, 2010, 09:33:43 AM »
I am sure if someone made such a plugin that it would be accepted.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline redblade8

  • Member
  • *
  • Posts: 155
Re: Unit Conversion Plugin
« Reply #2 on: October 04, 2010, 06:25:22 PM »
I was looking just the other day to see if rockbox had such an application on it. I was hoping to convert cm to inches" . Making a goban when you only have cm dimensions & the teacher is insistent on everything being in inches is not good, lol.
Logged
Every mp3 dies on me.

Offline froggyman

  • Member
  • *
  • Posts: 214
Re: Unit Conversion Plugin
« Reply #3 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.
Logged
iPod Video 5.5G 30GB - Now Dead :(
Sansa Fuzev2 4GB

"To prevent this day from getting worse, I'll just read ERROR as GOOD THING"

Offline oayz

  • Member
  • *
  • Posts: 86
Re: Unit Conversion Plugin
« Reply #4 on: October 04, 2010, 09:26:35 PM »
This may make plugin simple and expandable (if you agree)

Make conversion definition in the separate text file, something like this:
//group,from,to,coefficient
length,mm,inch,25.4
length,inch,ft,12

Interface:

Group_pulldown_list

From_pulldown_list      To_pulldown_list
Numerical_edit_field    Result

0123456789.<-C


Up/Dn moves between pull_down lists and numerical_entry field. Left/Right/wheel selects item in the list. Data entry (in numerical_entry field) is done by simplified virtual keyboard ("<-" is delete, "C" is clear field). Result is updated immediately (no need for "enter")

Logged

Offline MItaly

  • Member
  • *
  • Posts: 16
Re: Unit Conversion Plugin
« Reply #5 on: October 05, 2010, 05:06:25 AM »
Quote from: redblade8 on October 04, 2010, 06:25:22 PM
the teacher is insistent on everything being in inches is not good, lol.
[OT]
Which is definitely right. The morons who invented Imperial units deserved painful death.  ::)
[/OT]
Logged

Offline redblade8

  • Member
  • *
  • Posts: 155
Re: Unit Conversion Plugin
« Reply #6 on: October 05, 2010, 01:04:36 PM »
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.

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
Logged
Every mp3 dies on me.

Offline Lope

  • Member
  • *
  • Posts: 30
Re: Unit Conversion Plugin
« Reply #7 on: October 06, 2010, 08:06:05 AM »
Quote from: oayz on October 04, 2010, 09:26:35 PM
This may make plugin simple and expandable (if you agree)
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.
Logged

Offline oayz

  • Member
  • *
  • Posts: 86
Re: Unit Conversion Plugin
« Reply #8 on: October 07, 2010, 05:41:48 PM »
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)
Logged

Offline Lope

  • Member
  • *
  • Posts: 30
Re: Unit Conversion Plugin
« Reply #9 on: October 09, 2010, 02:52:48 AM »
oayz: sounds good! :)
Can't wait for this plugin :) its gonna be awesome
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Unit Conversion Plugin
« Reply #10 on: October 09, 2010, 02:52:28 PM »
Does that mean you're working on it?
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline Lope

  • Member
  • *
  • Posts: 30
Re: Unit Conversion Plugin
« Reply #11 on: October 10, 2010, 02:03:45 PM »
Hehe. not yet. When I have time I'd love to contribute to Rockbox. Not possible atm.
Its just so awesome, it WILL be done :D
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Unit Conversion Plugin
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.104 seconds with 14 queries.