WXTide32 install and operation - Version 4.0 2004/01/30
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    WXTide32 Copyright (C) 1998-2004  Michael Hopper.
    Based on XTide 1.6.2 Copyright (C) 1997  David Flater.
    ..and WinTide from 1996 by Paul Roberts.
    Also starring:  Jef Poskanzer; Jack Greenbaum; Rob Miracle;
    Geoff Kuenning; Dale DePriest; Paul Roberts; Alex Jones;

    This version of the windows port hacked by Mike Hopper who is solely
    responsible for the program and especially any station index inaccuracies.
    Comments, corrections and gripes can be addressed to: Mike@wxtide32.com. If
    you have received this program by means other than downloading, the newest
    version with full C source code should be available at http://WXTide32.com

    WXTide32 is free software; you can redistribute it and/or modify it under the
    terms of the GNU General Public License as published by the Free Software
    Foundation; either version 2 of the License, or any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
    more details.

    You should have received a copy of the GNU General Public License along with
    this program; if not, one can be obtained from
    Free Software Foundation, Inc.,
    675 Mass Ave, Cambridge, MA 02139, USA.

    The tide prediction algorithm used in this program was developed with United
    States Government funding, so no proprietary rights can be attached to it

    Many thanks to Hans Pieper, the author of the DOS Tide 2.4 program, for
    allowing me to include the subordinate station data from his program for
    about 5000 locations worldwide. His program with the subordinate station data
    files can be found on the web by searching for "tide24".


Manual installation
~~~~~~~~~~~~~~~~~~~
The distribution has a small setup program and inf file that will install the
program and start menu entries but the same can easily be performed manually.

Unzip all files into a clean folder, usually "c:\program files\wxtide32\".
After unzipping make a shortcut to WXTide32 by dragging "WXTide32.exe" from the
install folder to the desktop. If error messages appear when the program is run
the first time, make sure the "working folder" entry in the shortcut properties
shortcut tab points to the folder in which the program resides. This is the
default and should not be a problem.


Manual uninstall
~~~~~~~~~~~~~~~~~~~
WXTide32 does NOT modify the registry or change any files outside of it's home
folder. After a manual install it is safe to delete all install files and folder.


Files included in the distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
readme.txt   This file
gpl          General Public License (please read, IT IS IMPORTANT)
WXTide32.exe Win9x/NT 32 bit executable
WXTide32.cfg Configuration file for WXTide32
WXTide32.hlp On-line help file
WXTide32.cnt Help file index
harmonic     XTide harmonic constants file
harmonic.msc XTide harmonic constants file, misc locations
harmonic.idx Station index for harmonic constants file
WXTSrc##.zip Source files for WXTide32 where "##" is the version number.


Long file names
~~~~~~~~~~~~~~~
While WXTide32 runs under Windows 9x/NT 4 and so can use long file names with
embedded spaces, the Tide2IDX program is a DOS executable supporting only the
8.3 file name format.  For this reason, it is best to keep the harmonic file
names 8 characters or less if you expect to use Tide2IDX on updated harmonics
files as they become available for XTide.  Note that the default current XTide
harmonics file is named "Harmonics" (with 9 characters).


Source files
~~~~~~~~~~~~
The file WXTidSrc.zip has all the source code for the WXTide32 program. Three
files: Tide2idx.c, Tide2idx.ctl and makeidx.bat form the station index builder
DOS console executable. For makeidx.bat to work properly, the "subreg" path will
have to be changed to that which to you unzipped the Tide 2.4 subreg files.


Station indexing
~~~~~~~~~~~~~~~~
The Tide2IDX program generates a sortable station index from one or more
harmonic constituent and subordinate station files.  I never was very good with
geography and as I HAVE NO INTEREST IN POLITICS, political boundary
assignments may seem arbitrary to some extent.  So if you don't like the
region/country/state that your station appears in, try changing the
Tide2IDX.ctl file and make a new index. To generate a new index with
subordinate stations, you must download and unzip the Tide24 program mentioned
earlier.  The files of interest are in the subdirectory "substa" and are all
called "subreg.xx" where "xx" is a region number.  The "makeidx.bat" file
builds an index including all the "substa" files. You will have to change the
search path in makeidx.bat to point to those files for it to work properly.


