Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Space Weather
Moderator: saratogaWX
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Space Weather
Since NOAA updated their website earlier this month, my Space Weather page has not been displaying all the information that it used to. I am making an assumption here because I am not even sure if wxspace.php is a standard Saratoga template or whether I got the code from somewhere else but it uses a file spaceweather-current.txt which appears to be the culprit, due to NOAA's changes. Has anyone made the necessary mods to make this function properly again?
update: oops! obviously, as I just looked at http://saratoga-weather.org/space-weather.php and that looks fine. Sorry, I guess I should check for updates.
update: looks like there is an update from someone at http://www.weather-watch.com/smf/index. ... 6.195.html
update: oops! obviously, as I just looked at http://saratoga-weather.org/space-weather.php and that looks fine. Sorry, I guess I should check for updates.
update: looks like there is an update from someone at http://www.weather-watch.com/smf/index. ... 6.195.html
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
-
- Posts: 505
- Joined: Wed 17 Aug 2011 2:58 pm
- Weather Station: WeatherDuino Pro2
- Operating System: 2008
- Location: Canberra
Re: Space Weather
Hmm, I've downloaded the version 1.3 of space weather but it looks like most/all the hrefs are now wrong.
I do see some sites working, but they seem to be running version 1.4. Does anyone have this version? Do I need to track down the author to get a update?
Thanks in advance.
I do see some sites working, but they seem to be running version 1.4. Does anyone have this version? Do I need to track down the author to get a update?
Thanks in advance.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Conder, Canberra Weather
- PaulMy
- Posts: 3777
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Space Weather
If this http://www.komokaweather.com/komokaweat ... xspace.php is what you are looking for I can check when at home this evening and likely send it. It looks like v1.4 as my View Source shows <!-- space weather - V 1.4 12-Dec-2014 -->
Paul
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
- saratogaWX
- Posts: 1170
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Space Weather
Mike Challis (author of the page) still has the (non-working) version 1.3 posted on his site.
The weather-watch.com link to the 'fix' message was unfortunately lost when weather-watch.com suffered a major hard-disk failure and a failure in database backup (without notifications), so their forum was restored from an earlier image backup, and lots of stuff was lost in the shuffle.
The fix to the script was done by Martin (budgie) in December 2014 for V1.4 -- I've attached his update here.
Best regards,
Ken
The weather-watch.com link to the 'fix' message was unfortunately lost when weather-watch.com suffered a major hard-disk failure and a failure in database backup (without notifications), so their forum was restored from an earlier image backup, and lots of stuff was lost in the shuffle.
The fix to the script was done by Martin (budgie) in December 2014 for V1.4 -- I've attached his update here.
Best regards,
Ken
You do not have the required permissions to view the files attached to this post.
-
- Posts: 505
- Joined: Wed 17 Aug 2011 2:58 pm
- Weather Station: WeatherDuino Pro2
- Operating System: 2008
- Location: Canberra
Re: Space Weather
Thanks Paul, Ken and of course Budgie and Mike
It's working! http://cond.power.on.net/wxspace.php
Cheers UB
Now to figure out the scaling so the graphs fit correctly.
It's working! http://cond.power.on.net/wxspace.php
Cheers UB
Now to figure out the scaling so the graphs fit correctly.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Conder, Canberra Weather
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Space Weather
They just announced...
Pity they didn't do something "in a new way" (worth copying) with the three day forecast. If it was an RSS feed it would help (me) but I guess I have to dig around for some suitable code.
http://www.swpc.noaa.gov/communities/sp ... nthusiastsSpace Weather Now Page Has Changed | NOAA / NWS Space ...
http://www.swpc.noaa.gov/SWN/
Space Weather Prediction Center. National Oceanic and Atmospheric Administration. Thursday, October 29, 2015 20:09:32. Main menu. Home; About Space
As part of the Space Weather Prediction Center's rollout of our improved website, the content from Space Weather Now is being provided in a new way.
Try the following page:
Space Weather Enthusiasts
Pity they didn't do something "in a new way" (worth copying) with the three day forecast. If it was an RSS feed it would help (me) but I guess I have to dig around for some suitable code.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Space Weather
I've added some code to improve the display of text (slightly )
Not much but it is better than having short sentences split across lines.
Code: Select all
function main_code() {
$textfrom = array('A. NOAA Geomagnetic Activity Observation and Forecast',
'B. NOAA Solar Radiation Activity Observation and Forecast',
'C. NOAA Radio Blackout Activity and Forecast');
$textto = array('</p><h4>Geomagnetic Activity Observation and Forecast</h4><p>',
'</p><h4>Solar Radiation Activity Observation and Forecast</h4><p>',
'</p><h4>Radio Blackout Activity and Forecast</h4><p>');
global $cacheName;
if (!$data = file_get_contents("$cacheName") ) {
$string = gracefulerror('Error reading spaceweather current update data.');
return $string;}
$string = $data;
$string = str_replace($textfrom,$textto,$string);
$string = preg_replace('|:Product|','Product',$string,1);
$string = preg_replace('|:Issued|',' - Issued',$string,1);
$string = preg_replace('|# P|',' - P',$string,1);
$string = preg_replace('|#|',' ',$string,1);
$string = preg_replace('|Center|','Center.',$string,1);
$string = preg_replace('|NOAA Kp index|','</p><pre>NOAA Kp index',$string,1);
$string = preg_replace('|Solar Radiation Storm Forecast|','</p><pre>Solar Radiation Storm Forecast',$string,1);
$string = preg_replace('|Radio Blackout Forecast|','</p><pre>Radio Blackout Forecast',$string,1);
$string = preg_replace('|Rationale:|','</pre><p>Rationale:',$string,3);
$string = '<p>'.$string.'</p>';
return $string;
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Space Weather
OK, now that I have resolved my nightmare PHP problem , I have modified it even more. The text file seems to be pretty much the same format every time (I have emailed them asking them to make it a RSS feed).
It's probably overkill but it's a bit more pleasing to me than the bare text with short lines.
http://www.jerbils.info/saratoga/wxspace.php
Code: Select all
function main_code() {
$textfrom = array('A. NOAA Geomagnetic Activity Observation and Forecast',
'B. NOAA Solar Radiation Activity Observation and Forecast',
'C. NOAA Radio Blackout Activity and Forecast');
$textto = array('</p><h4 class="noaah4">Geomagnetic Activity Observation and Forecast</h4><p class="noaapar">',
'</p><h4 class="noaah4">Solar Radiation Activity Observation and Forecast</h4><p class="noaapar">',
'</p><h4 class="noaah4">Radio Blackout Activity and Forecast</h4><p class="noaapar">');
global $cacheName;
if (!$data = file_get_contents("$cacheName") ) {
$string = gracefulerror('Error reading spaceweather current update data.');
return $string;}
$string = $data;
$tablestyle = '<style media="screen"type="text/css">
.noaah4 {margin-top: 10px;margin-bottom: 10px;}
.noaapar {margin-top: 6px;margin-bottom: 12px;}
.noaaparc {text-align:center;}
.noaatab{margin-left:auto;margin-right:auto;width:400px;table-layout:fixed;border:1px solid black;border-collapse:collapse;empty-cells:hide;}
.noaatab th{background-color:#188A23;color:white;padding-left:20px;text-align:left;border:none;}
.noaatab td{padding-left:40px;border:1px solid black;}
.noaatab td.first{padding-left:5px;}
</style>';
$string = str_replace($textfrom,$textto,$string);
$string = preg_replace('|:Product|','Product',$string,1);
$string = preg_replace('|:Issued|',' - Issued',$string,1);
$string = preg_replace('|# P|','<br>P',$string,1);
$string = preg_replace('|#|',' ',$string,1);
$string = preg_replace('|Center|','Center.',$string,1);
$string = preg_replace('|NOAA Kp index|','</p><pre>NOAA Kp index',$string,1);
$string = preg_replace('|Solar Radiation Storm Forecast|','</p><pre>Solar Radiation Storm Forecast',$string,1);
$string = preg_replace('|Radio Blackout Forecast|','</p><pre>Radio Blackout Forecast',$string,1);
$string = preg_replace('|Rationale:|','</pre><p class="noaapar">Rationale:',$string,3);
$string = $tablestyle.'<p class="noaapar noaaparc">'.$string.'</p>';
for ($k=1;$k<=3;$k++) {
$start = '<pre>';
$end = '</pre>';
$startpos = strpos($string, $start) + strlen($start);
if (strpos($string, $start) !== false) {
$endpos = strpos($string, $end, $startpos);
if (strpos($string, $end, $startpos) !== false) {
$string = preg_replace('|<pre>.*?</pre>|s',dotable(substr($string, $startpos, $endpos - $startpos)),$string,1);
}
}
}
return $string;
}
function dotable($str2tab) {
$intable = explode("\n",$str2tab );
$intablecount = count($intable) - 3;
$strtable = '<table class="noaatab"><caption style="font-weight:bold;">'.$intable[0].'</caption>';
$strheads = preg_split('/ +/',$intable[2]);
$strtable .= '<tr><th>'.$strheads[0].'</th><th>'.$strheads[1].'</th><th>'.$strheads[2].'</th><th>'.$strheads[3].'</th></tr>';
for ($j=3;$j<=$intablecount;$j++) {
$strdata = preg_split('/ +/',$intable[$j]);
$strtable .= '<tr><td class="first">'.$strdata[0].'</td><td>'.$strdata[1].'</td><td>'.$strdata[2].'</td><td>'.$strdata[3].'</td></tr>';
}
$strtable .= '</table>';
return $strtable;
}
http://www.jerbils.info/saratoga/wxspace.php
Last edited by gluepack on Thu 05 Nov 2015 9:19 pm, edited 1 time in total.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Space Weather
Original and my formatted version...
You do not have the required permissions to view the files attached to this post.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- saratogaWX
- Posts: 1170
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Space Weather
Very nice... looks much better
-
- Posts: 505
- Joined: Wed 17 Aug 2011 2:58 pm
- Weather Station: WeatherDuino Pro2
- Operating System: 2008
- Location: Canberra
Re: Space Weather
I agree, nice job.saratogaWX wrote:Very nice... looks much better
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Conder, Canberra Weather
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Space Weather
oops! last column first table is incorrect (at least currently). I will investigate.
Update: Can't believe I missed that, getting old.
All tables, not just first. So obvious when you look at it...
Have corrected the above block of code.
Update: Can't believe I missed that, getting old.
All tables, not just first. So obvious when you look at it...
Code: Select all
$strtable .= '<tr><td class="first">'.$strdata[0].'</td><td>'.$strdata[1].'</td><td>'.$strdata[2].'</td><td>'.$strdata[2].'</td></tr>';
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- saratogaWX
- Posts: 1170
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Space Weather
Thanks "gluepack"... I've updated http://saratoga-weather.org/space-weather.php with your formatting (with credit)
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Space Weather
Oh, you're welcome to do that but I have added row header color and commented it all...
Code: Select all
function main_code() {
// set up three typical header replacements to close off previous para, remove 'X. NOAA' text, surround with header tags and add next para tag
$textfrom = array('A. NOAA Geomagnetic Activity Observation and Forecast',
'B. NOAA Solar Radiation Activity Observation and Forecast',
'C. NOAA Radio Blackout Activity and Forecast');
$textto = array('</p><h4 class="noaah4">Geomagnetic Activity Observation and Forecast</h4><p class="noaapar">',
'</p><h4 class="noaah4">Solar Radiation Activity Observation and Forecast</h4><p class="noaapar">',
'</p><h4 class="noaah4">Radio Blackout Activity and Forecast</h4><p class="noaapar">');
global $cacheName;
// check file available, if not return error message
if (!$data = file_get_contents("$cacheName") ) {
$string = gracefulerror('Error reading spaceweather current update data.');
return $string;}
// move text file content to $string variable
$string = $data;
// Set up basic CSS for table
// =====================================
// change (or remove for black) .noaatab th background-color:#188A23; to suit own heading background color
// and .noaatab th color:white; to suit heading text color
// change (or remove for black) .noaatab td.first color:red; to suit data row descriptor text color
// all other changes at your discretion
$tablestyle = '<style media="screen"type="text/css">
.noaah4 {margin-top: 10px;margin-bottom: 10px;}
.noaapar {margin-top: 6px;margin-bottom: 12px;}
.noaaparc {text-align:center;}
.noaatab{margin-left:auto;margin-right:auto;width:400px;table-layout:fixed;border:1px solid black;border-collapse:collapse;empty-cells:hide;}
.noaatab th{background-color:#188A23;color:white;padding-left:20px;text-align:left;border:none;}
.noaatab td{font-weight:bold;padding-left:40px;border:1px solid black;}
.noaatab td.first{padding-left:5px;color:red;}
</style>';
// ======================================
// do header replacement
$string = str_replace($textfrom,$textto,$string);
// tidy up first para displaying source of text
$string = preg_replace('|:Product|','Product',$string,1);
$string = preg_replace('|:Issued|',' - Issued',$string,1);
$string = preg_replace('|# P|','<br>P',$string,1);
$string = preg_replace('|#|',' ',$string,1);
$string = preg_replace('|Center|','Center.',$string,1);
// wrap tables in <pre> tags and start new paras for Rationale
$string = preg_replace('|NOAA Kp index|','</p><pre>NOAA Kp index',$string,1);
$string = preg_replace('|Solar Radiation Storm Forecast|','</p><pre>Solar Radiation Storm Forecast',$string,1);
$string = preg_replace('|Radio Blackout Forecast|','</p><pre>Radio Blackout Forecast',$string,1);
$string = preg_replace('|Rationale:|','</pre><p class="noaapar">Rationale:',$string,3);
// put para at start and end of formatted text and prefix with CSS
$string = $tablestyle.'<p class="noaapar noaaparc">'.$string.'</p>';
// replace the three <pre> formatted tables with html formatted tables
for ($k=1;$k<=3;$k++) {
$start = '<pre>'; $end = '</pre>';
// extract string and send to formatting function
$startpos = strpos($string, $start) + strlen($start);
if (strpos($string, $start) !== false) {
$endpos = strpos($string, $end, $startpos);
if (strpos($string, $end, $startpos) !== false) {
$string = preg_replace('|<pre>.*?</pre>|s',dotable(substr($string, $startpos, $endpos - $startpos)),$string,1);
}
}
}
return $string;
}
// function to convert pre formatted table to html formatted table
function dotable($str2tab) {
// seperate lines into array based on linefeed
$intable = explode("\n",$str2tab );
// due to line feeds, some blank rows exist, table content is 3 rows fewer
$intablecount = count($intable) - 3;
// first row is table caption
$strtable = '<table class="noaatab"><caption style="font-weight:bold;">'.$intable[0].'</caption>';
// second row blank, third is table headers, split into array based on 2+ blanks in between (1st header is null)
$strheads = preg_split('/ +/',$intable[2]);
$strtable .= '<tr><th>'.$strheads[0].'</th><th>'.$strheads[1].'</th><th>'.$strheads[2].'</th><th>'.$strheads[3].'</th></tr>';
// rest is table
for ($j=3;$j<=$intablecount;$j++) {
// split into array based on 2+ blanks in between
$strdata = preg_split('/ +/',$intable[$j]);
// format table data row
$strtable .= '<tr><td class="first">'.$strdata[0].'</td><td>'.$strdata[1].'</td><td>'.$strdata[2].'</td><td>'.$strdata[3].'</td></tr>';
}
// close table and return it
$strtable .= '</table>';
return $strtable;
}
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- saratogaWX
- Posts: 1170
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Space Weather
I've used what gluepack did with an update to the wxspace.php Saratoga template add-on page.
This now uses your Saratoga CSS theme for styling and 'knows' about wide/narrow aspect.
Some of the links in the page were also changed as the target websites had changed.
Added credits at the bottom of the page.
You should be able to replace your existing wxspace.php with the attached. I'll also attach the full script set that has the Budgie, Ken and 'gluepack' mods incorporated.
Best regards,
Ken
This now uses your Saratoga CSS theme for styling and 'knows' about wide/narrow aspect.
Some of the links in the page were also changed as the target websites had changed.
Added credits at the bottom of the page.
You should be able to replace your existing wxspace.php with the attached. I'll also attach the full script set that has the Budgie, Ken and 'gluepack' mods incorporated.
Best regards,
Ken
You do not have the required permissions to view the files attached to this post.