GMAC Forum

General Category => General Discussion => Topic started by: Jim (Chairman) on 15/10/2014, 08:14:14 PM

Title: Simple Weather gadget...
Post by: Jim (Chairman) on 15/10/2014, 08:14:14 PM
All,

If anyone is interested I've knocked up a little GMAC weather gadget...

http://www.eight33n.com/greenacres_weather.php (http://www.eight33n.com/greenacres_weather.php)


The page looks like this:

(http://www.eight33n.com/images/greenacres_weather_demo.jpg)

It uses data from the BBC Weather page for Rushall, which proves very accurate.

The little pointer gadget looks like this:

(http://www.eight33n.com/images/map_pointer.jpg)

Key:
I will continue to develope it to show further ahead in time etc...

Maybe you might want to bookmark the page...?!

I find it useful...

Cheers!
Title: Re: Simple Weather gadget...
Post by: Chairman on 15/10/2014, 08:34:44 PM
That looks great Jim. I'll pop it on the website weather page if that's OK with you?
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 15/10/2014, 08:36:20 PM
Chris,

Sure! You can just put it in an

Code: [Select]
<IFRAME SRC="http://www.eight33n.com/greenacres_weather.php">
I think...

Jim
Title: Re: Simple Weather gadget...
Post by: Chairman on 15/10/2014, 08:49:00 PM
Will do Jim

Might take a day or two, everything on the site is in Joomla, which I can do from anywhere, except the weather page.

I'll do it on a different PC, next time I run that one up. It's just the easiest way.

How often is this updated? just out of interest.

Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 15/10/2014, 09:01:55 PM
Chris,

I have one script that pulls the next 3 days data from the Beeb and databases it, once every hour. So each hour I get the next three days worth of weather data. Any further ahead than that might prove less accurate. The weather data is at 3 hour resolution. This data will build up in my database and might be useful in the future for analysing weather / wind trends.

The map image is rendered instantly on each page load and it uses the next weather data record, so if you load at 21:15 in the evening you'll get the data from the 22:00 sample.

Make sense?

I've just modded the little data panel at the top left to only show data between 06:00 and 22:00.

Soon I will incorporate the Sunrise / Sunset times and the club flying rules for different aircraft / power types...

Cheers!

Jim
Title: Re: Simple Weather gadget...
Post by: Chairman on 15/10/2014, 09:14:14 PM
Great OK.

Have a look here - I've given it it's own page.
Struggling with sizing though, I've set sizes for the iframe, but that doesn't affect the text panel.
and with the link...

http://greenacresmac.co.uk/J/index.php/weather/jims-weather-gadget (http://greenacresmac.co.uk/J/index.php/weather/jims-weather-gadget)
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 15/10/2014, 09:26:38 PM
Chris,

I can fix that I think...

I've made the data panel 50% of the overall width and made the font size selectable.

Use this URL in the iframe:

Code: [Select]
http://www.eight33n.com/greenacres_weather.php?font_size=10
That gives a 10 pixel font size...

Might fit better...

Jim
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 15/10/2014, 09:32:52 PM
Chris,

You can now "shove" the data panel to the bottom as well, use:

Code: [Select]
http://www.eight33n.com/greenacres_weather.php?font_size=12&data_bottom=true
That will almost certainly lay out OK...

Jim
Title: Re: Simple Weather gadget...
Post by: Chairman on 15/10/2014, 09:53:50 PM
font size 10 seems to work best by the looks Jim. Ta.
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 15/10/2014, 09:54:49 PM
Chris,

Just made some slight adjustments to sizing. Looks perfect on the GMAC website...

Jim
Title: Re: Simple Weather gadget...
Post by: Chairman on 15/10/2014, 10:12:46 PM
Yes it looks great, thanks Jim
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 27/10/2014, 12:18:56 PM
Chris,

Some improvements:

1) I'm now using RSS data from World Weather Online. They provide 3 hour data for Rushall but they include LOTS more detail including wind gusts.

2) The Gadget now shows Base Wind and Gusts in the form: BASE+GUST mph

3) The information table now takes into account Sunrise and Sunset times and doesn't bother showing data for dark times.

4) More accurate wind direction data.

Hope this helps...

PS: I really want to write a "Flying Tomorrow!" type email or SMS predictor....

Jim


Title: Re: Simple Weather gadget...
Post by: Chairman on 27/10/2014, 02:53:45 PM
Looks great Jim.

Yep, what we need now is a definate "it will be flyable tomorrow" indicator, and we could have buttons for folk to push to say they're going.
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 27/10/2014, 03:02:24 PM
Chris,

Agreed! I will build a little form below the image section, that shows:

Wind Direction: Good / Bad (based on along strip or cross)
Wind Speed: Good / Bad (based on Gust speed less than say 10 MPH) -> Please advise what you believe a maximum safe gust wind speed is....???

Also I'll put a simple form that has a "Name" input and an "I'm going!" button, then I can database the results. Anyone that has already said they're going will be listed...

Jim
Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 27/10/2014, 03:45:43 PM
Chris,

This is now done!

Take a look. As soon as someone says "I'm flying" it starts displaying a list of pilots that are going...

Try it, I can always clear the data at my end...

Jim
Title: Re: Simple Weather gadget...
Post by: Chairman on 27/10/2014, 08:20:18 PM
Very hard to advise on gusts Jim. I'm happier flying in a 15mph wind with no gusts, than a 0mph wind with 10mph gusts, if you see what I mean?

I like the little comment form though, lets see how that goes.

It may turn out that going over today, might be better than tomorrow, but leave it is for now.

Title: Re: Simple Weather gadget...
Post by: Jim (Chairman) on 27/10/2014, 08:42:25 PM
Chris,

I understand. It also depends on what you're flying...

Modded form to reject null and default pilot names...

See if anyone uses it...

Jim