Absolutely true Colin,
Whilst going through all of the Aubrey Maturin series of books, I did some research into Patrick O'Brian. The man was a major military/navy historian. All of the adventures of Captain Aubrey were based on actual navy engagements of the time, based on the historical records available, including ships logs. The names of some (not all) of the ships involved were changed, as were some of the exact dates; due to literary license. There really is much more in the books than in the film Master and Commander.