PH Weather v2.7

by Wong CK © Copyright 2012-2020
Probe House Software


What is this?

PH Weather is a simple program that displays the weather of a city. It displays a graphical representation of the weather and the temperature of the City. This program was inspired from the weather gadgets on Windows.

The Atari Falcon with upgraded CT63 & CTPCI / Supervidel and FireBee, there are now possibilities to run the desktop with higher resolution, more colours and with network connectivity. To consume these new resources - large screen size, high colour and network, there is a need for new programs such as this weather app - being always on the screen consuming your new large real estate utilising high-colour to display the weather situation and chomping your network bandwidth to check the weather on the Internet.

PH Weather is freeware.

Requirements

  1. This runs on MINT with MintNET and requires an internet connection. Development was done on Mint 1,18, while lower MINT versions are not fully verified/tested on.
  2. You also need to have zView's codec, by Zoro, correctly installed (the codecs). All these are available from zView package (latest release 8).
  3. The zView package requries a VDI with EdDI support. This is available in NVDI, NovaVDI, fVDI etc.
A colour display will be nice, but you can run it on lower colour system like 16 - just that the rain clouds will not be so nice looking. As I have not tried running at low colour, I have no idea how it looks like. Recommend that you use at least 256 colours.

A GDOS configured printer (black and white or coloured) is required to print out the weather situation.

Installation

  1. Extract and copy all the files into a folder of your choice. For example d:\phweathr.
  2. PH Weather is compiled for different Atari CPU type
  3. Make sure that the IMG subfolder is created inside the folder. For example d:\phweathr\img.
  4. Make sure that the PNG images are inside this IMG folder.
  5. Copy all zView codecs into C:\GEMSYS\LDG\CODECS folder. Create that folder if you do not already have it.
  6. Double click phweathr.prg to run it !!
You could make PH Weather run everytime you boot up by using the run command in your Xaaes.cnf file.
The loading of images into memory may take some time, the loading time depends on the speed of your Atari system.

The App Windows

You should place PH Weather windows somewhere visible on your desktop but out of the way of your main working area.
  • Each window shows the weather condition of the location of your choice.
  • The temperature can either be in Celsius or Fahrenheit
  • The weather condition is shown in text as well as the graphical representation
  To move the window, click & hold anywhere on the window until the mouse turns into a hand.
  Drag and release it to the new location.
  The app will retrieve the weather information from the Internet approximately once every 12 mins.
  Double right click on a Window to force reload of weather information for that location.


Menu options

Right click on the weather app window for a popup menu.
  • The About displays.... well, the about of the app
  • New Window opens an new weather window
  • Close Window closes an existing window
  • Select Details to see the current forecast of the selected city
  • Select Forecast to the next 4 days forecast of the selected city
  • Select Configuration to get into the configuration window (see next section)
  • Select Print prints the weather of the window it was clicked on (see Print section)
  • Select Quit to exit the application
If there are no location configured, you will be reminded to right click to configure a city.


Configuration Window

  • Enter the city of which the weather you are interested in
    1. The spelling of the city needs to be accurate.
    2. For cities with the same name, you need to specify the country. For example, "london,uk" will show weather of London in UK while "london,canada" will show the weather of London in Ontario. (Note that the comma separator is required) Specifying only "London" will return a location depending on the server liking.
      Note: OWM needs a country code instead of the country name.
    3. Specifying the old name of a city may resolves to the new city name. For example, Bombay will find Mumbai.
  • Select the measurement units - Celcius or Fahrenheit
  • Select where to obtain the weather information - from MSN or Open Weather Map.
  • Select "Use Custom Text Colours" - if you want to change the colour of the text on a particular weather app window.
    1. Temperature and Weather text (City name and weather description) can have separately colours each.
    2. Daytime and nighttime text colours are separate and will be used according to the time of the day at the location.
    3. Select "Apply colours to all opened windows" will apply the colour scheme to all opened windows, so that you do not need to set the colours to each windows one-by-one.
    4. To restore back to default colours, just unselect "Use Custom Text Colours".


Details and Forecast Windows

