Ad Widget

Collapse

applying arithmetic to value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • terry
    Junior Member
    • Mar 2009
    • 21

    #1

    applying arithmetic to value

    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
    Member
    • Apr 2005
    • 45

    #2
    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....

    Comment

    • terry
      Junior Member
      • Mar 2009
      • 21

      #3
      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.

      Comment

      Working...