Revision History
~~~~~~~~~~~~~~~~
Ver 4.0    Fixed: Crash when selecting invalid numbered recent station entry.
2004/01/30 Fixed: Hang when starting program with no wxtide32.cfg file.
           Fixed: Data files only useable when in program folder.
           Fixed: Crash when starting program with no harmonic.idx file.
           Fixed: Crash with no error message when internal failure occurs.
	   *New* User Station File manager supports an unlimited number of user
	      entered subordinate tide and current stations. All station data
              are supported including sort region, position and timezone.
           Added: Station index types 'U' and 'u' for user tide and current stations.
	   Added: Optional subordinate station line field for timezone name.
	   Changed: Location dialog to support display select of user stations.
           Fixed: Moon phase white face displayed backwards.
           Changed: -tz command option offset now limited to less than 24 hours.
	   Updated to latest XTide database which adds 44 new reference stations
	      for England, Ireland and Scotland.
           Fixed: The last reference station of a harmonic file would not load.
           *New* -nearest command line option finds nearest station to Lat/Lon.
           Added: Email support to Help menu.
	   Lots of clean up and small bug fixes.

Ver 3.1    Corrected a bug that would (sometimes) cause a crash when starting
2003/01/20   text tides.
           Changed help file FAQ and rewrote main graphic mode descriptions.

Ver 3.0    Note: The configuration layout has changed. Existing configuration
2003/01/15   files will (should) update automatically when saved the first time.
           *New* individually save options for each mode including what is shown,
             how it is shown, and window size and position.
           *New* Overview mode (a decluttered and squeezed graph) gives visual
             tide overview; 1000 pixel window shows 2 weeks of tides (-overview)
           *New* Graph mode declutter options: Alternate high/low tide times
             (-stagger), Show 1 date per day (-onedate),
             Float alternate tide times on tide line (-staggerfloat).
           *New* Graph depth lines can be hidden, shown behind (-depthlines),
             or on top (-toplines).
           *New* Disable all depth and time marks (-nolines).
           Preferences menu has been reorganized and condensed.
           Colors menu has been condensed.
           Corrected error toggling between fixed and local timezones.
           *New* keyboard accelerators that use single keys same as File menu.
           Corrected a really insidious problem with long custom station names.
           Corrected a problem changing from subordinate to reference station.
           Corrected Clock mode showing wrong background color.
           Changed Calendar header.
           Changed window position validate logic to work better.
           Changed config file write of file names relative to program folder.
           *New* text tides options menu separate from graphics preferences.
           *New* multiple months for calendar output (-nummonths).
           *New* calendar date picker for text tides and graph mode start.
           Added keyboard Alt-G and Alt-N to select Date picker from graph mode.
           Added Caption display with station name option (-caption).
           Changed main graphic window text logic to account for font size.
           Increased text tide output buffer size to 65000 bytes.
           Added Cancel option to exit save message.
           Added center on crosshair time when switching from overview to graph.

Ver 2.9    Corrected two timezone rule processing errors that caused some single
2002/11/20   timezone (no DST) and day of year timezones to show incorrect.
           Recorrected the ver 2.7 correction that removed subreg.40 from index.
           Timezones with fixed offsets now display as timezone name: UTC_+n.

