For warships of the 20th century, the director is part of the fire control system; it passes information to the computer that calculates range and elevation for the guns.
Typically, positions on the ship measured range and bearing of the target; these instantaneous measurements are used to calculate rate of change values, and the computer ("fire control table" in Royal Navy terms) then predicts the correct firing solution, taking into account other parameters, such as wind direction, air temperature, and ballistic factors for the guns.
The British Royal Navy widely deployed the Pollen and Dreyer Fire Control Tables during the First World War, while in World War II a widely used computer in the US Navy was the electro-mechanical Mark I Fire Control Computer.
On ships the director control towers for the main battery are placed high on the superstructure, where they have the best view.
The Bofors 40 mm gun (called a fire unit) used in its anti-aircraft role has the M5 director for its fire-control system.
Essentially, the director predicts future position based on the aircraft's present location and how it is moving.
If the director was not located near the gun sections, a correction for parallax error could also be entered to produce even more accurate firing direction calculations.