To estimating the azimuth and elevation by long baselines, a method of direction finding based on module theory is presented. According to operation mode and condition for correct ambiguity resolution, the expressions for the probability of correctly resolving the ambiguity as a function of the phase errors are derived. Results of the Monte-Carlo experiments are given to confirm the correctness of the probability distribution function. Theoretical analysis and experiments show the method has high probability of correct ambiguity resolution and angular accuracy.