Compass check by the Sun
The Sun's true azimuth at a time and place, its amplitude at rising or setting, and the gyro or compass error against a bearing you observed
Planning and education aid. Not for primary navigation. Full disclaimer
Experimental: not yet fully verified. How results are checked
the Sun bore 302.7 degrees true, so the gyro error is 0.3 W degrees.
- True azimuth
- Azimuth angle
- Azimuth angle written out
- Computed altitude
- Amplitude
- Amplitude written out
Provenance
- Computed by
- navigation.celestial.sun-azimuth-check 1.0.0, core 0.1.0
- Model
- The Sun's apparent place from the same series as the almanac tool; Zn = atan2(-cos d sin LHA, cos L sin d - sin L cos d cos LHA) (Bowditch Appendix B); the amplitude from sin A = sin Dec / cos Lat, prefixed E rising or W setting and suffixed to agree with the declination (Bowditch §2017); the error as the true azimuth less the observed bearing, east positive, and the deviation as that error less the variation
- Accuracy
- Reproduces both worked gyro-error examples of Bowditch §2016 to the printed 0.1° of azimuth, and the amplitude of §2018 within 0.1° of the value its table interpolation gives. The Sun's own place is within 0.018′ of the US Naval Observatory
- Reference data
- version IERS Bulletin C 72 (2026-07-06) of a reference dataset
- Notes
- 1 shown with the answer
- Cites
- National Geospatial-Intelligence Agency, The American Practical Navigator (Bowditch), NGA Pub. No. 9, Volume I; International Earth Rotation and Reference Systems Service (Petit and Luzum, eds.), IERS Conventions (2010), IERS Technical Note 36, Chapter 5; Bureau des Longitudes (now IMCCE), distributed by CDS Strasbourg, VSOP87 planetary theories (Bretagnon and Francou 1988), VizieR catalog VI/81; US Naval Observatory, Astronomical Applications Department, USNO Astronomical Applications API (celestial navigation and sidereal time)
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: The Sun's apparent place from the same series as the almanac tool; Zn = atan2(-cos d sin LHA, cos L sin d - sin L cos d cos LHA) (Bowditch Appendix B); the amplitude from sin A = sin Dec / cos Lat, prefixed E rising or W setting and suffixed to agree with the declination (Bowditch §2017); the error as the true azimuth less the observed bearing, east positive, and the deviation as that error less the variation
Show your work
Almanac data
The Sun's apparent place for that secondat 2024-07-24T14:30:00Z= GHA 35°51.8', Dec N 19°40.4'True azimuth
Zn = atan2(-cos d sin LHA, cos L sin d - sin L cos d cos LHA)LHA 116°36.2', Lat 51°24.6'= Z N 57.3 W, Zn 302.7 degreesAmplitude
sin A = sin Dec / cos Lat, on the celestial horizonDec N 19°40.4', Lat 51°24.6'= W 32.7 N (302.7 degrees true)Compass error
The true azimuth less the bearing observed302.7 - 303.0 degrees= the Sun bore 302.7 degrees true, so the gyro error is 0.3 W degrees
The same steps an agent gets from the MCP server with explain: true.
Accuracy: Reproduces both worked gyro-error examples of Bowditch §2016 to the printed 0.1° of azimuth, and the amplitude of §2018 within 0.1° of the value its table interpolation gives. The Sun's own place is within 0.018′ of the US Naval Observatory
When to use this: Use this to check a gyro or magnetic compass against the Sun. Enter the second of the observation, your position, and the bearing you read. The tool returns the Sun's true azimuth, the amplitude for an observation taken at rising or setting, and the compass error, split into variation and deviation when you are checking a magnetic compass.
Limitations: The amplitude holds only at the moment the Sun's center is on the celestial horizon, which is not the moment it looks to be on the visible horizon; the note returned here says where to find it. Near the poles, and whenever the Sun is high, a small error in time or position moves the azimuth a long way, so take the sight low. The deviation returned is the error left after the variation you supply, so it is only as good as that variation. This does not correct a sextant altitude or give a position.
Worked example: Bowditch's setting Sun checked against a gyro reading of 303 degrees. Source: Bowditch 2024 §2018: at latitude 51°24.6'N with the Sun's declination N 19°40.4', the amplitude is W 32.6°N, a true bearing of 302.6°, so a gyro reading 303.0° is 0.4° W in error. The Sun holds that declination on 2024-07-24 at 14h30m UT and is setting then at longitude 80°44.4'E. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.
You enter
- Observed bearing
- 303 deg
- Compass
- gyro
- DUT1 (UT1 - UTC)
- 0 s
- Latitude
- 51 24.6 N
- Longitude
- 80 44.4 E
- UTC time
- 2024-07-24T14:30:00Z
You get
- Compass check
- the Sun bore 302.7 degrees true, so the gyro error is 0.3 W degrees
- True azimuth
- 302.7°
- Azimuth angle
- 57.3°
- Azimuth angle written out
- N 57.3 W
- Computed altitude
- 0°
- Amplitude
- 32.7°
- Amplitude written out
- W 32.7 N
- True bearing from the amplitude
- 302.7°
- When to take the amplitude
- The Sun's center is on the celestial horizon when its lower limb sits about two thirds of its own diameter above the visible horizon (Bowditch §2017).
- Declination
- 19.6739°
- LHA
- 116.6037°
- Compass error
- -0.3°
- Compass error written out
- 0.3 W
Review: Not yet independently reviewed by a geodesist.
Last verified: 2026-09-19, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Changes
- 2026-10-27, added: New, both experimental: latitude by Polaris, and a compass check by the Sun. The first turns one corrected altitude of Polaris into a latitude, and it solves the navigational triangle for Polaris's own place at the second of the sight rather than reading the Almanac's a0, a1, and a2 tables, so it holds at any latitude and will not drift as Polaris moves. It reports the correction it applied, which is the same quantity those three tables add up to, and Polaris's true azimuth for the line of position. The second gives the Sun's true azimuth at a time and place, its amplitude for an observation taken as the Sun's centre crosses the celestial horizon, and the error of the compass against a bearing you read, split into variation and deviation for a magnetic compass. Bowditch's own worked Polaris sight, its two gyro errors by Pub. No. 229, and its worked amplitude are all reproduced, and both tools are checked against the US Naval Observatory's own data at 60 instants and places from 1995 to 2045. The Nautical Almanac still governs. Changelog
Checked against: 31 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- The American Practical Navigator (Bowditch), NGA Pub. No. 9, Volume I, National Geospatial-Intelligence Agency, 2024 edition. Chapter 20, Sight Reduction (§2016, Azimuth by Tables, Examples 1 to 3 and Tables 2016a and 2016b); §2017 to §2019, Amplitudes, sin A = sin Dec / cos Lat with the visible-horizon rules and the worked example of §2018.
- IERS Conventions (2010), IERS Technical Note 36, Chapter 5, International Earth Rotation and Reference Systems Service (Petit and Luzum, eds.), Technical Note 36, chapter 5 of 10 August 2012, with Tables 5.2e, 5.3a, and 5.3b. Equations 5.15 (ERA), 5.32 (GMST), 5.39 and 5.40 (Fukushima-Williams precession angles), 5.43 and 5.44 (fundamental arguments); Tables 5.3a and 5.3b (IAU 2000A nutation).
- VSOP87 planetary theories (Bretagnon and Francou 1988), VizieR catalog VI/81, Bureau des Longitudes (now IMCCE), distributed by CDS Strasbourg, VSOP87D, heliocentric ecliptic of date. Files VSOP87D.ear, .ven, .mar, .jup, .sat; Astronomy and Astrophysics 202, 309.
- USNO Astronomical Applications API (celestial navigation and sidereal time), US Naval Observatory, Astronomical Applications Department, API 4.0.1, celnav endpoint. Celestial navigation data for assumed position and time: GHA and declination of the Sun, Moon, planets, Aries, and the navigational stars.
Terms
- DUT1: UT1 minus UTC
- The difference between Earth-rotation time and UTC, always under 0.9 s, broadcast so users can recover UT1. Source: IERS Bulletin C (leap seconds)
- IERS: International Earth Rotation and Reference Systems Service
- The service that maintains the ITRF and Earth orientation data, and announces leap seconds in Bulletin C. Source: IERS Bulletin C (leap seconds)
- LHA: local hour angle
- How far west of your own meridian a body is, from 0 to 360 degrees: the Greenwich hour angle plus your longitude east, or minus it west. Source: The American Practical Navigator (Bowditch), NGA Pub. No. 9
- UT1: Universal Time 1
- Time kept by Earth's actual rotation. It drifts against atomic time, and UTC is kept within 0.9 s of it. Source: IERS Bulletin C (leap seconds)
- UTC: Coordinated Universal Time
- The world's civil time standard, kept within 0.9 s of Earth's rotation by leap seconds. Aviation calls it Zulu time, written with a Z. Source: IERS Bulletin C (leap seconds)
Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.