Page 1 of 1
need help doing windrose
Posted: Tue 18 Nov 2014 1:10 am
by n9mfk
Hi,
I like to use highcut chart code to make a windrose show the wind dir
i seen some cod but i do not went to use sql
thanks for any help
Re: need help doing windrose
Posted: Tue 18 Nov 2014 8:24 am
by GaryJ
The Steel Series gauges have a wind rose in them, is that what you are after?
You can see it on this page
here
Re: need help doing windrose
Posted: Tue 18 Nov 2014 11:14 am
by water01
In order to do this and have a meaningful wind rose you have to store the readings from Cumulus on a regular basis i.e. the realtime interval, hence the use of MySQL and sql to give you enough readings for a Highchart wind rose to be produced.
The only other way would be to append the realtime.txt file into a file rather like the Near Realtime Data Highcharts plotter does and then write some code to extract the wind direction and speed from each line into an array that would be passed to Highcharts to plot as a Wind Rose. However I don't think anybody is using this method as the SQL route is far easier, but I am sure someone will prove me wrong!!
Re: need help doing windrose
Posted: Tue 18 Nov 2014 2:28 pm
by n9mfk
Hi David,
I have been look at
http://wiki.sandaysoft.com/a/ImportCumulusFile
I was look at put my realtime.txt in a data base but i not sure how godady would feel about a script hit there sql server every min also i cold not get cron to work with this script
any ideas?
Re: need help doing windrose
Posted: Tue 18 Nov 2014 2:36 pm
by mcrossley
Depends what you want the wind rose to show? Traditionally a wind rose shows historic data over a number of years, fo this the Cumulus monthly log files are fine. If you want a short term plot (last day to days), then you could still use the monthly log files, but how accurate it will be depends on your logging interval. If you log every 5 mins that it would be fine, every half hour not very good.
Again parsing multiple log files could be done, but not fun, much easier if the data is stored in a DB.
Why cannot you get the import script from the Wiki to run as a cron job? I run it from a command line OK.
Re: need help doing windrose
Posted: Tue 18 Nov 2014 3:01 pm
by n9mfk
Hi Mark,
I had it all set up to work by hand and it worked but when i tried
Code: Select all
php ImportCumulusFile.php file=realtime.txt table=Realtime type=realtime key=secretKey retainVal=7 retainUnit=day > /dev/null 2>&1
it did not work
Beau
Re: need help doing windrose
Posted: Tue 18 Nov 2014 3:07 pm
by mcrossley
So, is php.exe on the file search path, ie, can it be run by just typing in 'php' no matter where your current file path is pointing?
Is your realtime.txt file in the same folder as the cron job defaults to? If not you need to provide a path to that file as well as the file name.
Rather than dumping all the output from the script " > /dev/null 2>&1" pipe it to a log file so you can read any error messages " > /path/logfile.txt"
Re: need help doing windrose
Posted: Tue 18 Nov 2014 10:05 pm
by n9mfk
Hi Mark looks like con an sql database is working i tried to use sql data on tihs page
http://n9mfk.info/wxrtchart.php
but it not working
Re: need help doing windrose
Posted: Tue 18 Nov 2014 10:25 pm
by mcrossley
It looks like your PHP is returning a new line before the JSON data, this is causing the browser to interpret the data as text rather than JSON.
I cannot see your script as the ?view=sce option does not seem to print the script out correctly.
Re: need help doing windrose
Posted: Wed 19 Nov 2014 3:04 am
by n9mfk
mark you have a pm
Beau