Double click on the weather app window or select the Details/Forecast from the pop-up menu, for the forecast/details window.
The details and forecast will be available in a couple of seconds after a change of the selected city.
Click on the Details/Forecast button to swap between the two display.

How to open multiple weather locations

  1. Right click on any weather window to open the menu.
  2. Click on New Window item on the menu
  3. A new window (or an old closed window) opens up
  4. Right click on the newly opened weather window to open the menu.
  5. Click on Configuration item on the menu to change the location


Printing the weather information

Printing is done via GDOS printing. As only NVDI supports both EdDI and printing, only NVDI 4 and NVDI 5 were tested. Colour and black & white printing is supported. The current weather image, today's forecast as well as the 5 days forecast image are printed out.

  • The Print dialogbox allows selection of printing device via the pull down menu. The printer must be defined under GDOS.
  • The font used to print the weather can be changed, if the System font selector is setup.
  • Click OK to print the weather report or click Cancel to return without printing.
  • The dialogbox will auto close when the printing completes.


Keyboard Shortcut

KeyDescription
CTRL-TTop all windows
CTRL-UClose the top most window
CTRL-QQuit PH Weather
Any other unsupported key presssed will be forwarded to the AV-server, which is normally the desktop, for further processing.

Config and working files

The config file is called phweathr.cfg located at the same folder of the app. It is created by the app itself on exit. Information of the cities of interested are stored along with other information. If this file is deleted, the app will loose the selected city information.


Limitations



What's New & Fixes

Version 2.7
  1. Weather app window text colours can be customised.
  2. Optimised weather data retrival to minise data download.
  3. Paused 0.5 second between each API calls in attempt to improve spotty internet link
  4. Recompiled with LDG 2.35 fixing crash by LDG module on exit in Mint MP.
Version 2.6
  1. Fixed a changed Open Weather Map web services that caused crashes/corrupt values.
Version 2.5
  1. French RSC & document translation.
Version 2.4
  1. Fixed some German language bugs.
  2. Corrected Open Weather Map language query.
  3. Corrected getting weather forecast algorithm.
Version 2.3
  1. Add printing capabilty using GDOS printing.
  2. Fixed changes in API by weather providers -
    1. Fixed crash when using OWM weather API.
    2. Fixed missing information when using MSN weather API.
  3. Fixed crash when no network available.
Version 2.2
  1. Fixed some GUI issues with N.AES 2.0.
Version 2.1
  1. Added MSN weather service again as it seems to be back on-line, the provider seems to be changed.
  2. Auto retry of weather data if weather service is temporary unavailable.
Version 2.0
  1. Migrated to OpenWeatherMaps for free weather web services.
  2. Weather of multiple locations can be displayed.
  3. Unknown key presses are passed to AV server for processing.
  4. Windows redraws/moves are observed during network waits.
Version 1.22
  1. Redo menu so that QUIT is at the bottom.
Version 1.21
  1. Fixed misaligned data element from web services causing a crash.
Version 1.2 (what happened to v1.1??)
  1. Faster startup due to on-demand graphics. Load/convert only the graphics it needs (previous version load/convert all graphics.
  2. Use timezone of remote city to determine time, removes need to make query to Google.
  3. Day and night images are determined by the sun rise and sunset time of the city. Time of the city relies on timezone of the Atari computer.
  4. UTF-8 code used for Atari Font set.
  5. Airport codes usable as entry for city
  6. Fixed MyAES data entry issue.
Version 1.01
  1. Silently exiting if RSC cannot be loaded when running off ext2 fs (or any fs which allows upper and lowercase).
  2. Memory violation when exiting from a Memory Protected Mint.
  3. Error getting object tree in MyAES.
  4. Unable to enter non-English characters (like umlaut (ü)).


Thanks

Thanks to the gang at Atari-Forums.com and OL and jfl for the support.
Thanks to Latz (Atari-Forums.com) for German translation.
Thanks to Moulinaie (Atari-Forums.com) for French translation.
Thanks to Open Weather Map and MSN Weather for the free weather web services.

Future developements

As usual, none planned.


Questions, comments, or error reports? Please leave a post at Atari-Forum.com
Visit my web site at https://sites.google.com/site/probehouse/