A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
From: Frank Reed
Date: 2019 Jul 31, 19:59 -0700
The earliest references I have found for the expression "cocked hat" referring to three crossing lines of position date from 1908-1910. Two describe problems in piloting or hydrographic surveying. A third reference was in Blackburne's tables and this one directly addressed astronomical lines of position, but this was at a point where he was quoting and then critiquing another author's book on "Sumner's Method" (which at this point in time reasonably meant any method for producing a celestial line of position). Because this feels like a later addition to the work, it may not date from 1908. In all of these the expression "cocked hat" is used without explanation. To me, this suggests that the metaphoric expression rose up from practitioners and was already popular before it appeared in print. So I would go with c.1900 as the origin of the metaphor.
Try this search link at HathiTrust. You have to dig a lot. Sometimes a cocked hat is just a hat. And there are many dictionaries and other books that give false positives in the search. Select any book that looks promising and then search within it for "cocked hat". That seemed to work well.