# TERCOM

Terrain contour matching, or TERCOM, is a navigation system used primarily by cruise missiles. It uses a contour map of the terrain that is compared with measurements made during flight by an on-board radar altimeter. A TERCOM system considerably increases the accuracy of a missile compared with inertial navigation systems (INS). The increased accuracy allows a TERCOM-equipped missile to fly closer to obstacles and at generally lower altitudes, making it harder to detect by ground radar.

## Description
### Optical contour matching

The Goodyear Aircraft Corporation ATRAN (Automatic Terrain Recognition And Navigation) system for the MGM-13 Mace was the earliest known TERCOM system. In August 1952, Air Materiel Command initiated the mating of the Goodyear ATRAN with the MGM-1 Matador. This mating resulted in a production contract in June 1954. ATRAN was difficult to jam and was not range-limited by line-of sight, but its range was restricted by the availability of radar maps. In time, it became possible to construct radar maps from topographic maps.
Preparation of the maps required the route to be flown by an aircraft. A radar on the aircraft was set to a fixed angle and made horizontal scans of the land in front. The timing of the return signal indicated the range to the landform and produced an amplitude modulated (AM) signal. This was sent to a light source and recorded on 35 mm film, advancing the film and taking a picture at indicated times. The film could then be processed and copied for use in multiple missiles.
In the missile, a similar radar produced the same signal. A second system scanned the frames of film against a photocell and produced a similar AM signal. By comparing the points along the scan where the brightness changed rapidly, which could be picked out easily by simple electronics, the system could compare the left-right path of the missile compared with that of the pathfinding aircraft. Errors between the two signals drove corrections in the autopilot needed to bring the missile back onto its programmed flight path.

### Altitude matching

Modern TERCOM systems use a different concept, based on the altitude of the ground over which missile flies and measure by radar altimeter of the missile and comparing that to measurements of prerecorded terrain altitude maps stored in missile avionics memory. TERCOM "maps" consist of a series of squares of a selected size. Using a smaller number of larger squares saves memory, at the cost of decreasing accuracy. A series of such maps are produced, typically from data from radar mapping satellites. When flying over water, contour maps are replaced by magnetic field maps.
As a radar altimeter measures the distance between the missile and the terrain, not the absolute altitude compared to sea level, the important measure in the data is the change in altitude from square to square. The missile's radar altimeter feeds measurements into a small buffer that periodically "gates" the measurements over a period of time and averages them out to produce a single measurement. The series of such numbers held in the buffer produce a strip of measurements similar to those held in the maps. The series of changes in the buffer is then compared with the values in the map, looking for areas where the changes in altitude are identical. This produces a location and direction. The guidance system can then use this information to correct the flight path of the missile.
During the cruise portion of the flight to the target, the accuracy of the system has to be enough only to avoid terrain features. This allows the maps to be a relatively low resolution in these areas. Only the portion of the map for the terminal approach has to be higher resolution, and would normally be encoded at the highest resolutions available to the satellite mapping system.

### TAINS

Due to the limited amount of memory available in mass storage devices of the 1960s and 70s, and their slow access times, the amount of terrain data that could be stored in a missile-sized package was far too small to encompass the entire flight. Instead, small patches of terrain information were stored and periodically used to update a conventional inertial platform. These systems, combining TERCOM and inertial navigation, are sometimes known as TAINS, for TERCOM-Aided Inertial Navigation System.

### Advantages

TERCOM systems have the advantage of offering accuracy that is not based on the length of the flight; an inertial system slowly drifts after a "fix", and its accuracy is lower for longer distances. TERCOM systems receive constant fixes during the flight, and thus do not have any drift. Their absolute accuracy, however, is based on the accuracy of the radar mapping information, which is typically in the range of meters, and the ability of the processor to compare the altimeter data to the map quickly enough as the resolution increases. This generally limits first generation TERCOM systems to targets on the order of hundreds of meters, limiting them to the use of nuclear warheads. Use of conventional warheads requires further accuracy, which in turn demands additional terminal guidance systems.

### Disadvantages

