When determining attitude and relative position of formation constellation using carrier-phase differential GPS (CDGPS), the difference measurements of intra-satellite and inter-satellite must be combined to entirely resolve the states, because the states of the satellites are coupled and the difference measurements are correlative to each other. This paper presents a mathematical model of determining the attitudes and relative positions, which combining with intra-vehicle and inter-vehicle differential measurements, and using three-dimensional net constraint from inter-vehicle differential measurements. The mathematical simulation results show the feasibility of the method.