You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This is a subset of Pat Wallace's SLALIB positional astronomy library used to convert from equatorial to horizontal/spherical coordinates. It is the state-of-the art in conversion routines as it includes precession and nutation and is used as a standard by astronomers. The main routine to use is slaconv.m which uses 24 MATLAB converted SLALIB functions (from Fortran). Also the main routine for tracking planets, the sun and the moon is rdplan.m.
Usage:
% [TH, PH] = slaconv(slatn, slonge, raref, decref, date, time)
% Accurate conversion from equatorial coordinates (RA, DEC) to Spherical
% (TH,PH) coordinates. The code uses 24 functions from the SLALIB Fortran
% library converted to MATLAB functions.
% INPUTS:
% slatn = latitude (decimal degrees)
% slonge = longitude (decimal degrees)
% raref = RA(J2000) (decimal hours)
% decref = Dec(J2000) (decimal degrees)
% date = vector date [iyear, imonth, iday]
% time = vector time [ihour imin isec]
% OUTPUTS:
% [TH, PH] = Theta and Phi angles (degrees)
%
% e.g. [TH, PH] = slaconv(-31.5, 21, 3.5, -37.5, [2018 09 12], [01 00 00]);
% gives TH = 21.9141 deg, PH = 112.7587 deg
%
% Written/converted by Dr. N. Razavi-Ghods (University of Cambridge)
% version 1.0 (11/01/2013)
Cite As
Nima Razavi-Ghods (2026). Positional Astronomy Library in MATLAB (partial SLALIB library) (https://www.mathworks.com/matlabcentral/fileexchange/39874-positional-astronomy-library-in-matlab-partial-slalib-library), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (51.5 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
