to improve fighting capability at night, in poor weather and in smoke. The accuracy of modern tank guns is pushed to the mechanical limit by computerized fire-control systems. A fire-control system uses a laser rangefinder to determine the range to the target, a thermocouple, anemometer and wind vane to correct for weather effects and a muzzle referencing system to correct for gun-barrel temperature, warping and wear. Two sightings of a target with the range-finder enable calculation of the target movement vector. This information is combined with the known movement of the tank and the principles of ballistics to calculate the elevation and aim point that maximises the probability of hitting the target. Usually, tanks carry smaller caliber armament for short-range defense where fire from the main weapon would be ineffective or wasteful, for example when engaging infantry, light vehicles or close air support aircraft. A typical complement of secondary weapons is a general-purpose machine gun mounted coaxially with the main gun, and a heavier anti-aircraft-capable machine gun on the turret roof. Some tanks also have a hull-mounted machine gun. These weapons are often modified variants of those used by infantry, and so use the same kinds of ammunition. Protection and countermeasures The measure of a tank's protection is the combination of its ability to avoid detection (due to having a low profile and through the use of camouflage), to avoid being hit by enemy fire, its resistance to the effects of enemy fire, and its capacity to sustain damage whilst still completing its objective, or at least protecting its crew. This is done by a variety of countermeasures, such as armour plating and reactive defenses, as well as more complex ones such as heat-emissions reduction. In common with most unit types, tanks are subject to additional hazards in dense wooded and urban combat environments which largely negate the advantages of the tank's long-range firepower and mobility, limit the crew's detection capabilities and can restrict turret traverse. Despite these disadvantages, tanks retain high survivability against previous-generation rocket-propelled grenades aimed at the most-armoured sections. However, as effective and advanced as armour plating has become, tank survivability against newer-generation tandem-warhead anti-tank missiles is a concern for military planners. Tandem-warhead RPGs use two warheads to fool active protection systems; a first dummy warhead is fired first, to trigger the active defenses, with the real warhead following it. For example, the RPG-29 from the 1980s