to promote the free exchange of GPS data and fa- cilities the use of data from ..... [3] Kai Borre, The GPS Easy Suite-Matlab code for the. GPS newcomer, GPS ...
GPS Single Point Positioning and Velocity Computation from RINEX File under Matlab Environment Wen Zhang, National University of Defense Technology, China, and University of Leeds, UK Mounir Ghogho, University of Leeds, UK L. Enrique Aguado, Advanced Digital Institute, UK
BIOGRAPHY
at the Advanced Digital Institute in Bingley, UK. Before that he was Senior Research Fellow at the University of Leeds for 10 years, being Acting Director of the CAA Institute of Satellite Navigation from 2006 to 2007. Dr. Aguado has a PhD in Electrical Engineering from University of Manchester (UK) and a B.S., also in Electrical Engineering, from University of Mondragon (Spain).
Wen Zhang received a B.Sc. degree in Physics from Central China Normal University (CCNU), Wuhan, China in July 2003, and an M.S. degree in Optical Engineering from National University of Defense Technology (NUDT), Changsha, China, in December 2005. Now she is a Joint-training doctorate candidate at both the University of Leeds, UK and NUDT, under the supervision of Professor Mounir Ghogho, Dr. Luis Enrique Aguado and Professor Bolong Gao. Her research currently focuses on the GPS/INS Integration.
ABSTRACT Although there are some public Matlab codes for positioning using RINEX file as a kind of illustration under optimum conditions, velocity computation has never been done by those codes. To do this, detailed Matlab codes are proposed to perform GPS single point positioning and velocity computation from RINEX file under Matlab environment. Factors that affect the accuracy of the computation, such as satellite selection, ionosphere correction, satellite clock error calculation and correction, troposphere correction, and Earth rotation correction, have been considered in order to obtain accurate receiver position and velocity results.
Prof. Mounir Ghogho received the M.S. degree in 1993 and the PhD degree in 1997, both in Signal and Image Processing from the National Polytechnic Institute (INP), Toulouse, France. He was an EPSRC Research Fellow with the University of Strathclyde, Glasgow, from September 1997 to November 2001. Since December 2001, he has been a faculty member with the school of Electronic and Electrical Engineering at the University of Leeds, where he is currently a Professor. His research interests are in signal processing for communications and networking. He is currently an Associate Editor of the IEEE TRANSACTIONS ON SIGNAL PROCESSING and a member of the IEEE SPCOM and SPTM Technical Committees.
1
INTRODUCTION
The Global Positioning System (GPS) is widely used for civilian navigation, positioning, surveying and scientific applications. If coordinate determination procedure is performed with single GPS receiver, single point positioning procedure has to be taken into account. Single point positioning is the determi-
Dr. Luis Enrique Aguado has got over 15 years of research and project management experience in industrial and academic environments in the areas of satellite navigation and wireless communications. He is Sector Manager for the DSP Research Group 1
nation of the coordinates of a receiver with respect to the earth’s reference frame by intersection of the signals from four or more satellites (also referred to as absolute positioning or simply point positioning).
paper, we perform single point positioning and velocity computation from the corresponding RINEX O-file and N-file under Matlab environment. Pseudorange observations are used for positioning, while Doppler observations are used for velocity calculation. The computation is repeated over about 6200 continuous epochs. Each epoch is the result of an iterative least-squares procedure. Graphical results based on the data are illustrated. All the codes are written under Matlab environment.
RINEX, stands for Receiver INdependent EXchange format, is a set of standard definitions and formats to promote the free exchange of GPS data and facilities the use of data from any GPS receiver with any post processing software package. And it is designed to evolve over time, adapting to new types of measurements and new satellite navigation systems. The format includes definitions for four fundamental GPS observations: GPS time, carrier phase, Doppler frequency, and pseudorange. The two main RINEX files are Observation Data File (O-file) and Navigation Message File (N-file). This kind of format allows the user to post-process the received data (usually with other data unknown to the original receiver, such as better models of the atmospheric conditions at time of measurement) to produce a more accurate solution. The most common version at present is 2.10 [1], which enables storage of measured pseudorange, carrier phase and Doppler systems for GPS, GLONASS, EGNOS and WAAS, simultaneously. RINEX version 3.00 [2] has been submitted and is capable of new measurements from advanced GPS or Galileo systems.
In this paper, first, the principle of single point positioning and velocity computation are introduced. Second, the RINEX file and the definition of the GPS observations, including Time, Pseudorange, Phase, Doppler, are described. And two examples of snapshots of GPS Observation Data File and GPS Navigation Message File are illustrated. Third, a system flow chart of the position and velocity computation is described in detail. Fourth, results of data processing are showed and plotted. Finally, conclusion are provided.
2
SINGLE POINT POSITIONING AND VELOCITY COMPUTATION
Today, GPS aims to provide continuous 24 hours a day and 365 days a year 3-Dimensional positioning whether realtime or post processing at any location all over the world. GPS is based on the pseudorange measurements which will be explained in Section 3.2. Because the receiver clock is not synchronized with the satellite clock, this synchronization is the reason for the term ”pseudorange” which measured via code and/or carrier phase. So, normally at least four satellites have to be observed at the same time to determine the 3D position and receiver clock bias, which is showed in Figure 1, where SV1, SV2, SV3, and SV4 are four satellites, ρ1r to ρ4r are pseudoranges from corresponding satellites to receiver r. GPS also provides the capability for determining 3D receiver velocity. Several methods can be used. In some receivers, velocity is estimated by forming an approximate derivation of the receiver position. In many modern GPS receivers, velocity measurements are made by processing carrier phase measurements which effectively estimate the Doppler frequency of the received satellite signals. The Doppler shift is produced by the relative motion of the satellite with
The data post processing environment chosen in this paper is Matlab. The Matlab computing environment has become a popular way to perform complex matrix calculations, and to produce sophisticated graphics output in a relatively friendly easy manner. Large collections of Matlab scripts are now available for a wide variety of applications and are often used for university courses. The final output of a navigation receiver is usually its position, speed or other related physical quantities. However, the calculation of these quantities are based on a series of measurements from four or more satellite constellations. Although position and velocity are easily obtained in real time for almost all hardware receivers, in many cases it is interesting to store intermediate measures for later use. RINEX is the standard format that allows the management and disposal of the measures generated by a receiver, as well as their offline processing by a multitude of applications, whatever the manufacturer of both the receiver and the computer application. Here in this
2
Phase, and Doppler [1]. Here are two examples of snapshot for GPS Observation Data File (illustrated in Figure 2) and GPS Navigation Message File (illustrated in Figure 3).
3.1 Time The time of the measurement is the receiver time of the received signals. It is identical for the phase and range measurements and is identical for all satellites observed at that epoch. It is expressed in GPS time (not Universal Time). Figure 1: GPS Single Point Positioning
3.2 respect to receiver. The satellite velocity is computed using ephemeris information and an orbital model that resides within the receiver. At the receiver antenna, the received frequency, fR , can be approximated by the classical Doppler equation as follows: [4] (vs − vr ) · a ) (1) fR = fT · (1 − c Where fT is the known transmitted satellite signal frequency; vs is the velocity of the satellite and vr is the velocity of the receiver, both referenced to ECEF frame; a is the unit vector pointing along the line-ofsight from the receiver to the satellite; and c is the speed of propagation. The Doppler offset due to the relative motion is obtained from those relations as: (vs − vr ) · a ∆f = fR − fT = −fT · c
Pseudorange
The pseudorange ρ is the distance from the receiver antenna to the satellite antenna including receiver and satellite clock offsets (and other biases, such as atmospheric delays): ρ = r + c · (dti − dtp + dt)
(3)
where r is the geometry distance from satellite to receiver, dti is the receiver clock offset, dtp is the satellite clock offset, dt is other bias, and c is the speed of propagation. So that the pseudorange reflects the actual behavior of the receiver and satellite clocks. It is stored in units of meters.
3.3 Phase
(2)
The phase is the carrier phase measured in whole cycles at both L1 and L2. The half-cycles measured by squaring-type receivers must be converted to whole cycles and flagged by the wavelength factor in the header section. The phase changes in the same sense as the range. The phase observations between epochs must be connected by including the integer number of cycles. The phase observations will not contain any systematic drifts from intentional offsets of the reference oscillators.
There are several approaches of obtaining receiver velocity from the received Doppler frequency. One technique described here assumes that the receiver position has been determined, while the satellite position and velocity can be calculated from the RINEX Navigation Message File. And then we can apply least-square method to determine the receiver velocity. About how to determine satellite velocity from the broadcast ephemeris data, please resort to the method describe in [5].
The observations are not corrected for external effects like atmospheric refraction, satellite clock offsets, etc. If the receiver or the converter software adjusts the measurements using the real-time-derived receiver clock offsets dti , the consistency of the 3 quantities (phase, pseudorange and epoch) must be maintained, i.e. the receiver clock correction should be applied to all 3 observations:
3 RINEX FILE: DEFINITION OF THE GPS OBSERVATIONS GPS observations include four fundamental quantities that need to be defined: Time, Pseudorange, 3
Figure 2: Example of GPS Observation Data File
Figure 3: Example of GPS navigation message file
4
tcorr = ti − dti
(4)
ρcorr = ρi − c · dti
(5)
pcorr = pi − f · dti
(6)
where ti is the real time, dti is the receiver clock offset, ρi is the real time pseudorange, pi is the real time phase, tcorr is the corrected time, ρcorr is the corrected pseudorange, pcorr is the corrected phase, f is the carrier frequency, and c is the speed of propagation.
3.4 Doppler Doppler is the ∆f expressed in Equation (2). The sign of the Doppler shift as additional observable is defined as usual: Positive for approaching satellites, while negative for the receding satellites.
4 SYSTEM FLOW CHART We compute a receiver’s ECEF position and velocity from its corresponding RINEX o- and n-files applying pseudorange and Doppler observations. Figure 4 shows the flow diagram of the position and velocity computation.
Figure 4: Flow diagram for the position and velocity computation
First the RINEX n-file is read and the ephemeris is stored in a matrix. Then one epoch of the pseudorange and Doppler observations are read from the RINEX o-file. If for some reason the ephemeris for a certain satellite is not available, the pseudorange is excluded from the computation. Ionospheric effect is corrected using both the pseudorange observations of L1 and L2: ρiono f ree =
ρL2 − (fL1 /fL2 )ρL1 1 − fL1 /fL2
be calculated after receiver position is known. Until now, we know satellite positions and velocities, receiver position, line-of-sight vectors from satellites to receiver, and Doppler frequency observations, so receiver velocity can be calculated applying Equation (2) and using least-square method to get an optimum result. Save all the results to a file using append mode. Check if the current epoch is the last one or if we are reaching the end of the RINEX files, if no, read the next epoch of the RINEX o-file and repeat the procedure above; if yes, end the program and plot the results. As mentioned here, part of the Matlab M-file are modified from [6].
(7)
Satellites position, velocity and clock error are computed from the ephemeris at this epoch and then following receiver position, satellites elevation angle, azimuth angle and DOP. And they are calculated once again after the satellite selection procedure is carried out on the basis of the former elevation angle and thus more accurate results can be obtained therefore. Troposphere correction and Earth rotation correction are considered. All subsequent computations of position and velocity will exclude pseudoranges from satellites with elevation angle lower than the settled mask value. Line-of-sight vector can then
5
RESULTS OF DATA PROCESSING
Here are the results of data processing. The example data set was collected using Leica 1200 GPS 5
Receiver. The computation is repeated over 6200 epochs. Each position is the result of an iterative least-squares procedure. At the end of the computation, the ECEF coordinates are transformed to World Geodetic Coordinate Systems 1984.
East/North/Up Position Error East(m)
5
MEAN = −0.22455
−5
0
North(m)
5
The horizontal variation of the calculated position relative to the reference position is shown in Figure 5. The x-axis is the east position error and the y-axis is the north position error. The variation in coordinate values has the statistical results that the mean value is 1.666m, the standard deviation is 0.861m and the root mean square is 1.876m. Figure 6 shows
RMS = 0.97871
1000
2000
5000
6000
5000
6000
2000 3000 4000 5000 Time step number (time step = 1 seconds)
6000
MEAN = 0.80784
3000
STD = 1.3812
4000 RMS = 1.6001
0 −5
0
10 Up(m)
STD = 0.9526
0
1000
2000
MEAN = −0.9754
3000
STD = 2.1887
4000 RMS = 2.3962
0 −10 −20
0
1000
Horizontal Position Error 6
Figure 6: East/North/Up Position Error MEAN = 1.6662
STD = 0.86122
RMS = 1.8756
4 Horizontal(m)
2
0
MEAN = 1.6662
4
STD = 0.86122
RMS = 1.8756
2 0
0
1000
2000
3000
4000
5000
6000
5000
6000
2000 3000 4000 5000 Time step number (time step = 1 seconds)
6000
15 −2
Vertical(m)
North Position Error, in meters
Magnitude of Position Errors 6
−4
MEAN = 1.8869
−2 0 2 East Position Error, in meters
4
3Dimensional(m)
−4
6
Figure 5: Horizontal Position Error the East, North, Up errors according to time separately. The statistics (mean, standard deviation and root mean square) of East, North, Up position errors are showed in Table 1. Figure 7 shows the
RMS = 2.3961
5 0
−6 −6
STD = 1.4768
10
0
1000
2000
3000
4000
15 MEAN = 2.7594
10
STD = 1.2826
RMS = 3.0429
5 0
0
1000
Figure 7: Magnitude of Position Error standard deviation and root mean square) of Ground and Up velocity errors are showed in Table 3.
Table 1: Statistics of East/North/Up Position Error Error(m) East North Up
MEAN -0.225 0.808 -0.975
STD 0.953 1.381 2.189
6
RMS 0.979 1.600 2.396
CONCLUSION
In this paper, GPS single point positioning and velocity computation is carried out from RINEX file under Matlab Environment. Velocity computation is first implemented here. Detailed Matlab codes are provided to perform more accurate results. Factors that affect the accuracy of the computation, such as satellite selection, ionosphere correction, satellite clock error calculation and correction, troposphere correction, and Earth rotation correction, are all considered in order to obtain better position and velocity results.
magnitude of position errors for Horizontal (East and North directions), Vertical (Up direction), 3Dimentional (East, North and Up direction) separately. The statistics (mean, standard deviation and root mean square) of Horizontal, Vertical, 3Dimensional position errors are showed in Table 2. Figure 8 shows the velocity errors for Ground (East and North direction) and Up speed separately. The statistics (mean, 6
[3] Kai Borre, The GPS Easy Suite-Matlab code for the GPS newcomer, GPS Solutions(2003)7:47-51
Table 2: Statistics of Magnitude of Position Errors Error(m) Horizontal Vertical 3Dimensional
MEAN 1.666 1.877 2.759
STD 0.861 1.477 1.283
RMS 1.876 2.396 3.043
[4] Elliott D. Kaplan, Christopher J. Hegarty, Understanding GPS: Principles and Applications (2nd Edition), Artech House Publishers, Norwood, MA, 2006. [5] Wen Zhang, Mounir Ghogho, L. Enrique Aguado, Extension of GPS Broadcast Ephemeris to Determine Satellite Velocity and Acceleration, ENC-GNSS 2009, Naples, Italy, 3-6 May 2009
Ground/Up Velocity Error
Ground(m/s)
0.2 MEAN = 0.015645
0.15
STD = 0.0095364
RMS = 0.018322
[6] Kai Borre, Dennis M. Akos, Nicolaj Bertelsen, Peter Rinder, and Søren Holdt Jensen, A Software-Defined GPS and Galileo Receiver: Single-Frequency Approach. Birkhuser, Boston, MA, 2006
0.1 0.05 0
0
1000
2000
3000
4000
5000
6000
0.3 MEAN = 0.00022117
Up(m/s)
0.2
STD = 0.031182
RMS = 0.031183
0.1 0 −0.1 −0.2
0
1000
2000 3000 4000 5000 Time step number (time step = 1 seconds)
6000
Figure 8: Ground/Up Velocity Error
ACKNOWLEDGMENTS The first author would like to thank Chinese Scholarship Council which sponsors her studies in the UK. Many thanks to Institute of Engineering Surveying and Space Geodesy (IESSG), University of Nottingham for arranging the field experiment and providing corresponding raw data.
References [1] Werner Gurtner, RINEX: The Receiver Independent Exchange Format Version 2.10, 10th December, 2007, ftp://igscb.jpl.nasa.gov/pub/data/format/rinex210.txt [2] Werner Gurtner, RINEX: The Receiver Independent Exchange Format Version 3.00, 28th November, 2007, ftp://epncb.oma.be/pub/data/format/rinex300.pdf
Table 3: Statistics of Velocity Errors Error(m/s) ground Up
MEAN 0.016 0.0002
STD 0.010 0.031
RMS 0.018 0.031
7