SUN/67.70

Starlink Project
Starlink User Note 67.70

P. T. Wallace

19 December 2005


SLALIB — Positional Astronomy Library

2.5-3

Programmer’s Manual



Abstract

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

Contents

1 INTRODUCTION
 1.1 Purpose
 1.2 Example Application
 1.3 Scope
 1.4 Objectives
 1.5 Fortran Version
 1.6 C Version
 1.7 Future Versions
 1.8 New Functions
 1.9 Acknowledgements
2 LINKING
3 SUBPROGRAM SPECIFICATIONS
  SLA_ADDET—Add E-terms of Aberration
  SLA_AFIN—Sexagesimal character string to angle
  SLA_AIRMAS—Air Mass
  SLA_ALTAZ—Velocities etc. for Altazimuth Mount
  SLA_AMP—Apparent to Mean
  SLA_AMPQK—Quick Apparent to Mean
  SLA_AOP—Apparent to Observed
  SLA_AOPPA—Appt-to-Obs Parameters
  SLA_AOPPAT—Update Appt-to-Obs Parameters
  SLA_AOPQK—Quick Appt-to-Observed
  SLA_ATMDSP—Atmospheric Dispersion
  SLA_AV2M—Rotation Matrix from Axial Vector
  SLA_BEAR—Direction Between Points on a Sphere
  SLA_CAF2R—Deg,Arcmin,Arcsec to Radians
  SLA_CALDJ—Calendar Date to MJD
  SLA_CALYD—Calendar to Year, Day
  SLA_CC2S—Cartesian to Spherical
  SLA_CC62S—Cartesian 6-Vector to Spherical
  SLA_CD2TF—Days to Hour,Min,Sec
  SLA_CLDJ—Calendar to MJD
  SLA_CLYD—Calendar to Year, Day
  SLA_COMBN—Next Combination
  SLA_CR2AF—Radians to Deg,Arcmin,Arcsec
  SLA_CR2TF—Radians to Hour,Min,Sec
  SLA_CS2C—Spherical to Cartesian
  SLA_CS2C6—Spherical Pos/Vel to Cartesian
  SLA_CTF2D—Hour,Min,Sec to Days
  SLA_CTF2R—Hour,Min,Sec to Radians
  SLA_DAF2R—Deg,Arcmin,Arcsec to Radians
  SLA_DAFIN—Sexagesimal character string to angle
  SLA_DAT—TAIUTC
  SLA_DAV2M—Rotation Matrix from Axial Vector
  SLA_DBEAR—Direction Between Points on a Sphere
  SLA_DBJIN—Decode String to B/J Epoch (DP)
  SLA_DC62S—Cartesian 6-Vector to Spherical
  SLA_DCC2S—Cartesian to Spherical
  SLA_DCMPF—Interpret Linear Fit
  SLA_DCS2C—Spherical to Cartesian
  SLA_DD2TF—Days to Hour,Min,Sec
  SLA_DE2H—h, δ to Az,El
  SLA_DEULER—Euler Angles to Rotation Matrix
  SLA_DFLTIN—Decode a Double Precision Number
  SLA_DH2E—Az,El to h, δ
  SLA_DIMXV—Apply 3D Reverse Rotation
  SLA_DJCAL—MJD to Gregorian for Output
  SLA_DJCL—MJD to Year,Month,Day,Frac
  SLA_DM2AV—Rotation Matrix to Axial Vector
  SLA_DMAT—Solve Simultaneous Equations
  SLA_DMOON—Approx Moon Pos/Vel
  SLA_DMXM—Multiply 3 × 3 Matrices
  SLA_DMXV—Apply 3D Rotation
  SLA_DPAV—Position-Angle Between Two Directions
  SLA_DR2AF—Radians to Deg,Min,Sec,Frac
  SLA_DR2TF—Radians to Hour,Min,Sec,Frac
  SLA_DRANGE—Put Angle into Range ±π
  SLA_DRANRM—Put Angle into Range 0 2π
  SLA_DS2C6—Spherical Pos/Vel to Cartesian
  SLA_DS2TP—Spherical to Tangent Plane
  SLA_DSEP—Angle Between 2 Points on Sphere
  SLA_DSEPV—Angle Between 2 Vectors
  SLA_DT—Approximate ET minus UT
  SLA_DTF2D—Hour,Min,Sec to Days
  SLA_DTF2R—Hour,Min,Sec to Radians
  SLA_DTP2S—Tangent Plane to Spherical
  SLA_DTP2V—Tangent Plane to Direction Cosines
  SLA_DTPS2C—Plate centre from ξ, η and α, δ
  SLA_DTPV2C—Plate centre from ξ, η and x, y, z
  SLA_DTT—TT minus UTC
  SLA_DV2TP—Direction Cosines to Tangent Plane
  SLA_DVDV—Scalar Product
  SLA_DVN—Normalize Vector
  SLA_DVXV—Vector Product
  SLA_E2H—h, δ to Az,El
  SLA_EARTH—Approx Earth Pos/Vel
  SLA_ECLEQ—Ecliptic to Equatorial
  SLA_ECMAT—Form α, δ λ, β Matrix
  SLA_ECOR—RV & Time Corrns to Sun
  SLA_EG50—B1950 α, δ to Galactic
  SLA_EL2UE—Conventional to Universal Elements
  SLA_EPB—MJD to Besselian Epoch
  SLA_EPB2D—Besselian Epoch to MJD
  SLA_EPCO—Convert Epoch to B or J
  SLA_EPJ—MJD to Julian Epoch
  SLA_EPJ2D—Julian Epoch to MJD
  SLA_EPV—Earth Position & Velocity (high accuracy)
  SLA_EQECL—J2000 α, δ to Ecliptic
  SLA_EQEQX—Equation of the Equinoxes
  SLA_EQGAL—J2000 α, δ to Galactic
  SLA_ETRMS—E-terms of Aberration
  SLA_EULER—Rotation Matrix from Euler Angles
  SLA_EVP—Earth Position & Velocity
  SLA_FITXY—Fit Linear Model to Two [x, y] Sets
  SLA_FK425—FK4 to FK5
  SLA_FK45Z—FK4 to FK5, no P.M. or Parallax
  SLA_FK524—FK5 to FK4
  SLA_FK52H—FK5 to Hipparcos
  SLA_FK54Z—FK5 to FK4, no P.M. or Parallax
  SLA_FK5HZ—FK5 to Hipparcos, no P.M.
  SLA_FLOTIN—Decode a Real Number
  SLA_GALEQ—Galactic to J2000 α, δ
  SLA_GALSUP—Galactic to Supergalactic
  SLA_GE50—Galactic to B1950 α, δ
  SLA_GEOC—Geodetic to Geocentric
  SLA_GMST—UT to GMST
  SLA_GMSTA—UT to GMST (extra precision)
  SLA_GRESID—Gaussian Residual
  SLA_H2E—Az,El to h, δ
  SLA_H2FK5—Hipparcos to FK5
  SLA_HFK5Z—Hipparcos to FK5, no P.M.
  SLA_IMXV—Apply 3D Reverse Rotation
  SLA_INTIN—Decode an Integer Number
  SLA_INVF—Invert Linear Model
  SLA_KBJ—Select Epoch Prefix
  SLA_M2AV—Rotation Matrix to Axial Vector
  SLA_MAP—Mean to Apparent
  SLA_MAPPA—Mean to Apparent Parameters
  SLA_MAPQK—Quick Mean to Apparent
  SLA_MAPQKZ—Quick Mean-Appt, no PM etc.
  SLA_MOON—Approx Moon Pos/Vel
  SLA_MXM—Multiply 3 × 3 Matrices
  SLA_MXV—Apply 3D Rotation
  SLA_NUT—Nutation Matrix
  SLA_NUTC—Nutation Components
  SLA_NUTC80—Nutation Components, IAU 1980
  SLA_OAP—Observed to Apparent
  SLA_OAPQK—Quick Observed to Apparent
  SLA_OBS—Observatory Parameters
  SLA_PA—h, δ to Parallactic Angle
  SLA_PAV—Position-Angle Between Two Directions
  SLA_PCD—Apply Radial Distortion
  SLA_PDA2H—H.A. for a Given Azimuth
  SLA_PDQ2H—H.A. for a Given P.A.
  SLA_PERMUT—Next Permutation
  SLA_PERTEL—Perturbed Orbital Elements
  SLA_PERTUE—Perturbed Universal Elements
  SLA_PLANEL—Planet Position from Elements
  SLA_PLANET—Planetary Ephemerides
  SLA_PLANTE—[α, δ] of Planet from Elements
  SLA_PLANTU—[α, δ] from Universal Elements
  SLA_PM—Proper Motion
  SLA_POLMO—Polar Motion
  SLA_PREBN—Precession Matrix (FK4)
  SLA_PREC—Precession Matrix (FK5)
  SLA_PRECES—Precession
  SLA_PRECL—Precession Matrix (latest)
  SLA_PRENUT—Precession-Nutation Matrix
  SLA_PV2EL—Orbital Elements from Position/Velocity
  SLA_PV2UE—Position/Velocity to Universal Elements
  SLA_PVOBS—Observatory Position & Velocity
  SLA_PXY—Apply Linear Model
  SLA_RANDOM—Random Number
  SLA_RANGE—Put Angle into Range ±π
  SLA_RANORM—Put Angle into Range 0 2π
  SLA_RCC—Barycentric Coordinate Time
  SLA_RDPLAN—Apparent [α, δ] of Planet
  SLA_REFCO—Refraction Constants
  SLA_REFCOQ—Refraction Constants (fast)
  SLA_REFRO—Refraction
  SLA_REFV—Apply Refraction to Vector
  SLA_REFZ—Apply Refraction to ZD
  SLA_RVEROT—RV Corrn to Earth Centre
  SLA_RVGALC—RV Corrn to Galactic Centre
  SLA_RVLG—RV Corrn to Local Group
  SLA_RVLSRD—RV Corrn to Dynamical LSR
  SLA_RVLSRK—RV Corrn to Kinematical LSR
  SLA_S2TP—Spherical to Tangent Plane
  SLA_SEP—Angle Between 2 Points on Sphere
  SLA_SEPV—Angle Between 2 Vectors
  SLA_SMAT—Solve Simultaneous Equations
  SLA_SUBET—Remove E-terms
  SLA_SUPGAL—Supergalactic to Galactic
  SLA_SVD—Singular Value Decomposition
  SLA_SVDCOV—Covariance Matrix from SVD
  SLA_SVDSOL—Solution Vector from SVD
  SLA_TP2S—Tangent Plane to Spherical
  SLA_TP2V—Tangent Plane to Direction Cosines
  SLA_TPS2C—Plate centre from ξ, η and α, δ
  SLA_TPV2C—Plate centre from ξ, η and x, y, z
  SLA_UE2EL—Universal to Conventional Elements
  SLA_UE2PV—Pos/Vel from Universal Elements
  SLA_UNPCD—Remove Radial Distortion
  SLA_V2TP—Direction Cosines to Tangent Plane
  SLA_VDV—Scalar Product
  SLA_VN—Normalize Vector
  SLA_VXV—Vector Product
  SLA_WAIT—Time Delay
  SLA_XY2XY—Apply Linear Model to an [x, y]
  SLA_ZD—h, δ to Zenith Distance
