Detecting temperature trends

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
cbhiii
Gold Boarder
Gold Boarder
Posts: 306
Joined: Fri Feb 15, 2008 2:02 am
Location: Michigan, USA
Contact:

Detecting temperature trends

Post by cbhiii »

Which variable is going to be more sensitive at detecting a rising or falling temperature?

[last15m_th0_temp_trend]
or
[last60m_th0_temp_trend]

If the temperature starts to rise or fall, which one will detect it first?

Thanks for your insight and help.
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
User avatar
WS Grave
Expert Boarder
Expert Boarder
Posts: 103
Joined: Fri Oct 30, 2009 3:42 pm
Location: Grave - the Netherlands
Contact:

Re:Detecting temperature trends

Post by WS Grave »

I wanted to say that to you when I visited your site yesterday.
You should use the day1 trends.
I also had the 15 minutes trends, but the arrows were mostly leveled.
The day1 trends gives the result you're looking for :)
cbhiii
Gold Boarder
Gold Boarder
Posts: 306
Joined: Fri Feb 15, 2008 2:02 am
Location: Michigan, USA
Contact:

Re:Detecting temperature trends

Post by cbhiii »

That's just what it thought, but the Day1 value doesn't seem to change fast enough either over the course of the day. Maybe using "last24h" would be better? Because at the end of the day things get reset right at midnight and so the value would not be a good representation of the past day.
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
cbhiii
Gold Boarder
Gold Boarder
Posts: 306
Joined: Fri Feb 15, 2008 2:02 am
Location: Michigan, USA
Contact:

Re:Detecting temperature trends

Post by cbhiii »

After watching all 4 different types today (15m, 60, 24h, day1) I've decided that 'last24h' appears to be the best as it shows trends right away and does not go back to 0 at midnight like 'day1' does.

Best of luck!
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
User avatar
WS Grave
Expert Boarder
Expert Boarder
Posts: 103
Joined: Fri Oct 30, 2009 3:42 pm
Location: Grave - the Netherlands
Contact:

Re:Detecting temperature trends

Post by WS Grave »

I've also changed to last24h.
I had noticed strange behaviour before, and it was after midnight, so you're right about that.
cbhiii
Gold Boarder
Gold Boarder
Posts: 306
Joined: Fri Feb 15, 2008 2:02 am
Location: Michigan, USA
Contact:

Re:Detecting temperature trends

Post by cbhiii »

I have figured it out. It is more simple than we thought. I watched the readings all yesterday to confirm.

The trend is calculated by taking the [actual temp] and comparing it to the [average temp] of that time period. If the current temp is higher, the trend is 1. If the current temp is lower, the trend is -1.

So you need to decide if you want to see a trend over the [last60m] which is a small window or do you want to see it over the [last24h] which is way too large.

When I tried [last24h] I saw current temp readings that were above the average so the trend is 1, but the temperatures were falling - so this is wrong and not what we are looking for. I'm stuck with "last60m" for now.

A better solution would be to have a "last3h" variable to watch the trend over the last 3 hours. That would be an excellent block of time to monitor trends.
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
cbhiii
Gold Boarder
Gold Boarder
Posts: 306
Joined: Fri Feb 15, 2008 2:02 am
Location: Michigan, USA
Contact:

Re:Detecting temperature trends

Post by cbhiii »

This code might work for 6 hour trends. I just started playing with it, so no promises. It uses the 6 hour WD values.

Code: Select all

<script type="text/javascript"> 
 
var trend=""; 
var tnow = "[actual_th0_temp_f]"; 
var tac = "[seqhour6_th0_temp_c@1:-]"; 
taf = Math.round(((1.8*tac)+32)*10)/10; 
 
if (tnow>taf){trend="1"} 
else if (tnow<taf){trend="-1"} 
else if (tnow==taf){trend="0"} 
 
document.write(trend); 
 
</script>
Station: Davis Vantage Pro2 Plus
Hardware: Raspberry Pi 2 (Meteohub status)
Post Reply