WXTide32 installation notes,  Version 2000/01/20
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    WXTide32 Copyright (C) 1998  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: MikeHopper@usa.net
    If you have received this program by means other than downloading, the
    newest version with full C source code should be available at:
    http://www.geocities.com/SiliconValley/Horizon/1195/wxtide32.html
    or ftp://sundae.triumf.ca/pub/peter/index.html#nav
    This FTP site is also mirrored in Europe which might be easier for some
    users. I intend to make WXTide32 an ongoing project so check back often!

    This program 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
    (at your option) 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, write to the 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

    This Windows 95/Windows NT program is based on the UNIX XTide program
    version 1.6.2 written by David Flater.  The newest harmonics files and
    the orignal source for the XTide program should be available at:
    http://www.universe.digex.net/~dave/
    Note that if a new harmonics file is downloaded, the Tide2IDX program MUST
    be run to incorporate those changes into the index. Since the original
    XTide program has been pretty well mangled to work in this port to the
    windows environment, please don't blame Dave Flater for any errors you may
    find, but e-mail me instead at: MikeHopper@usa.net.

    Many thanks to Hans Pieper who wrote 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 same web site where WXTide32 is located and is called
    "Tide24.zip".

    NOTE: WXTide32 is only available in a 32 bit version.  Although I don't
    think I used anything that wouldn't compile for 16 bit Windows 3.x, the
    size of the intermediate arrays used by the station index would be
    prohibitive in the 16 bit environment.  So please don't ask!


Files included in WXTide32.zip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
readme.txt   This file
gpl          General Public License (please read, IT IS IMPORTANT)
WXTide32.exe Win95/NT 32 bit executable
WXTide32.cfg Configuration file for WXTide32
wintide.hlp  On-line help file (see below)
wintide.cnt  Help file index
harmonic     XTide harmonic constants file version June 1, 1998
harmonic.anc XTide harmonic constants (Anchorage, Alaska) version Sept 11, 1997
harmonic.adm XTide harmonic constants (Admiralty) version July 31, 1997
harmonic.can XTide harmonic constants (Canada) version November 27, 1997
harmonic.qbc XTide harmonic constants (Quebec) version August 9, 1998
harmonic.idx Station index for harmonic constants file
WXTidSrc.zip Source files for WXTide32
WXTidxer.zip Source and executable for the Tide2IDX station index program.


General installation notes
~~~~~~~~~~~~~~~~~~~~~~~~~~
All files, excluding the two source zip files, should be unzipped into a clean
directory. You can use pkunzip, WinZip or any other program for this purpose.

Once the files have been unzipped, make a shortcut to WXTide32 by dragging
"WXTide32.exe" to the desktop. If nasty error messages appear when the program
is run the first time, make sure that the "working directory" entry in the
shortcut properties shortcut tab points to the directory in which the program
resides. This is the default and should not be a problem.

In breaking with the Win95 tradition (and since the author has not gotten
around to dealing with it yet) WXTide32 does NOT use the registry or keep or
change any files outside of it's home directory.  On startup, the command line
and the file WXTide32.cfg are read for any configuration options (see below).

Starting with version 1.3, the full version, called WXTide##.EXE, comes in a
self-installing executable that copies the files to C:\Program Files\WXTide32
and generates a program startup group named "WXTide32".
In case of difficulty, you can still unzip the files using WinZip or PKUNZIP.


Program startup options
~~~~~~~~~~~~~~~~~~~~~~~
Any program options can be specified on the command line for WXTide32 and can
be changed by right clicking the program shortcut, selecting "properties" then
"shortcut". Also, the file WXTide32.cfg is read for any additional
configuration switches WXTide32 needs for program start-up.  Command line
options override WXTide32.cfg options so you can make several program
shortcuts, each for a different station. Starting with version 1.2, all options
and window locations can now be automatically saved on program exit or on
demand.  The file these options are saved to can be the default WXTide32.cfg or
any other file by using "Save As" from the main menu.


Help files
~~~~~~~~~~
Starting with version 1.3, on-line help has been added and can be accessed
from the help button or menu from any page or by pressing F1.  You can also
read help about the original XTide program from the "readme" (with no file
extension) file.


Text output and printing
~~~~~~~~~~~~~~~~~~~~~~~~
All text output from WXTide32 appears in a sizeable, scrollable text window.
Starting with verison 1.2, any text in the Text Tides window can be printed
directly from the main program menu by selecting "Print Text Tides"


Long file names
~~~~~~~~~~~~~~~
While WXTide32 runs under Windows 95 and Windows NT 4.0 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).


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 since 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.  Quasi-instructions are included in
WXT2idx.zip. To generate a new index with subordinate stations, you must
download and unzip the Tide24 program from the web site stated earlier in this
file.  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 in
WXT2Idx.zip builds an index including all the "substa" files but you will have
to change the search path in makeidx.bat to point to those files for it to work
properly.


Source files
~~~~~~~~~~~~
The file WXTidSrc.zip has all the source code for the program, less indexer.
Some of the files are direct copies of the XTide source or have only minor
changes to support the station index and the windows port.  The file WXTide.c
file however only resembles XTide.c as a close but long lost relation.  I have
tried to add comments in the title blocks of each file changed that should show
where I've had my grubby fingers in the source.  The file LocLib.c is solely of
my (arguably warped) creation and any errors found should not be blamed on Dave
Flater.
The WXT2Idx.zip file has the Tide2IDX.exe index builder DOS executable,
Tide2IDX.c program source, Tide2IDX.ctl, the control file used for station
region/country/state parsing, and makeidx.bat which is the batch file I use to
generate a new index.  For makeidx.bat to work properly, you will have to
change the "subreg" path to that which to you unzipped the Tide 2.4 files.


Major differences from XTide version 1.6.2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. The -ppm and -gif (and therefore -geometry) modes are NOT implemented.
2. The -text tides command has been changed in two ways:  The [N] parameter now
selects number of DAYS, not TIDES to output.  Also, the text tides output is
now separated on day boundaries with a line showing the day of week, date, and
phase of the moon.  For those of you who are purists, I'm sorry about that but
that's the way I wanted to see it.
3. Of course the entire station selection stuff is new.
4. I haven't been able to get remote time zones to work in the Windows
environment.  For accurate tide times outside of your local time zone, please
use the -UTC switch and convert until I can get something else working.


Custom stations
~~~~~~~~~~~~~~~
Starting with version 1.2, selecting "Custom Station Setup" from the main menu
will bring up a dialog that lets you easily set and/or change all the values
associated with custom subordinate stations.  You must select the reference
station you will be using from the Location menu before entering the Custom
Station Setup dialog. Once that is done, fill in the blanks to describe the
station. The switches describing the new station can be saved to a configuration
file of your choice.
Note: When in the Location menu, clicking OK to select ANY station from the
station list will void the custom station entry parameters and revert WXTide32
to the values for the new station selected.


Pending enhancements
~~~~~~~~~~~~~~~~~~~~
1. Continuing to fine-tune region/country/state parsing.
2. Sorting of the Canadian data set into proper Region:Country:State
3. Correcting graph printing actual size, not full page.

Any other recommendations?


Revision History
~~~~~~~~~~~~~~~~
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 Watcom C version 11.0
All editing done with AmCyber's Multi-Edit

Enjoy!
Mike Hopper