This is a short description of the steps you take when performing celestial navigation.
Before we start: All symbols below are in vector notation and vector algebraic operations are used. (dot and cross products, absolute values, trigonometrics). All angles are measured in radians. You need to know the difference between spherical coordinates (on a sphere) and cartesian (3D) coordinates and the conversion formula between them. If you don't know these concepts you need to brush up or add up to your maths knowledge
- Make (at least) two observations of celestial objects.
Using your sextant measure the altitude to two celestial objects. If you use the same celestial object (such as the Sun during daytime) you need to wait for a while between the measurements. An hour will typically be sufficient.
For both measurements take note of the measured altitude,$f_1$ and$f_2$ .
Define angles$\alpha$ and$\beta$ this way:$\alpha = \frac{\pi}{2} - f_1$ ,$\beta = \frac{\pi}{2} - f_2$
Using your chronometer (clock) register the corresponding times$t_1$ and$t_2$ for the two measurements.
- Look up geographic positions (GP) in the Nautical Almanac
You find digital (PDF) Nautical Almanacs bundled in this repository and you can buy hard-copies (for 2024) here.
You will now need the timestamps$t_1$ and$t_2$ from the step above. Since the Nautical Almanac lists hourly values you will need to perform linear interpolation.
The GP:s are represented by two vectors$a$ and$b$ .
NOTE: The coordinates from the Nautical Almanac must be converted from spherical to cartesian before you start.
NOTE: You will also need to take care of atmospheric refraction and horizon dip.
NOTE: The toolkit will take care of the GP calculation (with linear interpolation), atmospheric refraction and horizon dip. You just have to extract the tabular data for the current and next hour if you use the code in the toolkit.
For more info see the Readme File.
- Perform a sight reduction
NOTE: The toolkit will take care of the sight reducion work.
NOTE: Old-school celestial navigation on a ship uses sight reduction tables as a "cheat" to avoid complex hand-calculations of the formulas below, and this works perfectly. You can learn about this here.
Two circles$A$ and$B$ define the circles of equal altitude defined from the sighting data as described above.
$A = \lbrace p \in \mathbb{R}^3 \mid p \cdot a = \cos \alpha \land \left|p\right| = 1 \rbrace$
$B = \lbrace p \in \mathbb{R}^3 \mid p \cdot b = \cos \beta \land \left|p\right| = 1 \rbrace$
Calculate the midpoint$q$ between intersections of$A$ and$B$ .
$q = N((a \times b) \times (a \cos \beta - b \cos \alpha))\space;\space N(x) = \frac{x}{\left|x\right|}$
Calculate a rotation vector$r$ and a rotation angle$\rho$
$r = \left( a \times b \right) \times q$
$\rho = \arccos\left(\frac{\cos \alpha}{a \cdot q}\right)$
Finally apply a rotation operation
$p_{\mathrm{rot}} = q \cos \rho + \left( r \times q \right) \sin \rho + r \left(r \cdot q \right)\left(1 - \cos \rho \right)$
Apply the formula above for$\rho$ and$-\rho$ and you will get the two intersection points$p_1$ and$p_2$ . Convert these vectors back to spherical coordinates. One of these coordinates matches your physical location. See yellow markers in picture below.
The sight reduction can be illustrated with a simple drawing of two circles on a sphere, with a divider, and then finding the intersections. The radius of the circles correspond to the measured altitude of the celestial object, just like Eratosthenes found out in 230 BC.
For more details, proof of maths used and background see the Readme File.