# NavList:

## A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding

**Re: Cocked hats, again.**

**From:**George Huxtable

**Date:**2007 Mar 16, 15:05 -0000

Seeing that the question of cocked hats still seems to raise a lot of interest, as well as much misunderstanding and unnecessary heat, may I suggest that someone else might enjoy trying to simulate the problem on his computer, as I did a few years ago. Perhaps it may help if I explain what I did. Unfortunately it's now beyond recall, because it was implemented on my old Mac using Virtual Basic, neither of which is now available to me. The problem that I tackled was not that of three sextant sights of bodies at given azimuths, but the analogous case of compass bearings to three distant landmarks, at given azimuths. Adapting to three astronomical intercepts would be simple. What I did was to mark the observer's true position with a cross at the centre of the computer screen, and to assume that three landmarks existed, way off-screen, at given distances and azimuths. Those positions would remain constant for a long run of trials, but could be altered to extend the test to a variety of conditions. As you might imagine, the first test was for the simple case of chosen azimuths at 0, 120, and 240 degrees. Of course, in the absence of errors, when three bearings are taken at the azimuths of those landmarks, reciprocals of those bearing lines drawn from those landmarks must pass exactly through the observer's true position at the centre of the screen. Now, modify those reciprocal bearings by adding a Gaussian error, centred on zero, to each of them independently, skewing the angles appropriately by an amount that depends on the angular scatter, or sigma. (Hint: a useful trick for generating a Gaussian scatter, centred on zero, is to Sum 12 random numbers, each in the range 0 to 1, and subtract 6. This results in a very close approximation to a Gaussian distribution, centred at zero, with a sigma of 1 unit). Now, each time you apply a randomly varying skew, independently, to the three bearings, they intersect in a triangle, and you should adjust the scale of the display so that most such triangles can be accommodated on the screen. It helps to have a variable gain control so that you can "blow up" the geometry, in cases where the verdict is in doubt. Verdict? Yes, there's now a simple choice to make, as a succession of triangles, of different shapes and sizes and positions, appears on the screen. Does the triangle enclose the true position, at the centre of the screen, or does it not? No doubt, there's a mathematical algorithm that can resolve that question without human intervention, but I wished to keep the matter simple and understandable. I didn't want to get bogged down in arguments about whether such a test was giving the right answers. So that decision was instead made by me, on the basis of the triangle I could see in the screen, by pressing one button on the keyboard to vote Yes, or another to vote No, as to whetheror not it enclosed the central point. If an edge of the triangle appeared to pass through the centre point, I could expand the geometry until the matter was clear. As soon as a Yes or No button is pressed, the triangle vanishes and a new one takes its place. I found I could reliably handle several such triangles a second, and it was easy to accumulate a thousand, or so, such decisions. In each set the result was compatible with a three to one ratio, within the sort of statistical variation you might expect with that number of tests. It's not a demanding task, to program up such a test procedure, and this list has many on board who are far more adept with a computer than I am, and could no doubt do the same job in many different ways. It's quite good fun (though it palls, somewhat), and rather enlightening, to see all those different triangles appearing on screen before your eyes. George. contact George Huxtable at george@huxtable.u-net.com or at +44 1865 820222 (from UK, 01865 820222) or at 1 Sandy Lane, Southmoor, Abingdon, Oxon OX13 5HX, UK. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to NavList@fer3.com To unsubscribe, send email to NavList-unsubscribe@fer3.com -~----------~----~----~----~------~----~------~--~---