Barometric and temp trend - should it work?

Discussion, issues, recommendations around Meteohub's dashboard and WD Live integration

Moderator: Mattk

Post Reply
User avatar
plex
Expert Boarder
Expert Boarder
Posts: 83
Joined: Tue Nov 30, 2010 1:01 pm
Location: Denmark

Barometric and temp trend - should it work?

Post by plex » Fri Dec 17, 2010 8:22 pm

Hi

I've noticed after switching to Meteohub, that barometric and temp. trend allways is the same ->

Should it work, or is this not supported by Meteohub?

Thank you

User avatar
plex
Expert Boarder
Expert Boarder
Posts: 83
Joined: Tue Nov 30, 2010 1:01 pm
Location: Denmark

Re: Barometric and temp trend - should it work?

Post by plex » Sun Dec 19, 2010 10:50 am

Bump...:)

Anyone?

wfpost
Platinum Boarder
Platinum Boarder
Posts: 591
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re: Barometric and temp trend - should it work?

Post by wfpost » Sun Dec 19, 2010 11:24 am


User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re: Barometric and temp trend - should it work?

Post by YJB » Sun Dec 19, 2010 12:14 pm

Hi,

I'm not sure what you want to do exactly, this is what IO do in a php script:

// Pressure trend number to name converter
$pressure_trend_array = array (" ","Falling Rapidly","Falling Slowly", "Steady", "Rising Slowly", "Rising Rapidly");
$pressure_trend_nr_plus_3 = "{math+ [hour1_thb0_press_trend] 3}";
$pressuretrendname = $pressure_trend_array[(int)$pressure_trend_nr_plus_3];

