Hi!

I´m calculating a difference of two sensors. This works fine with a factory sensor as its own channel. However it can of course sometimes return negative values. For graphics I would like that the value returned as "difference" would always be positive. What kind of formula would calculate difference of two (or more) channels and return the value always as positive?


Article Comments

Hello there,

And thank you for your post.

Unfortunately, the math offered in the sensor factory is limited to basic math. A function to return the absolute value (or to remove or switch the sign) is not implemented. If the resulting value was always negative you could just multiply the result with -1, but since the result can be both negative and positive there is no workaround for this.


Kind regards,
Sasa Ignjatovic, Tech Support Team


Dec, 2019 - Permalink

Ok. Any hope of getting such a feature?


Dec, 2019 - Permalink

Unfortunately, there are no plans on adding such a feature, as this would be complex to implement and would have significant performance impact.


Dec, 2019 - Permalink