In practice, Royal Navy courts martial rarely tried any sexual crimes except for male homoerotic offenses. At this time all same-sex erotic contact was, in theory, illegal. Penetrative anal sex was a felony carrying a mandatory capital punishment. Any other contact constituted a misdemeanor, and could result in corporal punishment and other harsh sanctions.
The main point of the article is to explain just how common these trials were, and how they were followed with salacious interest by the public:
These naval sodomy trials were far more common and publicly visible than modern observers have realized. Between 1690 and 1900, the force prosecuted over 490 cases, many involving more than one defendant. The Regency era was the historical high point for cases in both absolute and per capita terms. Between 1795 to 1837 the navy held over 180 trials for same-sex contact.The world has changed, quite dramatically.
The navy’s relative rate of prosecution was also high. At periods through the eighteenth century it tried more men for same-sex crimes than did the London criminal courts. The navy was one of the most active sites for the legal repression of sodomy not only in the English-speaking world, but also in western Europe....
Britons back on land took an avid interest in these cases as well. They could follow them in the periodical press, which turned out thousands of items on maritime sodomy. The press covered the 1807 prosecution of Lieutenant William Berry of the Hazard sloop, for instance, in close detail, with dozens of pieces tracking events from allegation to execution.
A defendant in one of the cases Charles Austen tried referred explicitly to the frequency of such coverage, lamenting in his defense that “officers in the Navy are too frequently accused of acts tending to the commission of unnatural offenses… [H]ow frequent are the reports we are doomed at the present day, with grief, to peruse in the public prints.”