In global navigation satellite system (GNSS) denied area, collaborative positioning precision is important for unmanned aerial vehicle (UAV) to perform collaborative tasks in Ad Hoc network. Continuous optimization of algorithm complexity and parameter setting has long been a focal point in the field of collaborative positioning research. An algorithm of UAVs collaborative positioning based on improved sequential quadratic programming (SQP) and unscented kalman filter (UKF) is proposed. By optimizing the parameter constraints of SQP, parameters are controlled within certain conditions. The convergence speed of SQP is improved, and more accurate filtering parameters are obtained. The improved SQP and UKF are combined to optimize the location data of UAVs, which improves the precision of collaborative positioning. The simulation results show that the positioning precision can be greatly enhanced by approximately 25% when using the proposed algorithm, as compared to the traditional algorithm. The influence of the collaborative UAV number also is simulated. The positioning performance improve slowly when more than five UAVs are used for collaborative positioning. Therefore, the positioning performance cannot be improved only by increasing the number of UAVs, but also by improving the performance of collaborative positioning algorithm.