The key problem of dynamic single epoch GPS positioning is the rapid decomposition of ambiguity. In some special dynamic positioning, the coordinates of the GPS receiver placed on the rover station often have the constraint condition, if this useful information is taken into account, it will help to determine the ambiguity accurately. For this reason, the straight motion trajectory of GPS receiver is used as the constraint condition for single epoch ambiguity resolution, in this algorithm, the wide lane ambiguities are calculated by using the MW combination, and the corresponding alternative combinations of wide lane ambiguity are established, which are determined according to the minimum residual sum of squares criterion firstly, it is used to lay the foundation for the subsequent L1 and L2 frequency ambiguity solution. And then the straight trajectory constraint condition and the phase observation equation are used to solve the integer ambiguity N1. When the constraint information of the trajectory is unknown, the space linear equation is established as the constraint condition according to the coordinate solution by wide lane relative positioning to solve the unknown problem. By designing the corresponding experiments, the results of this algorithm are proved to be feasible by using different experimental schemes, such as without constraint condition, the constraint condition with known prior information, introducing dynamic constraint condition and so on, to solve the ambiguity, and to compare and analyze the effect of linear constraint condition on single epoch ambiguity resolution.