Absolute or relative precise orbit determination (POD) is an essential prerequisite for many low earth orbit (LEO) missions. The POD of LEO satellites typically relays on processing the onboard global navigation satellite system (GNSS) measurements. The absolute POD is usually based on an ionosphere-free (IF) combination, and currently, integer ambiguity resolution (IAR) can be achieved only when external GNSS satellite phase bias (SPB) products are used. The use of these products is not flexible in multi-frequency/multi-constellation scenarios and is difficult to achieve in real-time missions. For relative POD, the double-differenced (DD) with IAR is the most general method. However, the differencing process amplifies observation noise and loses the opportunity to impose dynamic constraints on some eliminated parameters. In this contribution, based on the use of undifferenced and uncombined (UDUC) observations, a new model for both absolute and relative POD is proposed. In this model, the ambiguities of common-view satellites are constructed into DD form, thus IAR can be achieved without any external SPB products. Working with the UDUC observations, multi-frequency scenarios can be easily applied, and residuals can be separated for each frequency. In addition, with precise GNSS satellite clock/orbit products, both the absolute and relative orbits can be derived, which supports absolute and relative LEO POD. Based on onboard GPS observations of T-A and T-B satellites in formation flying, the performance of the UDUC POD model with DD ambiguity was evaluated. With the UDUC algorithm and IAR, the proposed model presented a consistency of 2.8–3.8 cm in 3D with the reference orbits, and the orbit difference was reduced by 16.3% and 10.6% for T-A and T-B compared with the IF-based POD, respectively. In addition, the relative orbit of the two satellites derived from the proposed model showed a consistency of 1.1–1.5 mm, which proved the feasibility of the UDUC POD model with DD ambiguity for formation flying missions.