In the present paper, the probability distribution function is derived for the sum of squares of random variables for nonzero expectations. This distribution function enables one to develop an efficient one-step algorithm for phase ambiguity resolution when determining the spatial orientation from signals of satellite radio-navigation systems. Threshold values for rejecting false solutions and statistical properties of the algorithm are obtained.