Dalrymple, Alexander, Hydrographer to the Admiralty