Home | Sailing |     Share This Page
Celestial Navigation

Notes on some old navigation programs that date back to my around-the-world sail

Copyright © 2016, Paul LutusMessage Page

Introduction | Celestial Navigation | General Great-Circle Navigation

(double-click any word to see its definition)

Introduction

Prior to my four-year solo world sail I learned how to use a sextant, and purchased a plastic sextant at a sailing store, solely as a backup navigation method. But due to equipment failures enroute I ended up navigating by transit far longer than I had expected to.

When I arrived in Fiji, after a serious equipment failure the very day I left French Polynesia, and after several thousand miles of plastic-sextant navigation and one world-class storm during which I really needed to know exactly where I was, I acquired a much better metal sextant, which I still own.

After that experience and no longer trusting electronic navigation equipment, I practiced sextant sights regularly with my nice new sextant, and started writing celestial navigation sight-reduction programs, which until then had been a mathematical diversion with no serious purpose.

During the remainder of my sail (which lasted another three years) I spent many hours sitting at my laptop writing C programs to assist in sextant sight reduction. I might have had some old-fashioned ideas about reliable navigation methods, but I wasn't above keeping a laptop around for journal writing, entertainment and sight reduction.

In this article I list and describe two of those programs. I'm doing this not so much because the programs are useful in modern times, but because some of the internal methods/functions may prove useful, in particular the routines that produce accurate star, planet and solar positions for a given time and geographic location, date/time conversion routines and coordinate transform functions.

After some bug fixes to make the programs compile and run, but by no means to bring the code up to modern standards (there are many warnings I haven't bothered to correct), I can suggest this compilation method on Linux:

$ c++ (program name).c -o (program name)

Again, this article has a historical purpose, not to offer programs that more than a handful of people might find useful in 2016.

Celestial Navigation

Here's the program listing (eph.c):

Click here for a plain-text version.

This program was my primary navigation aid during my circumnavigation. I used it to reduce two-sextant sights while underway. In this method I would take a sextant sight at about 10:00 local time and another one at about 14:00, and use this program to reduce the sights. I would enter a boat speed and direction and the program would take my motion into account to compute two intersecting great circles. It was up to me to decide which of the two intersection points was my position, usually not a serious source of confusion.

The advantage of the two-sight method over noon sights (which this program also manages) is that I could be lazy about which time I chose to make the sights — the exact time of the sights made no difference to their accuracy, as long as I recorded accurate times along with the sights.

The program also provided accurate ephemeris positions for navigation stars and planets, but I didn't end up using these features very much.

If anyone should consider actually using this program in modern times, they would do well to update the provided correction tables for sun and star positions, which were only valid until 1999.

General Great-Circle Navigation

Here's the program listing (nav.c):

Click here for a plain-text version.

This program provides a set of navigation functions of a general kind — great-circle distance for two entered positions, an end position for a start position and great-circle distance and bearing, functions like that. This program doesn't have the automatic calendar obsolescence problem that eph.c has, because it doesn't compute any astronomical body positions — it's more pure math than a practical tool for ocean navigation.

This program's functions are likely to prove more useful than the program itself.

Home | Sailing |     Share This Page