By the end of WW II American torpedoes were automatically programmed (direction, speed, fusing) before firing. The heavy calculations would be done by the shipboard firing computer while the parameters set would be used by the simple computer on the torpedo (which had inertial guidance). I struggle to imagine how people managed to design such things with just pencils and slide rules.
BTW these computers were mostly very functional, in the modern sense. They took inputs from instruments and controls, and computed functions, all usually continuous, smooth, real- or complex-valued. These functions' values, computed as voltages, frequencies, angles, etc were directly controlling some actuators, rudders, throttles, etc.
It's also highly compositional, as in applying relatively simple functions to results of other such functions, etc., which you can reason about analytically, and can plot on paper or an oscilloscope as a part of development and testing loop.
Disclaimer: all my hands-on experience with analog computers is from a one-semester course decades ago, using analog electronic, not mechanical devices.
WW II American torpedoes didn't have inertial guidance. They used gyros for directional control and just ran in a straight line after making a single turn onto the set course. Occasionally the torpedo would get stuck in that turn and run in a circle. Towards the end of the war the Navy also started introducing homing torpedoes, but those didn't use inertial guidance either.
> Occasionally the torpedo would get stuck in that turn and run in a circle.
Well that's not a great failure mode, if it can come right back at vessel which launched it ... imagine trying to implement a self-destruct failsafe with that tech back then ...
At least two US Navy submarines were sunk by their own torpedoes making circular runs. The main failsafe mechanism disabled the detonators until the weapon had run out a certain minimum distance but obviously that wasn't effective in circular runs.
Clear the Bridge [0] was an autobiographical account of WW2 from the captain of the Tang. O'Kane covers the experience of this incident in the book.
While two US Navy subs were known to be sunk in this manner, there remain several subs not claimed by either Germany or Japan that just never returned.
This may have been common enough that I distinctly remember it as something that could happen when playing Sub Battle Simulator in ‘91 (or around that year): https://en.wikipedia.org/wiki/Sub_Battle_Simulator
Not really. By definition an inertial guidance or navigation system has to do some sort of integration of inputs over time. Gyroscopes are typically used as part of inertial guidance systems, but connecting a gyro output directly to a rudder input wouldn't by itself be considered as inertial guidance. The device wasn't doing anything to calculate absolute position based on inertia.
There were also a large number of captains, who refused to trust anything coming out of the navys design bureau and testing facilities and personally made sure, that computers were never used or even ripped out, to only use a "working" impact fuse. Those distrusting captains continued there "protecting the crew from dysfunctional crap" missions well up into the vietnam war. Engineering failures have serious consequences and ripple effects.