PM Weather by Mike Kopack (Mav2) Ed Boykin (Av8|) Stephen Loomis (sophisto) Version 1.0 (NOTE: Because this program uses data from another server, only information from US locations is available. If you know of some weather server that holds freely accessable data for your country, let me know and I'll try to make a version for you.... -- Mike ) What is PM Weather? ------------------- PM Weather is a program I've been thinking of writing for about a year now. My school has a script on it's main Sun server systems that will go out to the weather server at the University of Michigan and retrieve the current weather data for you. One day while working in a Mac cluster I saw a graphical interface for this server that displayed all the data in terms of mercury in a thermometer and such. I had just started running OS/2 and thought it would be a great program for us OS/2 users with Net access to have. It took me a while to get into OS/2 enough to learn how to do ANY PM programing. This is the result so far of my efforts. Stephen and Ed were gracious enough to code up the sockets interface which does the actual data retrieval for me. I am in charge of the PM interface and making changes/additions to the data retrieval portion. Most of the PM coding I took from Petzold's "Presentation Manager Programming for OS/2" book. I highly recommend this book to anyone trying to learn PM coding.... Installation ------------ Simply create a new directory and unzip the archive into it. You can associate a Program template to the program and it will have an icon too. During execution the program will create a log file. This is for debugging purposes only and will eventually be removed. Keep in mind that this log file will grow the longer you have the program running so you might want to shut it down occationally and then start it back up to restart the log. You also need to edit the weather.cfg file. You should replace the ATL with the 3 letter code associated with the Airport closest to your location. If you don't know it, just call any of the airlines and I'm sure they'd give it to you. Eventually I'll add in a list that you can choose from. How to run the program ---------------------- NOTE: BEFORE running this program you MUST have a connection to the network working, either through IBM's TCPIP/2.0 or through the Internet Access system provided in OS/2 Warp. I don't know if it will work through something like TIA, so experiment at your own risk.... At the command line the program can be run simply by typing weather, or from the desktop, click on the PMWeather icon. The program will pop open a window and immediately attempt to retrieve the current weather stats for the city with the code you entered into the weather.cfg file. Once this data is retrieved it will be displayed in a textual listing format. The next version will display everything graphically. You can update the data at any time by going into the Options menu and selecting Update. The program currently will access the server every 1 hour after the program is initially run. Data on the server is *NOT* always kept up to the hour, but is usually pretty close. NOTE: Until I can figure out how to add in a second thread to handle the data retrieval portion of the program, updating the data will LOCK THE PM INTERFACE of OS/2 until the data is retrieved. It shouldn't be too bad for people with Ethernet connections (takes my machine 2 seconds and I'm 1 hop from the T3), but beta testers with SLIP connections have reported 30 seconds waits. It is largely a matter of how fast your net connection is to the rest of the world. I will be changing this soon... Future additions / Changes -------------------------- Put the data retrieval into a second thread of execution. Add in graphical displays of the data!!! Include on-line help Possibly retrieve hourly weather maps and display Get both short and long term forcast to display textually User entry window for location entry instead of .cfg file. general debugging Climate data retrieval I hope you liked this program. I was writing it mainly as an exercise in PM coding. I'm hoping to get it done before the end of the summer since I'll be starting work with IBM here in Atlanta and won't have much free time after that. If you use this program, please do me a favor and take a second to send me some e-mail at either of the addresses below. I just want to get an idea of how wide spread this program gets. If you have any questions/problems with the program, or just want to talk, send me e-mail at: Buzz@wc162.residence.gatech.edu (until Sept 1, 1995) or gt6758b@prism.gatech.edu (until December 1995) After that, who knows! I can also be reached a good amount of the time on IRC in the #os/2 channel. PS: Don't bug Ed or Stephen about this... their involvement basically ended when they finished the socket code... It's become my baby now and my responsibility. Later!!! --Mike Kopack