Ver 2.8    Updated to 2002/09/12 XTide Harmonics file.
2002/10/10 Corrected index reference station assignments for Acapulco, Adelade
             and Gibraltar. This should restore the lost Mediterranean stations.
           *New* timezone rule parser and handlers to support remote timezones.
             Timezone change rules are no longer limited to US change times.
             Converted tzdata2002c from http://www.twinsun.com/tz/tz-link.htm to
             static tz rule format.
           *New* option to display tides in any timezone the program know of and
             extensive support changes to Preferences and Custom Station menus.
           Subordinate stations now display in their meridian UTC timezone when
             use Remote Station timezone (-loctz) is selected.
           Corrected operation so subordinate stations show timezone in their
             meridian UTC when use Remote Station timezone is selected,
           *New* Most Recently Used list (MRU) with new pref -max_mru entry.
           *New* crosshair that displays and moves 1 hour with Left/Right arrow,
             moves 1 tide with Ctl-Left/Right, hides with Esc, scrolls in graph.
           *New* Home key now centers graphmode display to current time (Now).
           Changed station info timezone to Meridian.
           Updated my email address in this readme.txt and the help file.
           Changed main menu "Options" to "File".
           Fixed the correction to put the station name on text outputs.
           Changed calendar output to include year and highest/lowest in header.
           Corrected custom station level offset errors across config save/load.
           Removed Keep Index option and made it automatic.

Ver 2.7    Added "Visit WXTide32.com" to help menu.
2002/02/20 Modified About box to include http://wxtide32.com base web site.
           Added -append command line option to add "- WXTide32" to window name.
           Corrected some variables that were miss-cast and gave warnings.
           Corrected initial graphic window size detect to include full screen.
           Major changes to harmonic constants data provided:
           Because of UKHO copyright violation notice, harmonic constant data
               will no longer be provided for England, Ireland or Scotland.
             Changed to 2001-09-21 XTide hamonic data set with 173 constituents
               which replaces previous Admiralty, Japan, Quebec and Alaska data.
           Added harmonic.msc with a few world-wide reference stations.
           Corrections to Tide2idx station index builder and control file.
           Found Tide24 subreg.40 and 42 are identical so deleted 40 from index.
           Added FAQ section to help file.
           Corrected a subordinate to reference station bug in Loclib.c.
           Removed code for Java since web applet is no longer available.

Ver 2.6    Fixed tiny graphics print in Win95! Finally!!!!!!!
2000/01/20 Added Japanese harmonics data set from XTide site to index file.
           Added active links to help file.

Ver 2.5    Corrected a bug in calendar output that caused missing final tides
1999/09/16      for all days of some weeks.
           Corrected wrong moon phase occasionally showing in text tide output.
           Corrected "Missing Year" error with HARMONIC.CAN data set.
           Change to skip interactive station selection if -textfile and
                -nowarn are set.
           Changed help file format to use a Word 97 help assistant.
           Changed program icon to remove unneeded image versions.
           Submitted program to http://www.simtel.net/simtel.net

Ver 2.4    Corrected hairy mode occasionally showing previous, not next tides.
1998/09/10 Added incremental text tide output with increment in minutes
                specified on Preferences menu. Uses "NumDays" for duration.
           Added "-incremental [minutes]" command line switch for above.
           Full program ZIP file now has a small Setup.exe for auto-install.
           Changed default WXTide32.cfg file to set better default options.
           Corrected pop-up always using left justify and added border to box.
           Corrected graph mode time jump with -now and time scroll bar.
           Added auto time increments based on stretch factor.
           Height units are now removed when -skinny is active.
           Added minimize and maximize controls to Text Tide window.
           Added font selection to Color Menu for main and text window fonts.
           Added "Loading station index..." busy box.
           Added Location menu logic so that when a Region, Country, or State
                is selected, incompatible entries in the other 2 will disable.
           Corrected many timezones not showing correct DST (I hope).
           Changed Print graph to maintain graph window aspect ratio and added
                a title line with the date printed and the station name.
           Changed Text tides window to not wrap text and added scroll bar.

