Author Topic: GRLevel3 Animation via HAniS  (Read 10543 times)

0 Members and 1 Guest are viewing this topic.

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1045
  • unnamed weather station, Boltek, Win7 Pro, ToA
    • TiggrWeather
Re: GRLevel3 Animation via HAniS
« Reply #75 on: September 08, 2015, 02:44:13 PM »
No problem, and fully understand the 'fat fingers' malady - it's alive and well here, too. Figured I'd picked on Jerry enough (for a while).   :roll:
John
W7JKG
BUY FROM AMAZON HERE... Thank You! :-)

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: GRLevel3 Animation via HAniS
« Reply #76 on: September 14, 2015, 02:16:46 PM »
Hi Jerry,

Finally with my hectic work schedule I was able to make the changes you suggested for the multi. Thank you. I am still having one small issue, I cannot get Hopkinsville, KY to appear for the radar sight when it describes what radar image viewed. It does it for all the rest but not Hopkinsville. What did I mess up?

Thanks for the help.

Let me know.

Bob
KK4QXH

http://lebanontnwx.org/wxgr3hanis-multi.php
Bob
KK4QXH

Offline satcop

  • Senior Contributor
  • ****
  • Posts: 184
    • Clifton Virginia Weather
Re: GRLevel3 Animation via HAniS
« Reply #77 on: September 14, 2015, 02:27:26 PM »
Hi Bob;