The limited data storage and computing systems of the time meant that the entire route had to be pre-planned, including its launch point. If the missile was launched from an unexpected location or flew too far off-course, it would never fly over the features included in the maps, and would become lost. The INS system can help, allowing it to fly to the general area of the first patch, but gross errors simply cannot be corrected. This made early TERCOM-based systems much less flexible than more modern systems like GPS, which can be set to attack any location from any location, and do not require pre-recorded information which means they can be given their targets immediately before launch.
Improvements in computing and memory, combined with the availability of global digital elevation maps, have reduced this problem, as TERCOM data is no longer limited to small patches, and the availability of side-looking radar allows much larger areas of landscape contour data to be acquired for comparison with the stored contour data.

## Comparison with other guidance systems
### DSMAC, Digital Scene Matching Area Correlator

DSMAC was an early form of AI which could guide missiles in real time by using camera inputs to determine location. DSMAC was used in Tomahawk Block II onward, and proved itself successfully during the first Gulf War. The system worked by comparing camera inputs during flight to maps computed from spy satellite images. The DSMAC AI system computed contrast maps of images, which it then combined in a buffer and then averaged. It then compared the averages to stored maps computed beforehand by a large mainframe computer, which converted spy satellite pictures to simulate what routes and targets would look like from low level. Since the data were not identical and would change by season and from other unexpected changes and visual effects, the DSMAC system within the missiles had to be able to compare and determine if maps were the same, regardless of changes. It could successfully filter out differences in maps and use the remaining map data to determine its location. Due to its ability to visually identify targets instead of simply attacking estimated coordinates, its accuracy exceeded GPS guided weapons during the first Gulf War.
The massive improvements in memory and processing power from the 1950s, when these scene comparison systems were first invented, to the 1980s, when TERCOM was widely deployed, changed the nature of the problem considerably. Modern systems can store numerous images of a target as seen from different directions, and often the imagery can be calculated using image synthesis techniques. Likewise, the complexity of the live imaging systems has been greatly reduced through the introduction of solid-state technologies like CCDs. The combination of these technologies produced the digitized scene-mapping area correlator (DSMAC). DSMAC systems are often combined with TERCOM as a terminal guidance system, allowing point attack with conventional warheads.
MGM-31 Pershing II, SS-12 Scaleboard Temp-SM and OTR-23 Oka used an active radar homing version of DSMAC (digitized correlator unit DCU), which compared radar topographic maps taken by satellites or aircraft with information received from the onboard active radar regarding target topography, for terminal guidance.

### Satellite navigation

Yet another way to navigate a cruise missile is by using a satellite positioning system as they are precise and cheap. Unfortunately, they rely on satellites. If the satellites are interfered with (e.g. destroyed) or if the satellite signal is interfered with (e.g. jammed), the satellite navigation system becomes inoperable. Therefore, the GPS/GLONASS/BeiDou/Galileo-based navigation is useful in a conflict with a technologically unsophisticated adversary. On the other hand, to be ready for a conflict with a technologically advanced adversary, one needs missiles equipped with TAINS and DSMAC.

## Missiles that employ TERCOM navigation

The cruise missiles that employ a TERCOM system include:
* Supersonic Low Altitude Missile project (early version of TERCOM was slated to be used in this never-built missile)
* AGM-86B (United States)
* AGM-129 ACM (United States)
* BGM-109 Tomahawk (some versions, United States)
* C-602 anti-ship & land attack cruise missile (China)
* Kh-55 Granat NATO reporting name AS-15 Kent (Soviet Union)
* Newer Russian cruise missiles, such as Kh-101 and Kh-555 are likely to have TERCOM navigation, but little information is available about these missiles
* C-802 or YJ-82 NATO reporting name CSS-N-8 Saccade (China) – it is unclear if this missile employs TERCOM navigation
* Hyunmoo III (South Korea)
* DH-10 (China)
* Babur (Pakistan) land attack cruise missile
* Ra'ad (Pakistan) air-launched cruise missile
* Naval Strike Missile (anti-ship and land attack missile, Norway)
* SOM (missile) (air-launched cruise missile, Turkey)
* HongNiao 1/2/3 cruise missiles
* 9K720 Iskander (short-range ballistic missile and cruise missile variants, Russia)
* Storm Shadow cruise missile (UK/France)