First draft of GPS

The code is incomplete still need to work on it.