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

Early TERCOM systems were used on missiles like the MGM-13 Mace. The Goodyear Aircraft Corporation developed ATRAN (Automatic Terrain Recognition And Navigation, a radar map-matching system) in which the return from a radar scanning antenna was matched with a series of "maps" carried on board the missile which corrected the flight path if it deviated from the film map. 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.

TERCOM navigation "maps" consist of a series of strips of land that the missile is expected to fly over, encoded as a series of altitudes. Since a radar altimeter measures distances, height over the ground, and not an absolute altitude, the maps generally encode a series of changes in altitude, not the absolute altitude itself. Additionally, the strips of land on either side of the expected path are also stored. 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.

The missile's radar altimeter feeds measurements into a smaller buffer, which 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 two are compared to overlay the buffer's strip on the known map, and the positioning of the strip within the map produces a location and direction. The guidance system can then use this information to correct the flight path of the missile.

During 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 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.

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.

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.

One disadvantage of TERCOM systems is that the entire route has to be pre-planned, including its launch point. If the missile is launched from an unexpected location or flies too far off-course, it will never fly over the features included in the maps, and become lost. The INS system can help in this regard, allowing it to fly to the general area of the first patch, but gross errors simply cannot be corrected. This makes TERCOM based systems much less flexible than more modern systems like GPS, which can be set to attack any location from any location, and does not require any sort of pre-recorded information which means they can be targeted immediately prior to launch.

Early cruise missiles did not have the mapping satellites to draw information from, and there were plans to use a TERCOM-like system based on photographs rather than elevations. A series of photographs taken from surveillance aircraft were put into a carousel in the missile, which were selected at timed intervals and imaged using a television camera. Another camera took pictures out of the bottom of the missile, imaged onto a similar display. A computer compared the two displays and attempted to line up areas of high contrast, similar to the contrast seekers used in the Maverick missile, and the offsets needed to align the two images could be decoded into a location and heading. However, this system proved to be very slow, and no such system was ever employed operationally, its role being taken up by TERCOM.

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 Digital Scene-Mapping Area Correlator (DSMAC). DSMAC systems are often combined with TERCOM as a terminal guidance system, allowing point attack with conventional warheads.

Yet another way to navigate a cruise missile is by using a satellite positioning system, such as GPS or GLONASS. Satellite navigation systems 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-based (or GLONASS-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.