Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wind run not working #60

Open
Timppamies opened this issue Aug 25, 2019 · 9 comments
Open

Wind run not working #60

Timppamies opened this issue Aug 25, 2019 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Timppamies
Copy link

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

@Timppamies Timppamies added the bug Something isn't working label Aug 25, 2019
@lightmaster
Copy link
Owner

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
Copy link
Author

Timppamies commented Aug 27, 2019 via email

@lightmaster
Copy link
Owner

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

@lightmaster
Copy link
Owner

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
Copy link
Author

Timppamies commented Aug 31, 2019 via email

@lightmaster
Copy link
Owner

lightmaster commented Aug 31, 2019

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
Copy link
Author

Timppamies commented Sep 1, 2019 via email

@lightmaster
Copy link
Owner

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
Copy link
Author

Timppamies commented Sep 5, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants