For the linear and nonlinear parameters that can be separated in the spatial Cartesian coordinate transformation model, we use the variable projection algorithm in this paper to represent the linear parameters with nonlinear parameters, which are transformed into least squares problems with only nonlinear parameters. We simplify the matrix of the nonlinear function by the Gram-Schmidt orthogonalization method, and combine the nonlinear least squares iterative method with the Levenberg-Marquardt (LM) algorithm to solve for the coordinate transformation parameters. Experiments are carried out by solving for the coordinate transformation parameters of the independent spatial Cartesian coordinate system and the CGCS2000 coordinate system. We compare the solution results of the four methods (parameter non-separation method, traditional variable projection method, variable projection method based on QR decomposition, and variable projection method based on Gram-Schmidt orthogonal decomposition) with respect to the calculated results, the number of iterations and the computation time. The experimental results show that the proposed method in this paper requires a lower computation time and achieves higher computational efficiency when obtaining the same solution results and with the same number of iterations.