This proposal provides an approach to the problem of autonomous orbit and attitude control of satellites flying in formation. In this approach, the GPS data will be used for autonomous real-time estimation and closed-loop on-board feedback control of both the satellite orbit and attitude. While existing literature show some progress on modeling of formation flying dynamics with control law based on nearest neighbor-tracking, the implementation details of such control, including the method of obtaining necessary observational information for implementation have not been solved. Additionally, the control system proposed here not only maintains the formation pattern using GPS code pseudorange data, but also provides the attitude determination and control using GPS differential phase pseudorange. Because attitude dynamics and kinematics equations are nonlinear, one of the innovations being proposed is application of nonlinear control technique to solve the nonlinear feedback problem. The additional innovation is the unified architecture for orbti and attitude control system. This topic is in direct response to NASA GSFC's specific interest in advanced formation flying for its 'Mission to Planet Earth' Guidance, Navigation and Control need of the future.