lightmaster / Meteobridge-Weather34-Template

Github repository for the Meteobridge version of the weather34 template
Other
18 stars 10 forks source link

Wind run not working #60

Open Timppamies opened 5 years ago

Timppamies commented 5 years ago

Hi

Windrun sticks to 0.0, i.e. not working.

pws(34) pages: https://veikkola-saa.com/pws/

Comparison (same data source, different template): https://veikkola-saa.com (just change language option, first unit... more)

-Timo

lightmaster commented 5 years ago

I'm working on a new way to calculate a more realistic wind run for the past 24 hours based on the 5 minute averages over the last 24 hours. If I get it working on my server (which currently gets a value for Wind Run), can I test it on your server where Wind Run calculation isn't currently working right?

Timppamies commented 5 years ago

Hi

Thank you for the info. Sure, happy to help I.e to test in my server.

BR - Timo On 27 Aug 2019, 23.21 +0300, lightmaster notifications@github.com, wrote:

I'm working on a new way to calculate a more realistic wind run for the past 24 hours based on the 5 minute averages over the last 24 hours. If I get it working on my server (which currently gets a value for Wind Run), can I test it on your server where Wind Run calculation isn't currently working right? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

lightmaster commented 5 years ago

Using m/s as your wind unit, I assume the distance unit should be km, right?

lightmaster commented 5 years ago

In mbridge/mb.php: Add the new lines from 76-99 and 126-127 in the gist.

Create the file test.php and add the code from the gist's test.php.

This will create a new json file in jsondata folder to save the last 24 hrs worth of 5 min wind averages and display them all along with a km/mi sum at the bottom of test.php.

Timppamies commented 5 years ago

Hi

Code changed + test.php implemented. I’ll keep you posted.

BR - Timo On 30 Aug 2019, 23.53 +0300, lightmaster notifications@github.com, wrote:

In mbridge/mb.php: Add the new lines from 76-99 and 126-127 in the gist. Create the file test.php and add the code from the gist's test.php. This will create a new json file in jsondata folder to save the last 24 hrs worth of 5 min wind averages and display them all along with a km/mi sum at the bottom of test.php. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

lightmaster commented 5 years ago

Seeing a sum of 0.4km so far, which is very reassuring. On the test page, each array value is the km for each 5min and it's summed at the bottom of it. Big thing is that 24 hrs after you initially implemented it, make sure that the array cuts off at 287. Has to be 287 at the 24 hr mark and then never goes above 287.

Btw, array starts counting at 0, which is why it's 287 instead of 288.

Timppamies commented 5 years ago

Hi

First impressions after one day.

Array stops at 287 as expected. If I understood correct, wind run number represent last 24 hour as a rolling number.

Compared to number from meteotemplate (which shows wind run for the day) they are in the same ball park. So, it looks very promising.

Thanks.

Regards -Timo On 31 Aug 2019, 16.14 +0300, lightmaster notifications@github.com, wrote:

Seeing an sum of 0.4km so far, which is very reassuring. On the test page, each array value is the km for each 5min and it's summed at the bottom of it. Big thing is that 24 hrs after you initially implemented it, make sure that the array cuts off at 287. Has to be 287 at the 24 hr mark and then never goes above 287. Btw, array starts counting at 0, which is why it's 287 instead of 288. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

lightmaster commented 5 years ago

Looks like its working good. I'll update the template for the changes and push them out this week.

When I do, git will complain to you about a couple modified files, namely mbridge/mb.php, and livedata.php and windraindirection.php if you changed those files. You'll need to use the command git checkout -- <files> to reset those back to normal prior to the git pull command actually working. The jsondata/windavg.json file isn't tracked by git, so it shouldn't complain about that file at all, and you won't lose the current averages either.

Timppamies commented 5 years ago

Agree, works like a charm.

Thanks.

BR - Timo On 5 Sep 2019, 6.58 +0300, lightmaster notifications@github.com, wrote:

Looks like its working good. I'll update the template for the changes and push them out this week. When I do, git will complain to you about a couple modified files, namely mbridge/mb.php, and livedata.php and windraindirection.php if you changed those files. You'll need to use the command git checkout -- to reset those back to normal prior to the git pull command actually working. The jsondata/windavg.json file isn't tracked by git, so it shouldn't complain about that file at all, and you won't lose the current averages either. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.