Ver 2.3    Corrected location map not centering on clicked point.
1998/08/12 Changed -location param to allow optional type code for exact match.
           Location map on/off is now saved in configuration file.
           New "-textfile filename" commandline switch to redirect text window
                contents to disk file.  Include -nowarn to inhibit message box.
           Moved Quebec (Canada) harmonic data set to top of index file since
                a knowledgeable source reports that data is much more accurate.
           Changed Tide2idx.exe to omit subordinate stations on the St.
                Lawrence River for same reason as above.
           Changed Lele Harbor, Kusale Isl, from Carolina Isls to Micronesia.
           Added Canadian harmonics data set from XTide site to index file.
                Still unsorted for Region:State and defaults to Canada for now.
           Changed tide calendar format to enhance readability and added moon
                phase change codes at the dates they occur.

Ver 2.2    Corrected -gstretch option save.
1998/06/20 Converted source to compile using the freeware LCC compiler system.
           Minor clean-up to source.
           Updated Harmonic data file to 1998/06/01 from the XTide site.
           Updated Quebec harmonic data set to 1998-05-18 version.
           Corrected moon phase not showing on first day of daily tides.
           Added time ScrollBar to Graph mode with an option under Preferences.
           Changed Graph mode to use rise/fall colors to look more like "Hairy".
           Added remote time zone switch since LCC compiler handles TZ's better.

Ver 2.1    Added moonrise/set times to pop-up menu and (optional) Daily Tides.
1998/03/27 Added "Show sun/moon data in Daily Tides" option to Preferences menu.
           Renamed "List Tides" to "Daily Tides".
           Corrected auto-conversions not always changing before restart.
           Corrected conversion of level offsets from feet to meters not being
                applied when reference station data was in meters.
           Corrected an extra tide being appended to last day on Daily Tides.
           Put "Print Graph" back in due to popular demand.
           Corrected "Print Graph" double image problem.
           More corrections to mark level processing for subordinate stations.
           Added mark crossing time ticks to Hairy mode display.
           Enhanced Drag-and-Drop file name expansion.
           Added Revision history to help file.

Ver 2.0    Corrected tide prediction mark processing for subordinate stations.
1998/03/18 Cleaned up hairy display of currents so background paints correctly.
           Removed List Switches menu item since they are now in on-line help.
           Added line graphs switch (-nofill) to Preferences menu.
           Added conversion of special characters.
           Corrected manual entry of Lat/Lon on Location menu.
           Corrected Tide2Idx making wrong substation Lat/Lon occasionally.
           Corrected and added several index reference station assignments.
           Added auto-correction of many bad subordinate timezones and Lat/Lon.
           Many changes to Indexer. Region/Country/State parsing much better.
           Updated help file.
           Separated level multipliers and offsets so BOTH can now be defined.
           Added an alternate form to -hloff and -lloff tide level switches:
                -lloff [*|x]multiplier [-]offset (either or both, in any order)
           Index now includes 361 new subordinate stations with both level
                multipliers and offsets that previously could not be used.
           NOTE: !!!Index file format has changed!!!  Version 2.0 will not work
                with index files from previous versions.

Ver 1.3    Made Save menu option grey out when no changes have been made.
1998/03/10 Added online-help (I hope it was worth all that typing).
           Added Quebec data set.
           Full program now auto-installs and makes start folder icons.
           Corrected Print Text Tides menu entry occasionally not un-graying.
           Cleaned up message boxes.
           Location menu now remembers if map was active last time.

Ver 1.2.1  Corrected sun rise/set picking up wrong day occasionally.
1998/02/26 Corrected "changed parameters" detection so that prompt to save
                parameters is smarter.
           Corrected custom station offsets not saving when high and low
                offsets (time or level or multiplier) were identical.
           Removed "Save windows with configuration" switch since that was only
                for testing and was not supposed to be in the released version.
           Revamped Prefrences menu (again) to fit on 640x480 displays.
           Added ability to have config file as first command line parameter
                with extra switches.  Previously, if a config file name was
                passed as the first parameter, then no additional switches
                could be specified.
           Added -numdays switch (Preferences menu).

