Technical Details of the Calculation Process

⏱️ 2 min read 📚 Chapter 6 of 15
101010 110011 001100

The linearization process that allows GPS equations to be solved deserves deeper examination. The true distance equation √[(x - x_sat)² + (y - y_sat)² + (z - z_sat)²] = measured_distance is nonlinear due to the square root and squared terms. Solving four such equations simultaneously is mathematically complex. Instead, receivers use Taylor series expansion around an approximate position to create linear equations. The partial derivatives of the distance equation with respect to x, y, and z give the direction cosines—unit vectors pointing from the approximate position toward each satellite. These linearized equations can be written in matrix form as HΔx = Δρ, where H is the geometry matrix, Δx is the position correction, and Δρ is the difference between measured and calculated ranges.

The geometry matrix H is crucial for understanding GPS accuracy. Each row contains the direction cosines to one satellite plus a 1 for the clock term. The matrix (H^T H)^(-1) appears in the position solution, and its diagonal elements determine the accuracy in each direction. The inverse exists only if the satellites aren't coplanar with the receiver—another reason why satellite geometry matters. The condition number of this matrix indicates how sensitive the solution is to measurement errors. Poor satellite geometry results in a poorly conditioned matrix where small measurement errors cause large position errors.

Least-squares estimation becomes essential when more than four satellites are visible. The overdetermined system of equations generally has no exact solution due to measurement errors, so receivers find the position that minimizes the sum of squared residuals—the differences between measured and calculated ranges. This is accomplished using the normal equation: x = (H^T W H)^(-1) H^T W ρ, where W is a weighting matrix. Sophisticated receivers weight measurements based on signal quality, elevation angle (low satellites have more atmospheric error), and signal-to-noise ratio. This weighted least squares approach can improve accuracy by 20-30% compared to treating all measurements equally.

Modern receivers employ Kalman filtering to smooth position calculations over time. The Kalman filter is a recursive algorithm that maintains a state estimate (position, velocity, and clock parameters) and its uncertainty (covariance matrix). Each new GPS measurement updates this estimate optimally, considering both the measurement uncertainty and the predicted state uncertainty. The filter naturally handles the dynamics of moving receivers, using velocity to predict future positions and detecting unrealistic jumps. For stationary receivers, the filter can average positions over time, reducing random errors while quickly responding to actual movement.

Error detection and correction algorithms add robustness to GPS calculations. Receiver Autonomous Integrity Monitoring (RAIM) uses redundant satellite measurements to detect faulty satellites. If five or more satellites are available, the receiver can detect if one is providing bad data by checking if the position residuals exceed expected values. With six or more satellites, the faulty satellite can be identified and excluded. Advanced receivers use multiple hypothesis testing, calculating positions using different satellite subsets and choosing the most consistent solution. These techniques are essential for safety-critical applications where a wrong position could have serious consequences.

Key Topics