RA-Dec Alt-Az Conversion Explorer

Converts right ascension (RA) and declination (Dec) to and from altitude (Alt) and azimuth (Az) and compares to star gazing apps.
35 Downloads
Updated 2 Sep 2023

View License

How can a mobile app star-gazing predict the altitude and azimuth of the stars above a location at any given time? Is Earth's axial precession significant? This Live Script explores the answers and provides an accessible and practical introduction to elementary astronomy.
The included function RADECAltAz converts local time to universal time accounting for daylight savings
and evolves ("precesses") right ascension (RA) and declination (Dec) equatorial coordinates of stars at the J2000 epoch to values at the universal time accounting for Earth rotation, precession, and nutation using
the IAU 2000B model coefficients and code in Ref [6] and to altitude (Alt, elevation) and azimuth (Az ) in a geocentric local horizontal coordinate system for provided longitude (lon) and latitude (lat) in a spherical Earth approximation using formulae found in textbooks and presented in Ref [1]. The Alt-Az results for a number of bright stars are compared to the predictions of a variety of popular mobile phone star-gazing apps and the impact of precession and nutation and other complicating factors on mobile phone observations is assessed.
This Live Script may interest students and educators in astronomy and physics. It includes several unit conversion functions, background information, links, 'Try this" suggestions, and "Challenges" along with references for the further exploration. By exploring the concepts and transformations, the user may acquire a sense of how star-gazing apps work and about solar system dynamics beyond the simplest model.

Cite As

Duncan Carlsmith (2024). RA-Dec Alt-Az Conversion Explorer (https://www.mathworks.com/matlabcentral/fileexchange/134556-ra-dec-alt-az-conversion-explorer), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Simple camera calibration using stars

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

RADecAltAzConversionExplorer

Version Published Release Notes
1.0.2

Added link to National Astronomical Observatory of Japan (NAOJ) Al-Az calculator for a comparison challenge.

1.0.1

Minor fixes.

1.0.0