{math- val1 val2 ... valn}

Requests for future functionality

Moderator: Mattk

Post Reply
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

{math- val1 val2 ... valn}

Post by skyewright »

We were recently given {math* val1 val2 ... valn}.
Thank you.

{math- val1 val2 ... valn}

i.e. subtraction, would be nice too.

e.g. {math- 2 5} => 2 - 5 = -3.00

Why?

With that I could easily compute and use the difference in temp between sensors, e.g. the difference between the main outdoor temp and my "temp in a jar" solar sensor.

Of course, if Boris wanted to add the ability to do subtraction in some quite different way, that would be just as good. :)
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re:{math- val1 val2 ... valn}

Post by admin »

I guess you are the only one out there using this math feature :ohmy:

I had to invent the math-stuff to enable the html template replacing mechanism to generate the quite weird data for WD-live clientraw files.

"mathlrot" is needed to rotate daily/monthly values from the sequence strings to sort the data correctly for WD-Live bar charts.

"mathmax" is needed to inhibit yearly, monthly, daily values for total rain showing inconsistent values when not all has been yet computed.

I will include "math+" with the next update. You can subtract values by putting a "-" before the variable name. For example: "{math+ -[actual_th0_temp_c] [actual_thb0_temp_c]}" will give difference between indoor and outdoor in degrees Celsius.
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:{math- val1 val2 ... valn}

Post by skyewright »

admin wrote:I had to invent the math-stuff to enable the html template replacing mechanism to generate the quite weird data for WD-live clientraw files./quote]
I sort of guessed that from the timing. ;)
I will include "math+" with the next update. You can subtract values by putting a "-" before the variable name.
Thank you. That will do nicely. :)

PS. Over on Weather-Watch.com someone has recently spotted that a "temp in a jar" solar can also be used to give a basic indication about night time skies too - on an overcast night the jar is about the same temp as the standard outdoor, and on a clear night it is distinctly cooler. I'm currently doing tests on this and trying to refine my jar...
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:{math- val1 val2 ... valn}

Post by skyewright »

skyewright wrote:Thank you. That will do nicely. :)
This was included in v2.8a.
Just tried it out, and it works just fine. :)
Thanks again.
Post Reply