Barometric and temp trend - should it work?
Moderator: Mattk
Barometric and temp trend - should it work?
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
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
Re: Barometric and temp trend - should it work?
Bump...
Anyone?

Anyone?
- YJB
- Platinum Boarder
- Posts: 387
- Joined: Thu Feb 19, 2009 5:53 pm
- Location: Venhuizen, Netherlands
- Contact:
Re: Barometric and temp trend - should it work?
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).
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).
Re: Barometric and temp trend - should it work?
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 • pression atmosphérique • presión atmosférica • GMT: [actual_utcdate2] • Barotrend 3hours: '+barotrend+' hPa • FALLING • 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 • pression atmosphérique • presión atmosférica • GMT: [actual_utcdate2] • Barotrend 3hours: '+barotrend+' hPa • STEADY • 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 • pression atmosphérique • presión atmosférica • GMT: [actual_utcdate2] • Barotrend 3hours: +'+barotrend+' hPa • RISING • STEIGEND </span></a>');}} </script>
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 • pression atmosphérique • presión atmosférica • GMT: [actual_utcdate2] • Barotrend 3hours: '+barotrend+' hPa • FALLING • 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 • pression atmosphérique • presión atmosférica • GMT: [actual_utcdate2] • Barotrend 3hours: '+barotrend+' hPa • STEADY • 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 • pression atmosphérique • presión atmosférica • GMT: [actual_utcdate2] • Barotrend 3hours: +'+barotrend+' hPa • RISING • STEIGEND </span></a>');}} </script>
- YJB
- Platinum Boarder
- Posts: 387
- Joined: Thu Feb 19, 2009 5:53 pm
- Location: Venhuizen, Netherlands
- Contact:
Re: Barometric and temp trend - should it work?
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.
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.
Re: Barometric and temp trend - should it work?
+ 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

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


Re: Barometric and temp trend - should it work?
All I want is an arrow telling me, if trend is up or down - that's all I'm asking forYJB 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).

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...
- YJB
- Platinum Boarder
- Posts: 387
- Joined: Thu Feb 19, 2009 5:53 pm
- Location: Venhuizen, Netherlands
- Contact:
Re: Barometric and temp trend - should it work?
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:
Last 60 minutes seems be a better choice:
Does that make sense?
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
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
Re: Barometric and temp trend - should it work?
I think I understand it...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:
Last 60 minutes seems be a better choice: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
Does that make sense?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
Could it be possible to fix?
I would like to know, before I switch permanent to Meteohub...
Re: Barometric and temp trend - should it work?
Can someone please tell me - is't possible to get it working, or I should live with it, like it is?`