SUN/267.3

Starlink Project
Starlink User Note 267.3

Tim Jenness

2015 January 1

Copyright © 2012 Science and Technology Facilities Council.
Copyright © 2014 Cornell University.
Copyright © 2015 Tim Jenness


PAL — Positional Astronomy Library

0.9.0

Programmer’s Manual



Abstract

PAL provides a subset of the Fortran SLALIB library but written in C using the SLALIB C API. Where possible the PAL routines are implemented using the C SOFA/ERFA library. It is provided with a GPLv3 license.

Contents

1 Introduction
2 Citing PAL
A Function Descriptions
 A.1 SOFA Mappings
palAddet – Add the E-terms to a pre IAU 1976 mean place
palAirmas – Air mass at given zenith distance
palAltaz – Positions, velocities and accelerations for an altazimuth telescope mount
palAmp – Convert star RA,Dec from geocentric apparaent to mean place
palAmpqk – Convert star RA,Dec from geocentric apparent to mean place
palAop – Apparent to observed place
palAoppa – Precompute apparent to observed place parameters
palAoppat – Recompute sidereal time to support apparent to observed place
palAopqk – Quick apparent to observed place
palAtmdsp – Apply atmospheric-dispersion adjustments to refraction coefficients
palCaldj – Gregorian Calendar to Modified Julian Date
palDafin – Sexagesimal character string to angle
palDcmpf – Decompose an [x,y] linear fit into its constituent parameters: zero points, scales, nonperpendicularity and orientation
palDe2h – Equatorial to horizon coordinates: HA,Dec to Az,E
palDeuler – Form a rotation matrix from the Euler angles
palDfltin – Convert free-format input into double precision floating point
palDh2e – Horizon to equatorial coordinates: Az,El to HA,Dec
palDjcal – Modified Julian Date to Gregorian Calendar
palDmat – Matrix inversion & solution of simultaneous equations
palDs2tp – Spherical to tangent plane projection
palDat – Return offset between UTC and TAI
palDmoon – Approximate geocentric position and velocity of the Moon
palDrange – Normalize angle into range +/- pi
palDt – Estimate the offset between dynamical time and UT
palDtp2s – Tangent plane to spherical coordinates
palDtps2c – Determine RA,Dec of tangent point from coordinates
palDtt – Return offset between UTC and TT
palEcleq – Transform from ecliptic coordinates to J2000.0 equatorial coordinates
palEcmat – Form the equatorial to ecliptic rotation matrix - IAU 2006 precession model
palEl2ue – Transform conventional elements into " universal" form
palEpco – Convert an epoch into the appropriate form - B or J
palEpv – Earth position and velocity with respect to the BCRS
palEtrms – Compute the E-terms vector
palEqecl – Transform from J2000.0 equatorial coordinates to ecliptic coordinates
palEqgal – Convert from J2000.0 equatorial coordinates to Galactic
palEvp – Returns the barycentric and heliocentric velocity and position of the Earth
palFitxy – Fit a linear model to relate two sets of [x,y] coordinates
palFk45z – Convert B1950.0 FK4 star data to J2000.0 FK5 assuming zero proper motion in the FK5 frame
palFk524 – Convert J2000.0 FK5 star data to B1950.0 FK4
palFk54z – Convert a J2000.0 FK5 star position to B1950.0 FK4 assuming zero proper motion and parallax
palGaleq – Convert from galactic to J2000.0 equatorial coordinates
palGalsup – Convert from galactic to supergalactic coordinates
palGe50 – Transform Galactic Coordinate to B1950 FK4
palGeoc – Convert geodetic position to geocentric
palIntin – Convert free-format input into an integer
palInvf – Invert a linear model of the type produced by the palFitxy routine
palMap – Convert star RA,Dec from mean place to geocentric apparent
palMappa – Compute parameters needed by palAmpqk and palMapqk
palMapqk – Quick mean to apparent place
palMapqkz – Quick mean to apparent place (no proper motion or parallax)
palNut – Form the matrix of nutation
palNutc – Calculate nutation longitude & obliquoty components
palOap – Observed to apparent place
palOapqk – Quick observed to apparent place
palObs – Parameters of selected ground-based observing stations
palPa – HA, Dec to Parallactic Angle
palPcd – Apply pincushion/barrel distortion to a tangent-plane [x,y]
palPertel – Update elements by applying planetary perturbations
palPertue – Update the universal elements by applying planetary perturbations
palPlanel – Transform conventional elements into position and velocity
palPlanet – Approximate heliocentric position and velocity of major planet
palPlante – Topocentric RA,Dec of a Solar-System object from heliocentric orbital elements
palPlantu – Topocentric RA,Dec of a Solar-System object from universal elements
palPm – Apply corrections for proper motion a star RA,Dec
palPolmo – Correct for polar motion
palPrebn – Generate the matrix of precession between two objects (old)
palPrec – Form the matrix of precession between two epochs (IAU 2006)
palPreces – Precession - either FK4 or FK5 as required
palPrenut – Form the matrix of bias-precession-nutation (IAU 2006/2000A)
palPv2el – Position velocity to heliocentirc osculating elements
palPv2ue – Universal elements to position and velocity
palPvobs – Position and velocity of an observing station
palPxy – Given arrays of " expected" and " measured" [x,y] coordinates, and a linear model relating them (as produced by palFitxy), compute the array of " predicted" coordinates and the RMS residuals
palRanorm – Reduce angle to be within [0, 2pi) (single precision)
palRdplan – Approximate topocentric apparent RA,Dec of a planet
palRefco – Determine constants in atmospheric refraction model
palRefro – Atmospheric refraction for radio and optical/IR wavelengths
palRefv – Adjust an unrefracted Cartesian vector to include the effect of atmospheric refraction
palRefz – Adjust unrefracted zenith distance
palRverot – Velocity component in a given direction due to Earth rotation
palRvgalc – Velocity component in a given direction due to the rotation of the Galaxy
palRvlg – Velocity component in a given direction due to Galactic rotation and motion of the local group
palRvlsrd – Velocity component in a given direction due to the Sun s motion with respect to the dynamical Local Standard of Rest
palRvlsrk – Velocity component in a given direction due to the Sun s motion with respect to an adopted kinematic Local Standard of Rest
palSubet – Remove the E-terms from a pre IAU 1976 catalogue RA,Dec
palSupgal – Convert from supergalactic to galactic coordinates
palUe2el – Universal elements to heliocentric osculating elements
palUe2pv – Heliocentric position and velocity of a planet, asteroid or comet, from universal elements
palUnpcd – Remove pincushion/barrel distortion
palVers – Obtain PAL version number
palXy2xy – Transform one [x,y] into another using a linear model of the type produced by the palFitxy routine
palCldj – Gregorian Calendar to Modified Julian Date
palDbear – Bearing (position angle) of one point on a sphere relative to another
palDaf2r – Convert degrees, arcminutes, arcseconds to radians
palDav2m – Form the rotation matrix corresponding to a given axial vector
palDcc2s – Cartesian to spherical coordinates
palDcs2c – Spherical coordinates to direction cosines
palDd2tf – Convert an interval in days into hours, minutes, seconds
palDimxv – Perform the 3-D backward unitary transformation
palDm2av – From a rotation matrix, determine the corresponding axial vector
palDjcl – Modified Julian Date to Gregorian year, month, day and fraction of day
palDmxm – Product of two 3x3 matrices
palDmxv – Performs the 3-D forward unitary transformation
palDpav – Position angle of one celestial direction with respect to another
palDr2af – Convert an angle in radians to degrees, arcminutes, arcseconds
palDr2tf – Convert an angle in radians to hours, minutes, seconds
palDranrm – Normalize angle into range 0-2 pi
palDsep – Angle between two points on a sphere
palDsepv – Angle between two vectors
palDtf2d – Convert hours, minutes, seconds to days
palDtf2r – Convert hours, minutes, seconds to radians
palDvdv – Scalar product of two 3-vectors
palDvn – Normalizes a 3-vector also giving the modulus
palDvxv – Vector product of two 3-vectors
palEpb – Conversion of modified Julian Data to Besselian Epoch
palEpb2d – Conversion of Besselian Epoch to Modified Julian Date
palEpj – Conversion of Modified Julian Date to Julian Epoch
palEpj2d – Conversion of Julian Epoch to Modified Julian Date
palEqeqx – Equation of the equinoxes (IAU 2000/2006)
palFk5hz – Transform an FK5 (J2000) star position into the frame of the Hipparcos catalogue
palGmst – Greenwich mean sidereal time (consistent with IAU 2006 precession)
palGmsta – Greenwich mean sidereal time (consistent with IAU 2006 precession)
palHfk5z – Hipparcos star position to FK5 J2000
palRefcoq – Determine the constants A and B in the atmospheric refraction model