Mapping
The spacecraft circled Mars once every 117.65 minutes at an average altitude of 378 kilometers (235 mi). It is in a near polar orbit (inclination = 93°) which is almost perfectly circular, moving from being over the south pole to being over the north pole in just under an hour. The altitude was chosen to make the orbit sun-synchronous, so that all images that were taken by the spacecraft of the same surface features on different dates were taken under identical lighting conditions. After each orbit, the spacecraft viewed the planet 28.62° to the west because Mars had rotated underneath it. In effect, it was always 14:00 for Mars Global Surveyor as it moved from one time zone to the next exactly as fast as the Sun. After seven sols and 88 orbits, the spacecraft would approximately retrace its previous path, with an offset of 59 km to the east. This ensured eventual full coverage of the entire surface.
In its extended mission, MGS did much more than study the planet directly beneath it. It commonly performed rolls and pitches to acquire images off its nadir track. The roll maneuvers, called ROTOs (Roll Only Targeting Opportunities), rolled the spacecraft left or right from its ground track to shoot images as much as 30° from nadir. It was possible for a pitch maneuver to be added to compensate for the relative motion between the spacecraft and the planet. This was called a CPROTO (Compensation Pitch Roll Targeting Opportunity), and allowed for some very high resolution imaging by the onboard MOC (Mars Orbiting Camera).
In addition to this, MGS could shoot pictures of other orbiting bodies, such as other spacecraft and the moons of Mars. In 1998 it imaged what was later called the Phobos monolith, found in MOC Image 55103.
Read more about this topic: Mars Global Surveyor