MAX-DOAS measurements rely on precisely knowing the viewing geometry of the telescope. This is a challenge when the instrument is deployed aboard a moving platform such as aircraft and ship. The viewing geometry of the telescope needs to be isolated from any platform movements. We have developed a motion compensation system to actively correct the telescope position for platform movements in real-time and hence effectively isolate the telescope system. It consists of a small robust Global Positioning System based Inertial Navigation System (INS) sensor that accurately provides 3-dimensional position, time, velocity and attitude of the platform at a very fast rate. This information is processed by our LabVIEW software into the coordinate system along the horizon and corrects the telescope position for platform movements. This motion compensation system has been successfully deployed as a part of the CU AMAX-DOAS instrument on both the NOAA Twin Otter and NSF/NCAR GV research aircrafts.