Fire-control system
Naval fire control: 

Origins: The original fire-control systems were developed for ships.
The early history of naval fire control was dominated by the engagement of targets within visual range (also referred to as direct fire). In fact, most naval engagements before 1800 were conducted at ranges of 20 to 50 yards (20 to 50 m).
Even during the American Civil War, the famous engagement between USS Monitor and CSS Virginia was often conducted at less than 100 yards (90 m) range.
Rapid technical improvements in the late 19th century greatly increased the range at which gunfire was possible. Rifled guns of much larger size firing explosive shells of lighter relative weight (compared to all-metal balls) so greatly increased the range of the guns that the main problem became aiming them while the ship was moving on the waves. This problem was solved with the introduction of the gyroscope, which corrected this motion and provided sub-degree accuracies. Guns were now free to grow to any size, and quickly surpassed 10 inches (250 mm) calibre by the 1890s. These guns were capable of such great range that the primary limitation was seeing the target, leading to the use of high masts on ships.
Another technical improvement was the introduction of the steam turbine which greatly increased the performance of the ships. Earlier reciprocating engine powered capital ships were capable of perhaps 16 knots, but the first large turbine ships were capable of over 20 knots. Combined with the long range of the guns, this meant that the target ship could move a considerable distance, several ship lengths, between the time the shells were fired and landed. One could no longer eyeball the aim with any hope of accuracy. Moreover, in naval engagements it is also necessary to control the firing of several guns at once.
Naval gun fire control potentially involves three levels of complexity. Local control originated with primitive gun installations aimed by the individual gun crews. Director control aims all guns on the ship at a single target. Coordinated gunfire from a formation of ships at a single target was a focus of battleship fleet operations. Corrections are made for surface wind velocity, firing ship roll and pitch, powder magazine temperature, drift of rifled projectiles, individual gun bore diameter adjusted for shot-to-shot enlargement, and rate of change of range with additional modifications to the firing solution based upon the observation of preceding shots.
The resulting directions, known as a firing solution, would then be fed back out to the turrets for laying. If the rounds missed, an observer could work out how far they missed by and in which direction, and this information could be fed back into the computer along with any changes in the rest of the information and another shot attempted.
At first, the guns were aimed using the technique of artillery spotting. It involved firing a gun at the target, observing the projectile's point of impact (fall of shot), and correcting the aim based on where the shell was observed to land, which became more and more difficult as the range of the gun increased.
Between the American Civil War and 1905, numerous small improvements, such as telescopic sights and optical rangefinders, were made in fire control. There were also procedural improvements, like the use of plotting boards to manually predict the position of a ship during an engagement.

World War I: Then increasingly sophisticated mechanical calculators were employed for proper gun laying, typically with various spotters and distance measures being sent to a central plotting station deep within the ship. There the fire direction teams fed in the location, speed and direction of the ship and its target, as well as various adjustments for Coriolis effect, weather effects on the air, and other adjustments. Around 1905, mechanical fire control aids began to become available, such as the Dreyer Table, Dumaresq (which was also part of the Dreyer Table), and Argo Clock, but these devices took a number of years to become widely deployed. These devices were early forms of rangekeepers.
Arthur Pollen and Frederic Charles Dreyer independently developed the first such systems. Pollen began working on the problem after noting the poor accuracy of naval artillery at a gunnery practice near Malta in 1900. Lord Kelvin, widely regarded as Britain's leading scientist first proposed using an analogue computer to solve the equations which arise from the relative motion of the ships engaged in the battle and the time delay in the flight of the shell to calculate the required trajectory and therefore the direction and elevation of the guns.
Pollen aimed to produce a combined mechanical computer and automatic plot of ranges and rates for use in centralised fire control. To obtain accurate data of the target's position and relative motion, Pollen developed a plotting unit (or plotter) to capture this data. To this he added a gyroscope to allow for the yaw of the firing ship. Like the plotter, the primitive gyroscope of the time required substantial development to provide continuous and reliable guidance. Although the trials in 1905 and 1906 were unsuccessful, they showed promise. Pollen was encouraged in his efforts by the rapidly rising figure of Admiral Jackie Fisher, Admiral Arthur Knyvet Wilson and the Director of Naval Ordnance and Torpedoes (DNO), John Jellicoe. Pollen continued his work, with occasional tests carried out on Royal Navy warships.
Meanwhile, a group led by Dreyer designed a similar system. Although both systems were ordered for new and existing ships of the Royal Navy, the Dreyer system eventually found most favour with the Navy in its definitive Mark IV* form. The addition of director control facilitated a full, practicable fire control system for World War I ships, and most RN capital ships were so fitted by mid 1916. The director was high up over the ship where operators had a superior view over any gunlayer in the turrets. It was also able to co-ordinate the fire of the turrets so that their combined fire worked together. This improved aiming and larger optical rangefinders improved the estimate of the enemy's position at the time of firing. The system was eventually replaced by the improved "Admiralty Fire Control Table" for ships built after 1927.

World War II: During their long service life, rangekeepers were updated often as technology advanced, and by World War II they were a critical part of an integrated fire-control system. The incorporation of radar into the fire-control system early in World War II provided ships the ability to conduct effective gunfire operations at long range in poor weather and at night. For U.S. Navy gun fire control systems, see ship gun fire-control systems.
The use of director-controlled firing, together with the fire control computer, removed the control of the gun laying from the individual turrets to a central position; although individual gun mounts and multi-gun turrets would retain a local control option for use when battle damage limited director information transfer (these would be simpler versions called "turret tables" in the Royal Navy). Guns could then be fired in planned salvos, with each gun giving a slightly different trajectory. Dispersion of shot caused by differences in individual guns, individual projectiles, powder ignition sequences, and transient distortion of ship structure was undesirably large at typical naval engagement ranges. Directors high on the superstructure had a better view of the enemy than a turret mounted sight, and the crew operating them were distant from the sound and shock of the guns. Gun directors were topmost, and the ends of their optical rangefinders protruded from their sides, giving them a distinctive appearance.
Unmeasured and uncontrollable ballistic factors, like high-altitude temperature, humidity, barometric pressure, wind direction and velocity, required final adjustment through observation of the fall of shot. Visual range measurement (of both target and shell splashes) was difficult prior to the availability of radar. The British favoured coincidence rangefinders while the Germans favoured the stereoscopic type. The former were less able to range on an indistinct target but easier on the operator over a long period of use, the latter the reverse.

Submarines were also equipped with fire control computers for the same reasons, but their problem was even more pronounced; in a typical "shot", the torpedo would take one to two minutes to reach its target. Calculating the proper "lead" given the relative motion of the two vessels was very difficult, and torpedo data computers were added to dramatically improve the speed of these calculations.
In a typical World War II British ship the fire control system connected the individual gun turrets to the director tower (where the sighting instruments were located) and the analogue computer in the heart of the ship. In the director tower, operators trained their telescopes on the target; one telescope measured elevation and the other bearing. Rangefinder telescopes on a separate mounting measured the distance to the target. These measurements were converted by the Fire Control Table into the bearings and elevations for the guns to fire upon. In the turrets, the gunlayers adjusted the elevation of their guns to match an indicator for the elevation transmitted from the Fire Control table—a turret layer did the same for bearing. When the guns were on target they were centrally fired.
Even with as much mechanization of the process, it still required a large human element; the Transmitting Station (the room that housed the Dreyer table) for HMS Hood's main guns housed 27 crew.
Directors were largely unprotected from enemy fire. It was difficult to put much weight of armour so high up on the ship, and even if the armour did stop a shot, the impact alone would likely knock the instruments out of alignment.