Battle Fleet: The Adventures of Sam Witchall by Paul Dowswell
Sam escapes death in Australia when the truth about his false conviction is finally revealed. But on the journey back to England he faces pirates and a terrible storm, before making the longed-for trip back up the River Thames. Finally reunited with his family in Norfolk, Sam realises how much life at sea has become part of him. So, when he hears that Napoleon plans to attack England, he is tempted to join the Navy once more, and finds himself midshipman on none other than the victory, preparing for one of the most epic battles in history: Trafalgar.