Archeoastronomy calculator methods

Declination Calculator

This independently written alignment calculator follows the latitude, true azimuth and horizon-altitude workflow exemplified by Clive Ruggles’s GETDEC-based calculator. It is not a copy of GETDEC and is not endorsed by Ruggles.

The WGS84 ellipsoid uses semi-major axis 6,378,137 m and inverse flattening 298.257223563. Geodetic latitude sets the ellipsoid-normal local horizon. A WGS84 Cartesian observer position is used for finite-distance vector parallax; the geocentric object distance is supplied by the user. A distant object has no parallax. Geographic longitude is unnecessary for declination alone: rotating this geometry around Earth’s polar axis does not change the result.

For observed altitude h in degrees, Bennett’s approximate optical refraction is R = cot(h + 7.31/(h + 4.4)) / 60 degrees, multiplied by (P/1010) × (283/(273+T)) for station pressure P in hPa and temperature T in °C. R is subtracted from observed altitude. The small negative residual near the zenith is clamped to zero. Geometric input bypasses refraction. This is a standard-atmosphere approximation with normalized weather scaling, not a ray trace or a high-precision observation reduction. Source: G. G. Bennett (1982), The Calculation of Astronomical Refraction in Marine Navigation, Journal of Navigation 35, 255–259. The observed-altitude form is also documented in the USNO NOVAS C3.1 refract routine; NOVAS guide.

The correction is limited to −1° through 90° observed altitude; negative altitudes extrapolate the empirical model. Atmospheric inversions and horizon variability can overwhelm displayed precision. An entered unrefracted angular semidiameter is subtracted for the upper limb or added for the lower limb after refraction removal. Sun and Moon distances and semidiameters are editable nominal assumptions, not date-specific ephemerides.

Declination without parallax follows sin δ = sin φ sin h + cos φ cos h cos A. For finite distance D, the ray from the WGS84 observer along this unrefracted centre direction is intersected with a geocentric sphere of radius D, giving the geocentric centre direction and declination. Observer height is ellipsoidal. Gravity deflection, polar motion, aberration, nutation and epoch transformations are excluded. Use true, not magnetic, azimuth and a horizon altitude relative to the local horizontal. No terrain or sea-horizon dip is inferred.

The reported 1σ is a first-order propagation of independent azimuth and altitude errors through the complete calculation. It excludes uncertainty in atmosphere, latitude, height, distance, semidiameter and the model, and is unreliable near celestial poles. A close numerical match is not evidence of historical intention.

Earth’s Obliquity Calculator

The mean tilt is the angular separation of the mean equator and mean ecliptic poles of date. Canopy Archaeoastronomy ports ERFA 2.0.1’s eraLtpequ and eraLtpecl routines to JavaScript, with the original arithmetic and corrected coefficients. ERFA is derived, with permission, from SOFA; this modified port is not SOFA itself.

Scientific model: J. Vondrák, N. Capitaine and P. Wallace (2011), New precession expressions, valid for long time intervals, A&A 534, A22; 2012 corrigendum, A&A 541, C1. ERFA 2.0.1 source.

The model was designed for ±200,000 years around J2000. Canopy Archaeoastronomy accepts 15000 BC–15000 AD. This is not a claim of uniform accuracy: long-term rotational and tidal assumptions introduce uncertainty. Mean obliquity excludes nutation. Solstitial limits ±ε are approximate mean geometry, not a topocentric solar ephemeris. The local rate is a centred one-Julian-year numerical difference, expressed in arcseconds per Julian century.

Dates are proleptic Gregorian at 12:00 TT. There is no civil year zero; 1 BC maps to astronomical year 0. No UTC or uncertain ancient ΔT conversion is performed. WGS84 specifies Earth’s shape and is used by the geodesic and declination tools; it is not an obliquity model.

ERFA licence and adaptation notice

JavaScript port by Canopy Archaeoastronomy, 18 October 2026. Functions were renamed and wrapped for the browser; pole coefficients and numerical operations were retained. A pole-angle calculation was added. Complete source terms follow.

 
 
 Copyright (C) 2013-2023, NumFOCUS Foundation.
 All rights reserved.
 
 This library is derived, with permission, from the International
 Astronomical Union's "Standards of Fundamental Astronomy" library,
 available from http://www.iausofa.org.
 
 The ERFA version is intended to retain identical functionality to
 the SOFA library, but made distinct through different function and
 file names, as set out in the SOFA license conditions.  The SOFA
 original has a role as a reference standard for the IAU and IERS,
 and consequently redistribution is permitted only in its unaltered
 state.  The ERFA version is not subject to this restriction and
 therefore can be included in distributions which do not support the
 concept of "read only" software.
 
 Although the intent is to replicate the SOFA API (other than
 replacement of prefix names) and results (with the exception of
 bugs;  any that are discovered will be fixed), SOFA is not
 responsible for any errors found in this version of the library.
 
 If you wish to acknowledge the SOFA heritage, please acknowledge
 that you are using a library derived from SOFA, rather than SOFA
 itself.
 
 
 TERMS AND CONDITIONS
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:
 
 1 Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
 
 2 Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.
 
 3 Neither the name of the Standards Of Fundamental Astronomy Board,
   the International Astronomical Union nor the names of its
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
 COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.