Skip to content

This project aims to implement GPS positioning from scratch with some simplifying assumptions.

License

Notifications You must be signed in to change notification settings

NoahFeldt/GPS-From-Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPS-From-Scratch

This project aims to implement GPS positioning from scratch with some simplifying assumptions.

Prerequisites

The scripts in this project depend on the pyrtcm library for parsing the RTCM3 messages, which is installed with:

pip install pyrtcm

The project also depends on the numpy library for vector and matrix operations:

pip install numpy

For plotting graphs matplotlib is used:

pip install matplotlib

And finally, basemap is used to plot data on maps:

pip install basemap

Usage

To run this project, place your RTCM file in the "data" directory and run the Python file "gps_from_scratch.py" in the "src" directory. This action will create some plots from the data in the "plots" directory.

Explanation

GPS Signals

This project uses the RTCM3 protocol to encode the raw GPS data sent by the GPS satellites in messages 1002 and 1019.

Message 1002 contains information about the pseudorange, which is the approximate distance from the receiver to the satellites.

Message 1019 contains information about the orbit of the satellites, including the Keplerian elements used to calculate the position of the satellite at any given time.

Simplifying Assumptions

To implement GPS positioning in a more approachable manner, some simplifying assumptions were made:

  • Pseudoranges are not corrected for any error except for the clock bias in the receiver. Most importantly, this means that effects such as atmospheric effects are ignored.

  • The satellite orbits are based only on Kepler's laws and are not corrected. This means that relativistic effects on orbits are ignored, due to their eccentricity being more than zero.

  • The earth is assumed to be perfectly spherical with its center of mass in the center of the sphere, instead of approximating it as an ellipsoid. This simplification means there will be an error in mapping ECEF coordinates to spherical coordinates.

Results

The following map shows the distribution of calculated positions based on each measurement:

positions

As we can see, the points are scattered a lot due to our simplifying assumptions while being clustered around Denmark, where the RTCM data was recorded. Therefore, we know that we have successfully implemented the elementary mechanisms of GPS positioning.

This plot shows the raw pseudorange measurements of different GPS satellites during the recording. It is possible to see when satellites gain and lose connection to the receiver:

positions

This plot shows the extrapolated orbits in an ECI frame of the GPS satellites whose Keplerian parameters were received during the recording:

positions

See other plots in the "plots" directory.

About

This project aims to implement GPS positioning from scratch with some simplifying assumptions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages