NauticTools2

Celestial navigation

Compass check – compass error and deviation by the sun

Where the sun lies true can be calculated for any moment. Take a compass bearing of it and the difference gives the compass error – and after subtracting the variation, the deviation on the current heading. NauticTools2 works this as an azimuth bearing or at true sunrise or sunset (amplitude), for magnetic and gyro compasses.

Compass check at true sunset off Kiel on 22 October 2026.

The principle

The compass does not point true. Variation depends on the place, deviation on the ship and the current heading. Together they make up the compass error. From time and position NauticTools2 calculates the sun's true bearing; comparing it with the compass bearing gives the compass error, and with the variation from the IGRF model the deviation remains.

Sketch (compass error exaggerated): horizon seen from above, true north up, compass north slightly east of it; the sun sets 19.5° south of west, true bearing 250.5°, compass bearing 245°, compass error 5.5° east True north Compass north Error 5.5° E W S E A Sun at true sunset A = 19.5° S TB = 250.5° CB = 245.0°
The sun sets 19.5° south of west, i.e. at a true bearing of 250.5°. The compass shows 245°: compass north lies east of true north by the compass error of 5.5° (exaggerated in the sketch).

Two methods

When do you need it?

Formulas and working

Error = TB − CB · Dev = Error − Var
  1. Sun's position

    GHA and declination of the sun for the time of the bearing, and with the longitude the local hour angle.

  2. True bearing

    Azimuth bearing: the azimuth from latitude, declination and LHA. Amplitude: sin A = sin δ / cos φ, counted from east (sunrise) or west (sunset) towards the side of the declination; TB = 90° − A at sunrise, 270° + A at sunset (A north positive).

  3. Compass error

    Error = TB − CB: if the true bearing is larger, the error is east (+), otherwise west (−).

  4. Deviation

    Dev = Error − Var, valid for the heading at the time of the bearing. Variation comes from the IGRF model and can be overwritten, e.g. with the value from the chart.

  5. Gyro compass

    gyro bearing + gyro error + speed error = TB, with the speed error from speed, gyro heading and latitude.

Worked examples

Off Kiel (54° 20′ N, 010° 08′ E) on 22 October 2026 at 15:59:00 UT you take a compass bearing of the sun at true sunset: 245°. What are compass error and deviation?

Declination 11°12.8′ S → amplitude A = 19.5° S
TB = 270° − 19.5° = 250.5°
Error = 250.5° − 245° = +5.5° (east)
Variation (IGRF) = 4.4° E → deviation = 5.5° − 4.4° = +1.1° (east)

The deviation card “SSS/SHS Begleitheft 2015”, however, gives 0.0° for compass heading 250°. The difference of 1.1° is exactly what a compass check is meant to reveal – time to check the card on this heading.

Azimuth bearing: 18 October 2026, 09:47:32 UT, position 47° 45′ N, 006° 20′ W, compass bearing of the sun 143°, variation 2° W.

TB ≈ 140.8° → error ≈ −2.2° (west)
Deviation = −2.2° − (−2.0°) ≈ −0.2° (west)

Things to watch out for

How it works in NauticTools2

  1. Choose method and compass

    Azimuth bearing or true sunrise/sunset, magnetic or gyro compass.

  2. Time and position

    Date and time of the bearing in UT, latitude and longitude.

  3. Enter the bearing

    Compass bearing of the sun, optionally the compass heading for comparison with the deviation card. Variation is filled in from the IGRF model and can be changed.

  4. Result

    True bearing, compass error and deviation with the working; for the gyro, speed error and gyro error. Inputs can be saved and the result printed.

Frequently asked questions

How do you check the compass by the sun?

Take a compass bearing of the sun and note the exact time. Time and position give the true bearing; the difference from the compass bearing is the compass error, and after subtracting the variation the deviation remains.

What is the amplitude?

The angle between east or west and the direction of the sun at true sunrise or sunset: sin A = sin δ / cos φ.

When is the compass error east?

When the true bearing is greater than the compass bearing. The error is then positive, otherwise negative (west).

Related tools

NauticTools2 is free and runs on Windows 10 and 11. An Android version is in preparation.

Get it from the Microsoft Store