A new computer-oriented algorithm GSO is presented for solving overdetermined systems of linear observation equations according to the principle of the least-squares method. The matrix of the system of observation equations may be of deficient rank. In this case the algorithm leads to the vector of unknowns with a minimum Euclidean norm. Alternatively, it is possible to minimize the norm of a subvector formed by a selected group of unknowns. The weight coefficient matrix, corresponding to the vector (subvector) of unknows, has the least possible trace. The algorithm GSO is based on the Gram-Schmidt Orthogonalization of suitably defined augmented matrices. The establishing and solving of normal equations is not necessary. Apart from the unknowns and residuals, GSO also determines the factorized weight coefficient matrices of the adjusted values.