4 EXPLANATION AND EXAMPLES
 4.1 Spherical Trigonometry
  4.1.1 Formatting angles
 4.2 Vectors and Matrices
  4.2.1 Using vectors
 4.3 Celestial Coordinate Systems
 4.4 Precession and Nutation
  4.4.1 SLALIB support for precession and nutation
 4.5 Mean Places
 4.6 Epoch
 4.7 Proper Motion
 4.8 Parallax and Radial Velocity
 4.9 Aberration
 4.10 Different Sorts of Mean Place
 4.11 Mean Place Transformations
 4.12 Mean Place to Apparent Place
 4.13 Apparent Place to Observed Place
  4.13.1 Refraction
  4.13.2 Efficiency considerations
 4.14 The Hipparcos Catalogue and the ICRS
 4.15 Time Scales
  4.15.1 Atomic Time: TAI
  4.15.2 Universal Time: UT, UTC
  4.15.3 Sidereal Time: GMST, LAST etc.
  4.15.4 Dynamical Time: TT, TDB
 4.16 Calendars
 4.17 Geocentric Coordinates
 4.18 Ephemerides
 4.19 Radial Velocity and Light-Time Corrections
 4.20 Focal-Plane Astrometry
 4.21 Numerical Methods
5 SUMMARY OF CALLS