GPS Toolbox

Toolbox for static GPS positioning using RINEX/SP3 data and single-station or double-difference workflows

You are now following this Submission

This MATLAB GPS Toolbox covers broadcast orbit computation, static single-station positioning, and double-difference relative positioning.
Broadcast orbits. ECEF satellite positions are computed from RINEX broadcast navigation files. One test compares broadcast orbits with precise IGS SP3 positions at each SP3 epoch; another evaluates broadcast orbits at each ephemeris Toe without SP3. Inputs are auto-detected in the script directory. Both scripts share the same nearest-ephemeris selection and propagation path, so the same PRN and GPS time yield identical broadcast ECEF coordinates.
Static single-station positioning. WGS-84 receiver position and a GPS-time clock offset are estimated from GPS code observations and broadcast ephemerides. RINEX 2.x/3.x observation and navigation files are supported, including Hatanaka CRINEX. When phase matching is available, dual-frequency carrier smoothing is applied; iterative weighted least squares is used at each epoch, then all valid epochs are combined in a robust joint static adjustment that estimates one common receiver position and one receiver-clock bias per epoch. A related short-session path forms ionosphere-free code and carrier-phase combinations and runs parallel broadcast and precise-orbit code solutions. The reported result keeps the horizontal coordinates from the RINEX APPROX POSITION XYZ header. It estimates a vertical correction by inverse-variance fusion of the broadcast and precise-clock SP3 code solutions.
Double-difference relative positioning. Accurate static positions for two GPS stations are estimated by DD relative positioning. Undifferenced residuals (zdres), common-satellite selection (selsat), DD residuals (ddres), and DD covariance (ddcov) follow RTKLIB 2.4.3 and are combined with the existing RINEX/SP3/atmosphere stack. Default stations are rover AMC4 and base NIST (~147 km). The bundled driver processes a one-hour, 30-second data set (120 epochs). By default, NIST is held fixed at its RINEX APPROX POSITION XYZ during the DD WLS (optional single-station base refinement is off). AMC4 is estimated by batch ionosphere-free code+phase DD float WLS (RTKLIB IONOOPT_IFLC). After solving, a free-network datum translation splits the residual between both RINEX approximate coordinates while preserving the DD baseline. Absolute coordinates, baseline length, and baseline ENU are reported.
Shared data handling (relative module). Hatanaka CRINEX (.crx) is decompressed automatically. RINEX 2.x/3.x observation and navigation files are supported for GPS. Mixed multi-GNSS BRDC navigation files are accepted, but only GPS ephemerides and GPSA/GPSB Klobuchar parameters are retained. Orbits prefer a local IGS SP3 file when available and otherwise use broadcast ephemerides. Local ANTEX corrections include receiver PCO/PCV and satellite APC plus nadir-dependent PCV. BLQ ocean-loading coefficients are applied only when both stations have entries; otherwise, ocean loading is skipped for both to avoid an asymmetric correction.
  1. Biagi, L., and Caldera, S. “An Efficient Leave-One-Block-Out Approach to Identify Outliers.” Journal of Applied Geodesy, 2013.
  2. Boehm, J., Heinkelmann, R., and Schuh, H. “Global Pressure and Temperature GPT: A Global Tropospheric Delay Model Based on Numerical Weather Model Data.” Journal of Geodesy, 2007.
  3. GPS.gov. Global Positioning System Standard Positioning Service Performance Standard, 5th ed., 2020.
  4. Hilla, S. The Extended Standard Product 3 Orbit Format SP3-c. National Geodetic Survey / International GNSS Service.
  5. IERS. IERS Conventions 2010: Solid Earth Tides Degree-2 Love Numbers, 2010.
  6. Interface Control Working Group. IS-GPS-200: Navstar GPS Space Segment/Navigation User Segment Interfaces, Revision N, 2022.
  7. Kaplan, E. D., and Hegarty, C. J., eds. Understanding GPS/GNSS: Principles and Applications, 3rd ed., Artech House, 2017.
  8. Misra, P., and Enge, P. Global Positioning System: Signals, Measurements, and Performance, 2nd ed., revised, Ganga-Jamuna Press, 2010.
  9. Niell, A. E. “Global Mapping Functions for the Atmosphere Delay at Radio Wavelengths.” Journal of Geophysical Research, 1996.
  10. Realini, E., and Reguzzoni, M. “goGPS: Open Source Software for Enhancing the Accuracy of Low-Cost Receivers.” Measurement Science and Technology, 2013.
  11. Takasu, T. RTKLIB: An Open Source Program Package for GNSS Positioning, version 2.4.3.

Cite As

Meysam Mahooti (2026). GPS Toolbox (https://ch.mathworks.com/matlabcentral/fileexchange/184279-gps-toolbox), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0

"GPS Broadcast Orbits" was added, and "GPS Receiver Position" was modified.

1.0.0