This is the computerized modern version during WW2.
At the beginning of WW2 they did not have this system functioning on battleships. Or just testing it.
They had to calculate
direction of there ship and speed
direction of the target ship and speed
distance to target
wind speed and direction
rotation of the shell it is firing
rotation of the earth
elevation angle
they also counted the number of times the specific barrels liner had been used before
they apparently could refine the barrel at sea. That needs some searching for that answer
And those computations together.
Now to tell when to fire the gun, as in the roll of the ship in the water?
I believe there is the drop the ball thing happened. To tell when to pull the trigger. The ball apparently had to hit the floor at a specific spot to pull the trigger?
If you look at the photo of the USS Alabama, there is a small airplane on the back of the ship. They launched it off a rail, then on return it landed in the water, and used a crane to pick it out of the water.
They had to fire during the day. Then radar was introduced to the war ship. That adde the ability to see and fire at night.