(The main reason for the add 3, is that in this way my array definition is simpler (in one line).

wfpost
Platinum Boarder
Platinum Boarder
Posts: 591
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re: Barometric and temp trend - should it work?

Post by wfpost » Sun Dec 19, 2010 1:50 pm

I doubt your approach will work.
Because of the none working 1 hour barotrend all maths depending on that variable is also not working.
Three times a wrong and false value for barotrend is only putting out a three times false barotrend value :!:
3 * 0 = 0
3 * 1 = 3
3 * -1 = -3
doesn´t make sense at all!!!

I do it with jscript on my website
That is working, but I can´t control things like weather networks and WDLIVE with jscript

var barotrend={math- [actual_thb0_press_hpa] [seqhour1_thb0_press_hpa@3]};

Therefore I would be very pleased if Boris could remedy it. Don´t know, why he hasn´t replied anything at all about this error?

-----
<script type="text/javascript">var barotrend={math- [actual_thb0_press_hpa] [seqhour1_thb0_press_hpa@3]}; if (barotrend <= -0.7) {document.write( '<a class="thumbnail" href="#thumb"><img src="arrowdown.png" border="0" /><span><img src="http://adr.homedns.org:85/meteograph.cgi?graph=48baro" /><br />air pressure &bull; pression atmosph&eacute;rique &bull; presi&oacute;n atmosf&eacute;rica &bull; GMT: [actual_utcdate2] &bull; Barotrend 3hours: '+barotrend+' hPa &bull; FALLING &bull; FALLEND </span></a>');} else {if ((barotrend >= -0.7) && (barotrend < 0.7)) {document.write( '<a class="thumbnail" href="#thumb"><img src="arrowright.png" border="0" /><span><img src="http://adr.homedns.org:85/meteograph.cgi?graph=48baro" /><br />air pressure &bull; pression atmosph&eacute;rique &bull; presi&oacute;n atmosf&eacute;rica &bull; GMT: [actual_utcdate2] &bull; Barotrend 3hours: '+barotrend+' hPa &bull; STEADY &bull; GLEICHBLEIBEND </span></a>');} else {document.write( '<a class="thumbnail" href="#thumb"><img src="arrowup.png" border="0" /><span><img src="http://adr.homedns.org:85/meteograph.cgi?graph=48baro" /><br />air pressure &bull; pression atmosph&eacute;rique &bull; presi&oacute;n atmosf&eacute;rica &bull; GMT: [actual_utcdate2] &bull; Barotrend 3hours: +'+barotrend+' hPa &bull; RISING &bull; STEIGEND </span></a>');}} </script>

User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re: Barometric and temp trend - should it work?

Post by YJB » Sun Dec 19, 2010 2:09 pm

Hmm, I'm using "+", not *

3 + 0 = 3
3 +1 = 4
3 + -1 = 2

Not sure why Boris is not responding, it might be that he is busy with other stuff, keep in mind that this is just a hobby, not a full time job. So we can ask, but that's about it.

wfpost
Platinum Boarder
Platinum Boarder
Posts: 591
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re: Barometric and temp trend - should it work?

Post by wfpost » Sun Dec 19, 2010 2:20 pm

+ doesn´t make sense, because that´s only the trend, but not the absolute value of the baro change.
If you´re using my approach with reading the absolute array value of pressure and doing the maths based on VP2 three hours baro trend formula it will also work with your php script.

Your calc seems to work a bit better than meteohubs 1Hourbarotrend, but it is also wrong, and only shows correct trend if your computation by accident falls into the range of the three hour trend.
Your calc does not reflect a falling pressure at all, with your numbers only being postive :wink:

Image

User avatar
plex
Expert Boarder
Expert Boarder
Posts: 83
Joined: Tue Nov 30, 2010 1:01 pm
Location: Denmark

Re: Barometric and temp trend - should it work?

Post by plex » Mon Dec 20, 2010 11:02 am

YJB wrote:Hi,

I'm not sure what you want to do exactly, this is what IO do in a php script:

// Pressure trend number to name converter
$pressure_trend_array = array (" ","Falling Rapidly","Falling Slowly", "Steady", "Rising Slowly", "Rising Rapidly");
$pressure_trend_nr_plus_3 = "{math+ [hour1_thb0_press_trend] 3}";
$pressuretrendname = $pressure_trend_array[(int)$pressure_trend_nr_plus_3];

(The main reason for the add 3, is that in this way my array definition is simpler (in one line).
All I want is an arrow telling me, if trend is up or down - that's all I'm asking for ;)

I'm currently using Weather Display Mac version, and all works great. So I'm a bit disappointed, when buying Meteohub, and then find out, that the function is not supported :(

I'm not good at script, so I just want the function the work out of the box...

User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re: Barometric and temp trend - should it work?

Post by YJB » Mon Dec 20, 2010 11:16 am

Hmm,

Looking at this again, it seems that "hour1" is not a good choice; this is because hour1 reflects the current hour, which is especially during the beginning of the hour a very short timeperiod:

Code: Select all

hour1_thb0_temp_trend 0
hour1_thb0_dew_trend 0
hour1_thb0_heatindex_trend 0
hour1_thb0_humidex_trend 0
hour1_thb0_hum_trend 0
hour1_thb0_press_trend 0
hour1_th0_temp_trend 0
hour1_th0_dew_trend 0
hour1_th0_heatindex_trend 0
hour1_th0_humidex_trend 0
hour1_th0_hum_trend 0
Last 60 minutes seems be a better choice:

Code: Select all

last60m_thb0_temp_trend -1
last60m_thb0_dew_trend -1
last60m_thb0_heatindex_trend -1
last60m_thb0_humidex_trend -1
last60m_thb0_hum_trend 0
last60m_thb0_press_trend 0
last60m_th0_temp_trend 1
last60m_th0_dew_trend 1
last60m_th0_heatindex_trend 1
last60m_th0_humidex_trend 1
last60m_th0_hum_trend 0
Does that make sense?

User avatar
plex
Expert Boarder
Expert Boarder
Posts: 83
Joined: Tue Nov 30, 2010 1:01 pm
Location: Denmark

Re: Barometric and temp trend - should it work?

Post by plex » Mon Dec 20, 2010 3:12 pm

YJB wrote:Hmm,

Looking at this again, it seems that "hour1" is not a good choice; this is because hour1 reflects the current hour, which is especially during the beginning of the hour a very short timeperiod:

Code: Select all

hour1_thb0_temp_trend 0
hour1_thb0_dew_trend 0
hour1_thb0_heatindex_trend 0
hour1_thb0_humidex_trend 0
hour1_thb0_hum_trend 0
hour1_thb0_press_trend 0
hour1_th0_temp_trend 0
hour1_th0_dew_trend 0
hour1_th0_heatindex_trend 0
hour1_th0_humidex_trend 0
hour1_th0_hum_trend 0
Last 60 minutes seems be a better choice:

Code: Select all

last60m_thb0_temp_trend -1
last60m_thb0_dew_trend -1
last60m_thb0_heatindex_trend -1
last60m_thb0_humidex_trend -1
last60m_thb0_hum_trend 0
last60m_thb0_press_trend 0
last60m_th0_temp_trend 1
last60m_th0_dew_trend 1
last60m_th0_heatindex_trend 1
last60m_th0_humidex_trend 1
last60m_th0_hum_trend 0
Does that make sense?
I think I understand it...

Could it be possible to fix?

I would like to know, before I switch permanent to Meteohub...

User avatar
plex
Expert Boarder
Expert Boarder
Posts: 83
Joined: Tue Nov 30, 2010 1:01 pm
Location: Denmark

Re: Barometric and temp trend - should it work?

Post by plex » Sun Dec 26, 2010 11:28 am

Can someone please tell me - is't possible to get it working, or I should live with it, like it is?`

Post Reply