Author Topic: Here's some quality checking PHP code  (Read 545 times)

0 Members and 1 Guest are viewing this topic.

Offline quailvalleywx

  • Senior Member
  • **
  • Posts: 67
Here's some quality checking PHP code
« on: June 22, 2019, 01:39:00 PM »
A while back I added an automated way to check my wx station data and notify on potential sensor failure. The quality charts on weather.gladstonefamily.net are great but don't have a notification method. In practice the respective sensor failure thresholds need to be balanced with true need for action. Initially I had them set too critical with too numerous notifications. They are set in this variable - $max_std_dev_mult. Temperature and humidity will flag when your station is more that 2 standard deviations different than adjacent stations, barometer - 1 standard deviation. Wind and rain can vary greatly. This will only work if you have enough density of well performing adjacent CWOP stations. You can ignore known bad performing stations by name - see the code.

The attached code checks adjacent station info using findu wxnear and flags if your station data is an outlier. It currently logs outlier info (potential faults) to a file but it could also notify via email if your webserver is email client is configured. Change the code to your needs - your station name, $max_std_dev_mult thresholds, and whether to email faults or log them to a file. Previous programming experience is needed to set all this up. If you don't have access to a server that runs PHP code an Android phone can do it with a $3 app - Bit Web Server. That's what I'm using as well as the Android app Tasker to trigger the one hour events. See the Source Code link in my signature for more info.

... or just periodically check your quality charts on weather.gladstonefamily.net :)
 [ You are not allowed to view attachments ]

WS-1400-IP, Galaxy S3 for cloud cam and Web Server
QV Website | Source Code | WU | WC | PWS | MesoWest/CWOP

 

anything