Royal Navy officer during the American War of Independence, French Revolutionary Wars and Napoleonic Wars, later an Admiral (1767–1832)