Astro::SLA -- interface to C or Fortran SLALIB library
==========

This module provides an interface layer to the C or Fortran version of
the SLALIB library.  From the abstract of the SLALIB manual (written
by Pat Wallace):

   "SLALIB is a library used by writers of positional-astronomy
   applications. Most of the 171 routines are concerned with
   astronomical position and time, but a number have wider
   trigonometrical, numerical or general applications."

An example program, stime, is provided. This simply reports the
current time (modified Julian day and local sidereal time for the JCMT).

Requirements:
-------------

This module requires either the C or Fortran version of the SLALIB
library written by Pat Wallace. 

This module has been tested with the Starlink Fortran library v2.4-8
(released September 2001) and v2.4-11 (spring 2003), and the April
2002 and 2003 releases of the C library. If you are working with
orbital elements you need a version of the library released sometime
in 2002.

You must have either the C version of the library or the Starlink
Fortran version of the library in order to build this module.

The Fortran version of SLALIB is available from Starlink under the
Starlink Software Licence (effectively meaning free for non-commercial
use). You can download it from Starlink (http://www.starlink.rl.ac.uk)
using the Starlink Software Store
(http://www.starlink.rl.ac.uk/Software/software_store.htm).
Specifically: http://www.starlink.rl.ac.uk/cgi-store/storeform1?SLA
Starlink have approved the release of this library using a GPL licence
but the package has not yet been made available.

Please contact Pat Wallace (ptw@tpsoft.demon.co.uk) for details of how
to obtain the (proprietary) C SLALIB library.

A C compiler is required - this is an XS module. A Fortran compiler (such
as g77) is required if you are building against the Fortran library [or
at least the Fortran runtime libraries].

Platforms:
----------

   This module has been tested on the following platforms:

   - Sparc Solaris 8, Sun Compiler 6, perl 5.005_03
   - Sparc Solaris 8, Sun Compiler 6, perl 5.6.1
   - RedHat Linux 7.3, gcc2.96, perl5.8.0
   - RedHat Linux 7.3, gcc2.96, perl5.6.1
   - RedHat Linux 9, gcc 3, perl 5.8.1

Installation:
-------------

 - Edit the Makefile.PL so that the location of the SLA
   library and include files are correct. [see variables $sla_lib and
   $sla_inc]. By default the module attempts to find the Starlink
   installation and then falls back to assuming the C version is 
   installed. Change the value of $use_fortran if you know you are
   using an explicit C or Fortran version.
 
   It is assumed the C library is available from /usr/local/lib by default.

   The includes files, slalib.h, should be available
   in the default path. If they are somewhere else the Makefile.PL 
   should be edited to reflect this location. For example,
   change the line
 
     my $sla_inc => '',

   to

     my $sla_inc => '-I/home/me/include',

   to pick them up from /home/me/include

Then:

  % perl Makefile.PL
  % make
  % make test
  % make install

The tests only test part of the build. Some functions remain untested.
In particular orbital element support will not be very good unless you
have a modern installation of SLALIB (sometime from 2002).

See Astro::Coords for a general object-oriented wrapper around Astro::SLA.

Documentation:
--------------

The module provides documentation on how to use the perl interface
to SLALIB. It does not contain information on how to use
SLALIB itself. For more information on SLALIB see:

  http://star-www.rl.ac.uk/star/docs/sun67.htx/sun67.html


Copyright
---------

This module is copyright (C) 1998-2003 Tim Jenness and 
the UK Particle Physics and Astronomy Research Council.  All rights
reserved.  This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. 

The SLALIB library (C version) is proprietary.  Please contact Patrick
Wallace (ptw@tpsoft.demon.co.uk) if you would like to obtain a copy.

The Starlink SLALIB library (Fortran) is available from Starlink,
currently under the Starlink Software licence for non-commercial use.

The array handling code was written by Karl Glazebrook.


Changes
-------

See the ChangeLog file for a full list of changes.

Changes for release 0.97:

  - Addition of a test for cometary ephemerides

  - A fix to the slaOap function when using the Fortran bindings

  - Fix for building with a thread-enabled perl, although slalib
    is not proven to be thread safe.

Changes for release 0.96:

  - Now includes Fortran support

  - Add slaPertel and slaPertue

  - Fix slaOap

Changes for release 0.95:

  - Fix bug in slaPlante (it simply didn't work)

Changes for release 0.94:

  - Fix bug in slaPreces and add new test for it.

Changes for release (0.93):

  - New utility 'stime' for printing the current time, MJD and LST

  - Add ut2lst_tel command (this was in the docs but not present)

  - Fix bug in slaEg50 (thanks to Chris Phillips)

  - Fix segmentation violation in certain uses of the slaObs
    command on linux.

  - Should now compile cleanly on perl 5.6.0 (now uses PL_na symbols
    in XS layer)

  - slightly improved test suite.

Changes for release 0.92:

  - Export all single precision aliases

  - Export slaDvxv

  - Fix compiler warnings (thanks to Chris Phillips <phillips@jive.nfra.nl>
    for a patch).

Changes for release 0.91:

  - Add DR2S, DR2H and slaEcleq to the export list. 

  - Fix argument order of slaEqgal and slaSupgal
        [patch supplied by Tim Kimball (kimball@stsci.edu)]
 
  - Allow use of single precision names as aliases to double precision 
    commands.