In inc-multi-gr3hanis.php check where you see a line that looks like this: if ($radarLoc == 'klwx') {
      $radarLocText = 'Sterling VA ';  I suspect that the radarLoc for Hopkinsville may have a typo.  is the radar khpx?  If that is the case than the line should look like this
($radarLoc == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';
  or this
} elseif ($radarLoc == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';

Bob
« Last Edit: September 14, 2015, 02:39:35 PM by satcop »
Clifton, Virginia Weather


Blitzortung Stations 1189, 1451 - CWOP EW1675

Offline satcop

  • Senior Contributor
  • ****
  • Posts: 184
    • Clifton Virginia Weather
Re: GRLevel3 Animation via HAniS
« Reply #78 on: September 14, 2015, 02:56:05 PM »
Actually it is a typo, just found it in mine.  The second choice in that table reads $radarLocText when it should read $radarLoc:  I suspect that you have the following:

} elseif ($radarLocText == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';

as a line.  The line should read:

} elseif ($radarLoc == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';

So it wasn't you that messed up, it was me #-o
Bob
« Last Edit: September 14, 2015, 03:12:36 PM by satcop »
Clifton, Virginia Weather


Blitzortung Stations 1189, 1451 - CWOP EW1675

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #79 on: September 14, 2015, 04:24:29 PM »
There's a problem with the division widths when this script was adapted to accommodate images larger than 660px in the narrow Saratoga template.  The 'main-copy' division needs to be enlarged to reflect the wider images.  This should work:
In 'wxgr3hanis-multi.php' use
Code: [Select]
<?php if (isset($_SESSION['CSSwidescreen'])&&!$standAlone) { ?>
<div id="main-copy" style="width:<?php echo ($_SESSION['CSSwidescreen']=='calc(100%-114)' : ($imageWidth<660?660:$imageWidth)) ?>px">
<?php } else { ?>
<div id="main-copy" style="width:100%">
<?php } ?>
instead of
Code: [Select]
<div id="main-copy" <?php echo $standAlone'style="width:100%"':''?> >
already present in 'wxgr3hanis-multi.php'.

This change should place the entire GRLevel3 radar and controls within 'main-copy'.  Of course it will extend beyond the boundary of the rest of the page, but it will still be contained by its own boundary.

This change applies to 'wxgr3hanis.php' as well if images wider than 660px are displayed.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline satcop

  • Senior Contributor
  • ****
  • Posts: 184
    • Clifton Virginia Weather
Re: GRLevel3 Animation via HAniS
« Reply #80 on: September 14, 2015, 06:35:20 PM »
Thanks Jerry
Clifton, Virginia Weather


Blitzortung Stations 1189, 1451 - CWOP EW1675

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: GRLevel3 Animation via HAniS
« Reply #81 on: September 15, 2015, 07:43:43 PM »
Bob,

I think the text is correct, See below. Let me know. Hopkinsville should show the name. It shows the radar image.
<?php    if ($radarLoc == 'kohx') {
      $radarLocText = 'NWS Nashville TN ';
    } elseif ($radarLoc == 'tbna') {
      $radarLocText = 'FAA Terminal Nashville TN ';
    } elseif ($radarLoc == 'khpk') {
      $radarLocText = 'Hopkinsville KY ';
    } elseif ($radarLoc == 'khtx') {
      $radarLocText = 'Huntsville AL ';
    } elseif ($radarLoc == 'knqa') {
      $radarLocText = 'Memphis TN ';
    } elseif ($radarLoc == 'kmrx') {
      $radarLocText = 'Knoxville TN ';
    } elseif ($radarLoc == 'kdix') {
      $radarLocText = 'Mt Holly NJ ';
    } elseif ($radarLoc == 'krax') {
      $radarLocText = 'Raleigh Durham NC ';
    } elseif ($radarLoc == 'kmhx') {
      $radarLocText = 'Morehead City NC ';
    } elseif ($radarLoc == 'kltx') {
      $radarLocText = 'Willmington NC ';
    } elseif ($radarLoc == 'kdox') {
      $radarLocText = 'Dover DE ';


Thanks. Bob

http://lebanontnwx.org/wxgr3hanis-multi.php
Bob
KK4QXH

Offline satcop

  • Senior Contributor
  • ****
  • Posts: 184
    • Clifton Virginia Weather
Re: GRLevel3 Animation via HAniS
« Reply #82 on: September 16, 2015, 05:08:54 AM »
Hi Bob;

I believe Ft Campbell KY aka Hopkinsville has a callsign of khpx, your radarLoc is calling for khpk  Change the k to an x and I think things should start to work.  :-)

Eye chart material.  So Dr do you see a k or an x ? ;)
« Last Edit: September 16, 2015, 05:43:51 AM by satcop »
Clifton, Virginia Weather


Blitzortung Stations 1189, 1451 - CWOP EW1675

Offline satcop

  • Senior Contributor
  • ****
  • Posts: 184
    • Clifton Virginia Weather
Re: GRLevel3 Animation via HAniS
« Reply #83 on: September 16, 2015, 06:42:03 PM »
As Jerry gwwilk found a fix for the narrow Saratoga template (thank you Jerry for your help on this), and I found some typos thanks to Bob tnwxman, please find attached an update for the multi GR3 hanis example.  If you haven't already, you still very much need to download the main code from Jerry's GR3 Hanis script to complete this.  An example of this script in action can be found here:http://cliftonvaweather.com/wxgr3hanis-multi.php

Bob
Clifton, Virginia Weather


Blitzortung Stations 1189, 1451 - CWOP EW1675

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: GRLevel3 Animation via HAniS
« Reply #84 on: September 16, 2015, 07:16:18 PM »
 :oops: Gee a little thing like an x and a k. Need to check the calendar for my next eye appointment  :shock:. I do not know how many times I looked at that and missed it.

Thanks Bob for catching that. :!:
Bob
KK4QXH

Offline cw3beck

  • Eagle Rising Logo
  • Member
  • *
  • Posts: 4
    • Bailey Cove Estates
Re: GRLevel3 Animation via HAniS
« Reply #85 on: October 30, 2015, 12:42:32 AM »
Jerry,
     I have read thru every post in this subject and have not found where I have gone wrong.  Pretty sure that I have the path set up correctly in the wxgr3hanis.php but maybe I still have the image size settings off.  Can you take a look and possibly make some recommendations?  Thanks!

http://eaglesrising.homeserver.com:8085/wxgr3hanis.php

images are in the path \grlevel3

############################################################################
/************************* Settings *****************************/
$radar = 'br1'; // Default radar type is set here
$radarLoc = 'khtx'; // IMPORTAMT!!! Default radar location is set here
$useRadarLoc = true; // Does your site include the radar location in the file name? true or false
$imageDir = '/grlevel3'; // Location of GRLevel3 images on server - NOTE! - now requires leading slash!
$imageWidth = 650; // Width of radar images
$iframeWidth = $imageWidth; // Default IFrame Width -- should no longer need adjustment
$iframeHeight = 650; // Default IFrame Height -- adjust as needed
$autoRefresh = false; // Use Autorefresh? true or false
$autoRefreshTime = 4; // Number of minutes between autorefreshes.  IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
$autoRefreshDefaultOff = false; // Begin with Autorefresh Off? true or false
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'darkslategray'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
############################ New in Version 2 ##########################
$pauseSeconds = 2; // Pause on last image, in seconds
$animRate = 20; // Frame Rate of animation: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer
$numbImages = 10; // Number of images to display - between 3 and the number of images you are uploading
/*********************** End Settings ***************************/

Thanks for your time!

John B

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 652
    • Jay's Woodcrafts
Re: GRLevel3 Animation via HAniS
« Reply #86 on: February 01, 2016, 11:21:28 AM »
Jerry,

I'm having an issue with this script.  Everything works fine on load but when I change to any other radar product the status reports on kmux radar.  The images are of the correct radar, kemx, just the status is wrong,  Not sure how long it has been like this.  I only noticed because kmux is showing red now.

Thanks for looking,

Jay

http://jayswoodfurniture.com/wx/wxgr3hanis.php
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #87 on: February 01, 2016, 12:07:22 PM »
Try re-downloading wxgr3hanis.php, inc-gr3hanis.php and wxgr3hanis-iframe.  Your version is dated 20150815 and my version is dated 20150917.  You must of course copy your settings from the old to the updated 'wxgr3hanis.php' and optionally to the debugging defaults section in 'inc-gr3hanis.php'.

Also be sure you are using  the latest version of HAniS, attached below.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 652
    • Jay's Woodcrafts
Re: GRLevel3 Animation via HAniS
« Reply #88 on: February 01, 2016, 12:33:47 PM »
Jerry,

Still no change.  I can't find a reference to kmux anywhere in the scripts.

Jay
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #89 on: February 01, 2016, 01:36:23 PM »
The radar site is contained in your 'radar-status.php', and you have Ken's latest version on your site.  I noticed that you used relative addressing in places, that is beginning with './', and I wonder if the script isn't picking up an older copy of 'radar-status.php' somewhere on your site.  The copy at jayswoodfurniture.com/wx/ has the display of the status turned off unless it's inactive:
Code: [Select]
  $myRadar = 'KMUX';   // San Francisco
//
  $noMsgIfActive = true; // set to true to suppress message when radar is active

Try setting in 'inc-gr3hanis.php'
Code: [Select]
<?php include("radar-status.php"); ?>to
Code: [Select]
<?php include("./radar-status.php"); ?> or replace the copy that's being used with Ken's latest version already present on your site.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #90 on: June 01, 2016, 05:14:19 PM »
This script was written to use GRLevel3 images saved as 'jpg' graphics because these files are smaller than the corresponding 'png' files and therefore save bandwidth, but a user just had a problem with that 'jpg' default.

Accordingly, there's a new Version 3 (20160601) that is up on my web site that incorporates an '$imageType' setting.  You may download the updated scripts, wxgr3hanis.php, inc-gr3hanis.php, and wxgr3hanis-iframe.php or you may redownload the package via the attached V3 zip.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #91 on: August 03, 2016, 07:31:29 PM »
Please see this discussion about a necessary revision to 'radar-status.php'!
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2090
    • http://www.cnyweather.com
Re: GRLevel3 Animation via HAniS
« Reply #92 on: August 15, 2016, 03:13:38 PM »
Any other tricks to try to prevent the browser caching?

It always happens to me if I view my wxgr3hanis.php on my phone or tablet and sometimes still
using my desktop browser. I even had someone "complain" to me by email that a local weather site should have
the most recent weather radar instead of something from hours or a day ago. This issue has been driving me nuts.

I've used the getUniqueImageURL on my main page so the radar image and my webcam snapshots are up to date
but where can I insert that within the wxgr3hanis.php or inc-gr3hanis.php files?
Tony


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #93 on: August 15, 2016, 04:08:15 PM »
Any other tricks to try to prevent the browser caching?

It always happens to me if I view my wxgr3hanis.php on my phone or tablet and sometimes still
using my desktop browser. I even had someone "complain" to me by email that a local weather site should have
the most recent weather radar instead of something from hours or a day ago. This issue has been driving me nuts.

I've used the getUniqueImageURL on my main page so the radar image and my webcam snapshots are up to date
but where can I insert that within the wxgr3hanis.php or inc-gr3hanis.php files?
Be sure you are using the latest version of scripts.  The latest main script, includes script, and iframe script can be downloaded and saved using the links.  Also be sure to save your customizations to the main script.  The iframe script which displays the images incorporates the 'getUniqueImageURL' function by design, so it shouldn't display stale images.
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2090
    • http://www.cnyweather.com
Re: GRLevel3 Animation via HAniS
« Reply #94 on: August 15, 2016, 04:41:27 PM »
Thanks Jerry.

I wiped it all all out on my site and stated from scratch. I'll see how it goes. THANKS!


UPDATE:
Seems to be all ok now Jerry. everything is updated all the time. Guess a fresh install was what it needed.
Thanks for the hard work!
« Last Edit: August 16, 2016, 07:22:41 AM by CNYWeather »
Tony


Offline RickNY

  • Senior Member
  • **
  • Posts: 80
    • College Hills Weather - Farmingville, NY
Re: GRLevel3 Animation via HAniS
« Reply #95 on: August 30, 2017, 10:53:19 AM »
Hi Jerry... How difficult would it be to add code in this to replace the radar images with the "Radar data not currently available" image, similar to what is done with your Conus Hanis script? Currently KOKX is down -- but my page is still serving up the images from yesterday.

Thanks,
Rick

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #96 on: August 30, 2017, 11:04:13 AM »
Hi Jerry... How difficult would it be to add code in this to replace the radar images with the "Radar data not currently available" image, similar to what is done with your Conus Hanis script? Currently KOKX is down -- but my page is still serving up the images from yesterday.

Thanks,
Rick
The stale images could be caught by using a filetime check.  I'll have to think about how to do it, Rick. Not much time today.

Thanks for the suggestion!
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1745
    • SouthEast Lincoln, NE Weather
Re: GRLevel3 Animation via HAniS
« Reply #97 on: August 30, 2017, 07:38:49 PM »
My site's radar, KOAX, will be down until at least September 8.  The 'radar-status' on the GRLevel3 animation script informs users that they're not seeing current images, and if they pay attention to the date/times of the images they'll see they aren't current as well.

On the other hand the US Ridge Radar HAniS Script has an image that the NWS has put up.  The link isn't on the 'Upper Right', just 'Upper' on the page, however.

My current feeling is that Ken True's radar-status script does an adequate job.  I could be convinced otherwise, however.
Regards, Jerry Wilkins
gwwilk@inebraska.com