An Algorithm for Least-Squares Estimation of Nonlinear Parameters