Convert 12500 -> 12k5 etc

For general discussion related FlowStone
Post Reply
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Convert 12500 -> 12k5 etc

Post by RJHollins »

Hi Gang !

I'm designing an interface for various Equalizers. In so doing, I'm trying to implement 'engineering' notation to label the various frequencies. These will be used to notate around a knob guage.

Basically I'm looking to convert like this:

1500 = 1k5
12500 = 12k5
1000 = 1k

800 = 800

etc

I have been putting together a 'green' schematic ... but I have to say ... it has grown into many primitives, and the wiring is starting to get unruly :o

To start, I've been using TROG's 'Array Generator' to begin the listing process ... which has been very handy 8-)

I was then looking to convert that array into this 'engineering' format. BTW ... What is this format correctly call :?:

... and build a new array list that I can place into my 'Guage' module.

Just trying to make the process a bit more automated during the build.

Was wondering ... has anybody already done this :shock: Might you share a hint or three ??? :lol:

I'd post the current schematic ... which works for several 'situations', but not all conditions. If wanted, the schematic is still in 'linear' form ... which means its' all spread out :oops:

Anyway ... just thought to ask before my last brain cell takes yet another beating :|
;)
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Convert 12500 -> 12k5 etc

Post by MyCo »

This is most of the time working... but there are some cases where rounding in the log10 causes some stupid representations
Attachments
SI Unit Prefix (MyCo).fsm
(677 Bytes) Downloaded 988 times
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Convert 12500 -> 12k5 etc

Post by RJHollins »

MyCo wrote:This is most of the time working... but there are some cases where rounding in the log10 causes some stupid representations


Wow ... amazed at the power of RUBY. Particularly in the right 'coders' hand.

I'm reading through the code ... hoping to get a glimpse of insight ... but this is at a knowledge level beyond me :|

I did run some array test on it. I see where some of the conversions are not very useful. I wouldn't be able to begin trying to modify this Ruby code, unless I tried to 'tag on' to the end to message the final output. If not that, a bit of hand editing of the list.

Regardless of my most minimal experience with all this, I still want to express my sincere thanks for taking the time to work out the code, MyCo !

Meanwhile ... does anyone know what the proper name is for this form of nomenclature ???

Thanks!
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Convert 12500 -> 12k5 etc

Post by Nubeat7 »

hey, thats fancy stuff! thanks
Post Reply