Author Topic: Lightning placefile code (GR-series programs)  (Read 7636 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1148
Re: Lightning placefile code (GR-series programs)
« Reply #25 on: June 13, 2014, 11:17:11 PM »
I went back to the original script without the station array and changed the "chdir" on both php files to the web address. The GRL3 program is adding the lon & lat when it is calling for the data. The error message has gone away and the lightningplacefile.txt file has data in it, but no strikes listed because there are no storms in the area. It appears that all is working, but won't verify until the next storm - and there are not any in the 5 day forecast.  #-o :-)
« Last Edit: June 14, 2014, 07:51:06 AM by Dr Obbins »

Offline JonathanW

  • Engineer
  • Forecaster
  • *****
  • Posts: 323
Re: Lightning placefile code (GR-series programs)
« Reply #26 on: June 14, 2014, 08:23:50 AM »
Good to see.  In the most recent versions, I eliminated the "chdir" command and am just using relative directory links.

Also, since the data that BO is now serving up doesn't have bolt strength (I believe Egon is working on a new interface?), all bolt icons are defaulting to dots.

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1148
Re: Lightning placefile code (GR-series programs)
« Reply #27 on: June 14, 2014, 08:47:15 AM »
I changed the radar site in GRL3 to Rapid City, SD and the script is working. \:D/

For some reason I could not get the more recent versions to work, but only what I believe is the original version. In summary:
In both the "lightningloader.php" and the "lightningpf.php" the following code was changed from:
Code: [Select]
chdir('c:\apache24\htdocs\lightning');to
Code: [Select]
chdir('http://www.YOURWEBSITE.com/lightning');Then in the "lightningloader.php", line
Code: [Select]
fwrite($localhandle,'IconFile:    1, 30, 30, 15, 15, /lightning/5lightningicons.png'."\n"); was changed to
Code: [Select]
fwrite($localhandle,'IconFile:    1, 30, 30, 15, 15, http://www.YOURWEBSITE.com/lightning/5lightningicons.png'."\n"); so the place file markers could be found.

In the GRL3 Placefile Manager the following 3 files are added:
Code: [Select]
http://www.YOURWEBSITE.com/lightning/lightningloader.php
http://www.YOURWEBSITE.com/lightning/lightningpf.php
http://www.YOURWEBSITE.com/lightning/lightningplacefile.txt
I also made a mirror image of the png file so lightning bolts are shown.  :-)

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 486
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: Lightning placefile code (GR-series programs)
« Reply #28 on: July 24, 2015, 07:20:46 AM »
n0ym,

I finally got around to implementing your scripts and they work like a charm.  I changed to use my icons which are squares that get smaller with age, but that was all.

Thank you very much for sharing.

- Jim

Forum Search and Google Can be Your Best Friends

Offline JonathanW

  • Engineer
  • Forecaster
  • *****
  • Posts: 323
Re: Lightning placefile code (GR-series programs)
« Reply #29 on: August 09, 2015, 12:39:20 PM »
Glad to see this is still of use :)

When Mike releases versions of GRLevel3 and GR2AE that can handle Placefile v. 2 (with timestamped placefile data), I'll look at updating the placefile generator.

I've considered trying to implement some sort of strike strength derivation based on average distance to BO stations involved in strike detection, but I'm not sure how accurate it would be (I suspect Egon et. al were doing something similar initially, and stopped due to it being unreliable).

 

anything