PDA

View Full Version : applying arithmetic to value


terry
30-03-2009, 16:03
I see you can do a multiplier but can you do more advanced calculations on a value returned from an item?

For example, I have a temperature item being returned in celsius. I am not sure this is a problem yet but I was curious anyways. Can I take this value (which is 32) and convert it to Fahrenheit and store that value instead? The rough math is:
F=((1.8*C)+32)

Thanks!

rxm8028
31-03-2009, 05:30
I think the only way to accomplish your goal would be to rearrange the equation so that the item value is always "multiplied" by the multiplier. The multiplier can be a decimal fraction, or even a negative number (I think), but I'm reasonably certain it has to be a simple multiplication formula. I don't know of any way to add (or subtract) and offset as required by the C to F conversion.

Perhaps you could add the offset in the item itself? Example:
{HOSTNAME}processor.temperature.C(last)+32

It might work....

terry
31-03-2009, 05:49
Ok, that's what I figured. Applying it in the item won't work either. I am not worried about it with this item. Thanks for the reply.