Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / getting weather from a weather station

Author
Message
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 7th Feb 2015 20:33 Edited at: 7th Feb 2015 20:34
Since GPS is working know I like to share some information about how to do this. I made a weather app that uses gps and obtains weather from local weather stations. I use rapid xml and c++ for this. Some things to know about this is that you need to know how to parse a website to gather information about the weather.

Some things you need to know is how to get the distance from gps location to closest station. This is in c++.



This code gathers the information about the closest point to what is calculated on earth.

Know its time to get the weather of the closest weather station. to do this we have to define the biggest distance that would occur between a weather station and a lat long cord. I made a weatherstuff2.txt which includes all the lats and longs of all the weather stations for the usa. It might actually include more weather stations then that because I got it off the government website w1.weather.gov.



This is pretty much how I did it and it works pretty well if you have gps on your mobile device.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Feb 2015 23:59
Thank you for sharing. I have had an idea for a couple of apps that would use the GPS and AppGameKit V1 didn't support it.

Now, I may be able to get them done.

Cheers,
Ancient Lady
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 9th Feb 2015 01:26 Edited at: 9th Feb 2015 01:28
I have actually got it to display the temperature and location within the usa using gps. In my game it rains, or snows in the background using gps locations and tells temperature from the closest weather station.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 9th Feb 2015 01:27
That's cool 3DPIS. Thanks for sharing!

Using AppGameKit v2 T1 + T2
Systems: Primary: Mac OS X 10.10
Secondary: Windows 7
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Feb 2015 02:02 Edited at: 9th Feb 2015 02:29
Quote: "I have actually got it to display the temperature and location within the usa using gps. In my game it rains, or snows in the background using gps locations and tells temperature from the closest weather station."

That is freaking awesome!
I can imagine reversing the weather though for some local purposes.
After all, if it has been raining for 4 days, then a little sunshine in the game would surely brighten my day.

The coordinates could be map driven instead of GPS for games that involve traveling.
This would be awesome for flight simulators as well.

Thanks!!


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-05-18 22:50:17
Your offset time is: 2024-05-18 22:50:17