Navigation and gunnery have always been driving forces for mathematical innovation so there are often naval connections to important discoveries and inventions.
But don’t sleep on the importance of land-based artillery and military surveying and cartography as motivation too. Long range naval gunnery with these kinds of mechanical computers to take into account things like course, speed and rolling motion, was all building on earlier static land-based gunnery methods using tables and nomograms derived through complex calculations - some of Babbage’s difference engine work was calculating gunnery tables.
This is the whole conceit behind Neil deGrasse Tyson's book "Accessory to War":
"Accessory to War: The Unspoken Alliance Between Astrophysics and the Military is the fifteenth book by American astrophysicist and science communicator Neil deGrasse Tyson which he co-wrote with researcher and writer Avis Lang. It was released on September 11, 2018 by W. W. Norton & Company. The book chronicles war and the use of space as a weapon going as far back as before the Ancient Greeks, and includes examples such as Christopher Columbus' use of his knowledge of a lunar eclipse and the use of satellite intelligence by the United States during the Gulf War. While speaking on the book, Tyson told National Geographic that he regards the collaboration between science and the military as a 'two-way street.'"
FWIW Tyson is quite critical of the application of astrophysics research to military ends.
But don’t sleep on the importance of land-based artillery and military surveying and cartography as motivation too. Long range naval gunnery with these kinds of mechanical computers to take into account things like course, speed and rolling motion, was all building on earlier static land-based gunnery methods using tables and nomograms derived through complex calculations - some of Babbage’s difference engine work was calculating gunnery tables.