Ver 1.2    Added "Print Text Tides" to main menu. (Finally!)
1998/02/20 Added Configuration Load, Save and Save As to main menu. Now you can
                easily save different configurations and custom station data
                using long descriptive file names.
           Added Custom Station Setup to main menu. (Finally!)
           Added additional file handling logic for drag-and-drop. Just drag a
                configuration file onto a WXTide32 desktop icon and it will
                start with the options in that configuration file.
           Changed name of Flags to Preferences.
           Reorganized Preferences and added:
                -units    - Conversion of units to feet or meters.
                -autokt   - Auto conversion of knots^2 to knots. (Finally!)
                -gstretch - was only a command line switch, now interactive.
                -autosave - Enables changes to options to be automatically saved
                       to the configuration file on exit. Otherwise, you will
                       be prompted to save when exiting after changes.
                -windows  - Save window positions too when saving configuration.
                -moon     - Show moon phases on graphics screens.
           Added -WinDim???? switches for window position save/restore.
           Cleaned up more focus problems.
           Disabled OFFSETSTEXTONLY abort.
           Added logic such that if a station name entered by the -location
                switch is not present, the program will start up with the
                location dialog to allow you to pick one from the list.
           Separated Background color into Day and Night backgrounds to give a
                more visual indication of day boundaries.
           Slight format changes to text tides and calendar output.
           Added pop-up information block when either button is clicked inside
                the main graphics screen showing time, date, and level under
                the pointer and astronomical (sun/moon) data.
           Corrected "Start date.." to begin at midnight on date selected.

(Ver 1.1)  Started using version numbers. Current version is 1.1
1998/02/10 Fixed "-units" switch.
           Made "-location" name on command line case insensitive. Also made any
                trailing (T), (C) or (t) find the nearest match.
           Removed "Print" from the main menu since it doesn't work well (yet).
           Corrected day-of-week display for sub stations on text tides output.
           Added feet/meters selection and conversion to Flags menu.
           Added "List switches" to main menu for a handy quick reference.
           Added "-custname" switch so custom locations can be named.
                NOTE: only has an effect if custom station offsets are active.
           Added Help->About pulldown menu to get the current version.
           Cleaned up several window focus problems.
           Changed copyright assignee to my name (oops).
           Included newest 1997/02/08 data files from XTide.
           Reduced default "-graph" mode width to 640 (was 960).
           Corrected error where changing from current station to tidal station
                did not change to levels from currents.
           Fixed Text Tide output so that current text output shows slack water
                in all modes, not just hairy mode.
           Added hourglass cursor while loading data files.
           Added invalid switch error message output on start-up.
           Made the Baltimore reference station ..(Fort McHenry), Maryland.

1997/12/10 Added Tide2IDX.exe to WXT2Idx.zip (oops)
           Updated included XTide Harmonic constants file to newer Nov 27, 1997
           Updated Tide2IDX.ctl file for new spelling of Vlissingen, Neth.

1997/12/09 Change to allow user time/level offsets on start-up. (See entry 5 in
           "Differences from XTide" above)
           Changed name of indexer zip to WXTIdxer.zip

1997/11/23 Corrected "-hinc" operation from Flags menu.
           Added WXTide32 to our home page.

1997/11/19 Some cleanup on this readme file.
           * * * Included all the subordinate station data. * * *
           Displayed hourglass cursor while updating station list.
           Corrected graph mode and text tide output starting time errors.
           Corrected subordinate station output for tide change times.
           Corrected reversed sign of subordinate station timezone.
           Lots of cleanup/speedup/corrections to Tide2IDX and Tide2IDX.ctl.
           Added text tide starting date option to Flags menu.
           Added "-skinny", "-thin", and "-24" options to Flags menu.

1997/11/11 Initial release of WXTide32


Last but not least
~~~~~~~~~~~~~~~~~~
Programs compiled using the free LCC-Win32 C development system.
All editing done with AmCyber's Multi-Edit.

Enjoy!
Mike Hopper