Re: Help with scaling math..
How about: Percentage = (ActualValue - 10) * 2 ?
Re: Help with scaling math..
Hank, your formula gives blue line, If I understand correctly, he want red.
You can try to get more precision formula of red curve in excel. Look what is best approximation, and which you can implement in code. I'll start with polynomial equation, because it easiest to implement.
Re: Help with scaling math..
Right. I don't know if the chart showed the actual values of the measurment or the values output by the formula used.
In either case I don't quite understand the X-axis scale of that chart, I would've expected it to end at 100% not 120%.
If it's the values of the actual measurments it seems to "just" be a dual slope line so it shouldn't be too hard to apply to decide if you're below or above the "knee" and act accordingly. If there's more curve to it than that a lookup table should do it and since it's not really that many values (only 50) there's really no need to do any interpolation between points.
I'd like more data before trying to come up with a solution though. Like a table with the raw value, as seen by the PIC, for every 10% from 0-100.
/Henrik. Not Hank :-)
2 Attachment(s)
Re: Help with scaling math..
your chart with equation.... how to remove first image???
Attachment 8408