Hi folks,

   Just got my beta UCAC-2 disks today,  and have confirmed that my
C/C++ source code to access them (written while waiting for them to
arrive) works properly.  It's now posted at

http://www.projectpluto.com/ucac2.zip     (about 27 KBytes)

   'ucac2.h' and 'ucac2.cpp' show how one can process UCAC-2 binary
data from C.  The code will work in Linux and DOS/Windows.  I've added
in byte-reordering code that ought to let it work on "wrong-Endian"
platforms, but I don't have one handy with which to test the matter.

   As best I can tell,  this code has no particular advantages (or
disadvantages) relative to the FORTRAN source,  so your choice should
reflect only your prejudices in programming languages.

   Compiled as

cl -W4 -Ox ucac2.cpp                (Microsoft C/C++,  DOS/Windows)
wcl386 -W4 -Ox ucac2.cpp            (Watcom C/C++,  DOS/Windows)
g++ -o ucac2 -DUNIX ucac2.cpp       (GNU C/C++,  Linux)

   you'll get a program that can be run as

ucac2 <ra> <dec> <width> <height>

   with all arguments in decimal degrees.  UCAC-2 data will be extracted
and written to a text file,  'ucac2.txt'.  Optionally,  one can add a path:

ucac2 <ra> <dec> <width> <height> <path>

   to have the data read from another directory or from CD.  For example,
if your CD-ROM is drive d:,  you might put the CD in the drive and run

ucac2 45 -12 1.3 1.8 d:\u2

   to extract a 1.3-degree wide,  1.8-degree high field around RA=3h00m00s
(a.k.a. 45 degrees),  declination -12.  As you might expect,  you need to
be sure to have the correct CD in the drive:  disk 1 for declinations
-90 to -37,  disk 2 for declinations -37 to +1,  or disk 3 for areas
north of declination +1.  (Or you can copy one,  two,  or three disks
to a directory on a hard drive,  and then reference that directory on
the command line.  In this case,  be sure that the index '*.da' file(s)
are also copied to that directory.)

   The DOS executable is provided.  If the UCAC-2 Bright Star Supplement
files are included in the data directory,  then data for those stars
will also be extracted.

   The code will be untroubled by changes in the number of stars in
the final version,  but (unsurprisingly!) will have to be revised if
the format changes in that version.

   Hope this is useful to you,  or at least interesting.  Please let me
know if you've problems or thoughts.

-- Bill
