To satisfy need of high resolution observation from space. This article elaborates a method of high precision spacecraft formation control based on file diffraction theory. Improving the spacecraft control accuracy to millimeter is a challenge. With the method in this article this challenge can be solved. The algorithm in this article concerning the vibration of spacecraft and based on dynamic modeling of even relative quaternion theory deduced a method of attitude and orbit integrated control. Using this control algorithm to simulation can get the result that it can make the spacecraft integrate formation control as the technical basis of space high resolution observation.