Calculating Place from Uncooked GPS Information
We’re all conversant in GPS (International Positioning System) and its myriad functions. From getting instructions utilizing Google maps to hailing a experience utilizing a experience sharing app, numerous people and companies depend on correct place estimation utilizing GPS. Place estimation utilizing GPS is now so correct that GPS is getting used for measuring plate tectonics and continental drift. Certainly, GPS is a lot part of our lives that few of us cease and surprise the way it really works. The aim of this put up is to indicate you the way. Extra particularly, we’ll first find out how place is calculated from vary measurements to GPS satellites after which take into account a concrete instance the place we’ll course of uncooked knowledge collected by a industrial GPS receiver to acquire consumer place estimates.
GPS is owned by the US authorities and operated by the US air pressure. As such, entry to GPS knowledge may be degraded or denied to different nations as a result of geopolitical issues. For instance, in line with this wikipedia article, entry to GPS knowledge was denied to the Indian navy throughout the Kargil battle. Different international locations subsequently determined to implement their very own GPS like methods. Examples are GLONASS by Russia, Galileo by the European Union and BeiDou by China. This may increasingly appear to be a waste of sources, however many of those methods function utilizing the identical requirements as GPS and are interoperable. For instance, newest GPS receivers can obtain indicators from each GPS and GLONASS satellites, bettering positioning accuracy. The wikipedia article referenced above additionally gives an fascinating historical past of the origins of the GPS system courting again to Sputnik, the primary artificial satellite tv for pc launched in area.
The put up is split into 3 elements – the primary half describes the varied coordinate methods used to specific place. An understanding of those coordinate methods is important for understanding how GPS works and is beneficial in its personal proper. For instance, the idea of top above the earth floor is one thing that folks intuitively perceive, however seems to be tough concept to exactly outline. The second half describes the essential precept of triangulation utilized by GPS to calculate place and develops the arithmetic for calculating the consumer place from satellite tv for pc measurements. An off-the-cuff consumer, taken with a normal data of how GPS operates however not within the particulars can learn half 1 and the primary few sections of half 2 earlier than the maths begins. Lastly, the appendix gives the Matlab code for implementing varied concepts mentioned on this put up.
Many of the data on this put up derives from the ebook “International Positioning Programs: Alerts, Measurements and Efficiency” 1, a superb ebook about GPS methods. The matlab code introduced on this put up was written as options to the assorted finish of chapter issues within the ebook. I additionally make use of fabric within the GPS Interface Specification doc2. My contribution is to current the keys concepts associated to GPS in a (hopefully) clear and concise method and present the Matlab code that implements the positioning algorithms on actual world knowledge collected utilizing industrial GPS receivers that may be bought from the web. After studying this put up, an off-the-cuff reader ought to have a greater understanding of GPS, so the subsequent time they use Google maps on their cellphone, they’re conscious of the wonderful technical infrastructure that makes positioning and navigation functions doable. A extra technical reader ought to be capable of replicate my experiments by gathering their very own knowledge and working the Matlab code.
Half 1
The basic activity of a GPS system is to calculate place. To take action, we should first outline what place means. Most individuals take into consideration latitude/longitude and top when they consider place. Whereas latitude/longitude are helpful to signify a place on the earth floor, they aren’t appropriate for mathematical calculations as they don’t present a cartesian coordinate system. The bodily distance represented by a unit distinction between two longitudes isn’t fixed, and depends upon the place. For instance, the space between two longitudes one diploma aside is biggest on the equator and approaches 0 on the poles.
To be helpful for mathematical calculations, a coordinate system the place a unit distinction between coordinates represents a relentless bodily distance is required. A household of such coordinate methods may be created by defining a set of perpendicular axes intersecting at an origin that’s rigidly connected to the earth. Such coordinate methods are referred to as “ECEF” (Earth Centered, Earth Fastened). These coordinate methods work nicely to specific the place of a consumer on earth as they rotate with the earth and the place of a stationary consumer on the earth floor is fixed.
Essentially the most generally used ECEF coordinate system is known as the WGS 1984 system developed by the division of protection. WGS 84 is an ECEF body, outlined as follows:
- Origin on the middle of mass of the earth
- z axis passing by means of the CTP (Standard Terrestrial Pole). CTP is the typical of the earth’s pole’s place between the years 1900 and 1905. A mean must be used because the place of the pole isn’t mounted and wanders round in a circle of radius ~15m.
- x axis passing by means of the intersection of the CTP’s equatorial airplane and a reference meridian, usually referred to as the Imply Greenwich Meridian
ECEF frames are handy to signify positions with respect to the earth, however they aren’t inertial as they’re rigidly connected to a spinning earth. To formulate the issue of satellite tv for pc movement across the earth in accordance with Newton’s legal guidelines of movement, we’d like an inertial coordinate system wherein to specific acceleration, place and velocity vectors.
An inertial body may be outlined in a way much like the ECEF body besides that the x-axis factors to the vernal equinox (the route of intersection of the equatorial airplane of the earth with the airplane of the earth’s orbit across the solar). Strictly talking, this body isn’t inertial both because the earth is transferring across the solar. Nevertheless, it may be thought-about inertial over quick intervals (simply because the ECEF body may be thought-about inertial for analyzing the motion of a physique on earth over a brief interval).
In the remainder of this put up, we’ll be utilizing the WGS 84 ECEF body to specific the consumer and satellite tv for pc place. That is doable as a result of the GPS interface specification document (known as GPS-IS in the remainder of this put up) gives a step-by-step process to calculate the satellite tv for pc place within the ECEF body at a given time instantaneous that accounts for the non-inertial nature of the ECEF body. That is lucky as a result of ECEF frames are splendid to specific the place of a consumer on the floor of the earth as they rotate with the earth and thus the place of a stationary consumer is fixed, as one would anticipate. This could not be the case if an inertial reference body is used to specific place as such a body could be mounted in area, and thus would seem rotating with respect to the earth.
Let’s now flip to the difficulty of defining top that we alluded to earlier. The important thing query that must be answered when defining top is “with respect to what”? Take into account for instance the peak of a degree in a desert. If we outline top to be the space of the purpose from the “floor”, then such a top would change continuously as the extent of the bottom itself modifications as a result of pure phenomenon (for instance, the wind depositing extra sand). Thus, to outline top, we should first outline “floor” (observe that strictly talking, this subject doesn’t come up in a ECEF reference body, as all distances are measured with respect to the middle of mass of the earth. Nevertheless typically persons are not taken with distance from the middle of the earth, however from the native earth floor). To outline “floor” in a constant method, we’d like a mannequin for the floor of the earth. Two fashions are typically used:
Mannequin 1: Reference Ellipsoid
The floor of the earth is modeled as an oblate ellipse referred to as the “reference ellipsoid”, centered on the earth’s middle with the axis of revolution coincident with the z axis of an ECEF body. The lengths of the semi-major and semi-minor axes (denoted as and ) are and . As anticipated, the worth typically used for earth’s radius (with the earth modeled as a sphere) is 6371Km which lies between the lengths of the semi-major and minor-axis. The reference ellipsoid is merely an abstraction for the form of the earth. It doesn’t have any bodily significance. An precise level on the earth floor will normally lie above or beneath the reference ellipsoid.
Mannequin 2: Geoid
One other floor generally used to measure top that does have bodily significance is known as the geoid. This floor is outlined because the locus of all factors with the identical worth of the gravitational potential. If the earth was a sphere with a uniform composition, this floor could be an everyday floor that may be parameterized as a mathematical operate. Nevertheless because the earth is neither spherical nor uniform, the geoid is normally specified as a sequence of heights above the reference ellipsoid. Top relative to the geoid is known as the orthometric top, or top above the imply sea stage (MSL). This is smart as if the oceans lined the floor of the earth, the form of the oceans could be a detailed approximation to the geoid. Strictly talking, the form of the geoid itself isn’t mounted because the floor of the earth is consistently altering as a result of human actions and pure phenomenon. Nevertheless given the majority of the earth, these solely have a negligible affect on the earth’s gravitational area and thus on the form of the geoid.
Word that the peak of the geoid is specified with respect to the reference ellipsoid and the peak of a given level may be specified with respect to both. The connection between the ellipsoid, geoid and the precise floor of the earth is proven beneath.
Latitude and Longitude
Armed with an ellipsoidal illustration of the form of the earth and with an ECEF coordinate system, we will outline the place of a degree P in ellipsoidal coordinates (generally generally known as latitude, longitude and top) as follows:
- Geodetic Latitude (): angle measured within the meridian airplane by means of the purpose P between the equatorial airplane of the ellipsoid and the road perpendicular to the floor of the ellipsoid at P (optimistic north from the equator, damaging south)
- Geodetic Longitude (): angle measured within the equitorial airplane between the reference meridian and the meridian airplane by means of P (optimistic east from the zero meridian)
- Geodetic top (): measured alongside the traditional to the ellipsoid by means of P.
Word that the latitude is the angle between the equatorial airplane and the road perpendicular to the floor of the ellipse at level P, not the road becoming a member of level P and the earth middle (origin of the ECEF body). Angle between the equatorial airplane and the road becoming a member of level P and the earth middle is known as the geocentric (versus geodetic) latitude. If the earth have been an ideal sphere, the traditional to some extent would move by means of the earth middle and the geocentric and geodetic latitude would coincide.
Conversion between Geodetic (Ellipsoidal) and Cartesion Coordinates
Conversion from ellipsoidal to cartesian coordinates is simple and may be applied in a single step.
Going from cartesian to ellipsoidal is trickier and includes an iterative process that shortly converges. See Appendix 4.A of 1 for particulars. The corresponding Matlab code is listed in part 1.e of the appendix. The extra widespread use case is to transform ECEF coordinates to ellipsoidal because the enter and output of GPS processing algorithms are normally in ECEF coordinates.
Native Coordinate Programs
Up to now, we now have largely talked about “world” coordinate methods, centered on the earth middle. In some functions, it’s extra handy to make use of native coordinate methods, centered on the consumer’s place. These coordinate methods are referred to as East-North-Up (ENU) methods. Given the consumer’s place in elliptical coordinates (: latitude, : longitude), consumer coordinates may be simply transformed from a ECEF body to an area ENU body utilizing the next matrix multiplication.
We’ll see an utility of ECEF to ENU conversion once we compute the azimuth and elevation of one of many GPS satellites later.
Half 2: Utilizing GPS to Calculate Consumer Place
Figuring out the place of a consumer utilizing GPS is basically a triangulation downside. If the space of the consumer from three or extra satellites is thought, then the 3D place may be calculated utilizing triangulation. The fundamental concept in 2 dimensions is proven beneath.
The issue of finding the consumer can thus may be divided into two subproblems:
- Discovering the space of the consumer from every satellite tv for pc
- Figuring out the place of this satellite tv for pc within the consumer’s coordinate system
Let’s take a look at every of those issues step-by-step.
Step 1: Figuring out the Place of a Satellite tv for pc
The perfect satellite tv for pc orbit is an elliptical orbit and specified fully by 5 Keplerian parameters 5 of which decide the dimensions and form of the ellipse and the orientation of the orbital airplane relative to the mounted stars (i.e., an inertial reference body). The sixth parameter specifies the place of the satellite tv for pc at a specific time instantaneous of epoch. Given the six components, the satellite tv for pc place and velocity may be computed at another epoch.
The orbit of a satellite tv for pc isn’t a precise ellipse nevertheless because the earth isn’t uniform in composition and the motion of a satellite tv for pc is perturbed by the gravitational forces of the solar and the moon. The ensuing perturbations are small, however should be accounted for to acquire correct place. GPS accounts for these perturbations by transmitting an expanded set of 16 orbital parameters that can be utilized to precisely compute the place of a satellite tv for pc at a given time instantaneous. We gained’t go into the main points of how these corrections are utilized. The step-by-step process to compute the satellite tv for pc place (together with making use of the orbital corrections) is described in desk 20-IV within the GPS IS. The Matlab code that implements this process is proven in part 1.b of the appendix.
Rotating the Satellite tv for pc Reference Body
The consumer place is being calculated at time . The GPS sign left the satellite tv for pc at time and arrives on the consumer seconds later. Whereas calculating the consumer’s place, we’ll calculate the satellite tv for pc positions at , the time of sign transmission. In time interval nevertheless, the earth has rotated by the place is the rotation charge of the earth. We should rotate the satellite tv for pc place vectors by the identical quantity, in order that they’re expressed within the consumer’s reference body, i.e., ECEF body at time . That is carried out by multiplying the satellite tv for pc place vector by the next rotation matrix:
Word that that is not equal to calculating the place of the satellites at time !
Step 2: Computing the Distance of the Consumer from the Satellite tv for pc
The satellite tv for pc sign acquired by a GPS receiver bears the time stamp at which the sign was despatched from the satellite tv for pc. By taking the distinction between its personal time and the timestamp of the GPS sign and multiplying by the pace of sunshine, the receiver calculates a tough measure of the space between the receiver and the satellite tv for pc. This measure is known as the pseudorange. If the clock on the satellite tv for pc and the receiver have been completely in sync and the GPS sign traveled in a straight line on the pace of sunshine, then this measure could be the true distance between the satellite tv for pc and the receiver. This nevertheless isn’t the case and the distinction between the satellite tv for pc and consumer clocks in addition to the delays attributable to the environment should be modeled to calculate an correct place of the consumer.
Let’s take into account first the impact of the offset between the consumer and satellite tv for pc clocks. Let’s denote the transmission time from the satellite tv for pc to the consumer by and a standard time reference (known as GPS Time (GPST)) by . Denoting the receiver clock bias at time by and satellite tv for pc clock bias at time by , the pseudorange measured by the GPS receiver is given as:
(1)
If there wasn’t a layer of environment between the satellite tv for pc and the consumer, the satellite tv for pc sign would journey alongside a straight line with the pace of sunshine. Thus, the space to the satellite tv for pc at time denoted by could be equal to .
In actuality (fortunately), there’s thick layer of environment within the path of the satellite tv for pc sign which slows it down and bends its path. The change within the path size as a result of bending of the sign ray is usually not important. Nevertheless the change within the pace of propagation may be important and can lead to positioning errors of a number of meters or extra. This transformation in pace has two parts – arising from the propagation of the sign by means of the ionosphere and arising from the propagation of the sign by means of the troposphere (see appendix for extra details about these delays and the way they are often estimated). Thus,
Combining the above two equations and dropping the reference to measurement epoch ,
(2)
Thus, the true vary (precise distance of the consumer from a satellite tv for pc) may be calculated from the uncooked pseudo ranges output by the GPS gadget by first subtracting the consumer’s estimate of the Tropo and Iono delays after which adjusting for the satellite tv for pc clock offset. The Iono and the Tropo delay typically result in a place error of ~25m and ~2m respectively. Extra details about tips on how to estimate these delays are offered within the appendix. In the remainder of our evaluation on this weblog, we’ll ignore these delays.
Estimating the Satellite tv for pc Clock Bias
The satellite tv for pc clock bias is vital to estimate as it will possibly end result ready error of hundreds of meters. The process to calculate the satellite tv for pc clock bias is described on web page 96 of the GPS Interface Specification doc. The process consists of evaluating a polynomial whose coefficients are offered within the GPS ephemeris message and including a relativistic time period. The polynomial gives many of the correction, with the relativistic impact contributing about 1-10 m relying on the place of the satellite tv for pc. The code for calculating the satellite tv for pc clock bias is given in part 1.d of the appendix.
Consumer Clock Bias
The consumer clock bias is an unknown amount, similar to the consumer place. The consumer clock bias can be estimated together with the consumer place.
Step 3: Consumer Place and Clock Bias Estimation
We are actually prepared to have a look at the algorithm used to compute the consumer place. A fast level in regards to the notation earlier than we take a look at the maths. Usually, vector portions are expressed utilizing boldface () and scalar portions with out emphasis. Nevertheless within the math proven beneath, (largely as a result of laziness), I’m skipping making this distinction. I feel it’s clear from the context which portions are vectors and which of them should not.
As soon as the satellite tv for pc clock bias has been accounted for and all out there corrections have been utilized, the corrected pseudorange measurement for satellite tv for pc may be written as
(3)
Right here is the true distance between the consumer and the satellite tv for pc and denotes the mixed impact of the unmodeled errors. Word that every one components on this equation are distances. Now we have transformed the receiver clock bias right into a distance by multiplying by the pace of sunshine . Additionally observe that every one of those calculations are carried out at time and all place vectors are expressed within the ECEF body at time . We drop express reference to time for comfort.
Let the place of the consumer within the ECEF body be denoted by , and the place of satellite tv for pc by . Then,
and
We use to signify the consumer clock bias in models of distance
We want to decide and that reduce the distinction between the measured and the estimated pseudorange for every satellite tv for pc. In different phrases, our activity is to find out and such that
(4)
is minimized for all satellites .
This downside is solved utilizing an iterative process by beginning with an estimate of and and discovering the corrections that reduce the equation above. Let our preliminary estimates be denoted by and . We want to discover and such that the true consumer place and the true clock bias reduce
(5)
Right here is the unit vector from the consumer to satellite tv for pc and we used the Taylor sequence growth of the vector norm (see appendix) to specific the delta pseudorange as a matrix multiplication between recognized and unknown portions. Concatenating the linear equation developed above for satellites,
Setting
The expression above may be written extra compactly as
For a non-degenerate ( are non-coplanar) configuration of =4 satellites, the equation above may be solved instantly. Typically, if the sky isn’t obstructed, many extra satellites are seen, and a actual resolution isn’t out there. We will use linear algebra methods to discover a least squares resolution:
The hat above the estimated portions signifies that they’re a least squares resolution, not a precise resolution.
The whole process to calculate the consumer place and clock bias is as follows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Enter: Uncooked pseudoranges, satellite tv for pc ephemeris data
Output: Consumer place in ECEF and consumer clock bias
Initialize consumer clock bias = 0, consumer place = [0 0 0] (wonderful that this works!)
For every satellite tv for pc:
1. Calculate satellite tv for pc clock bias 2. Right measured pseudorange by the calculated satellite tv for pc clock bias 3. Apply ionospheric and tropospheric corrections if out there
Finish For
Do till change in consumer clock bias, consumer place < threshold
For every satellite tv for pc:
1. Right pseudorange by present estimate of the consumer clock bias 2. Calculate sign transmission time tau by dividing pseudorange by pace of sunshine 3. Calculate satellite tv for pc place at t-tau 4. Rotate satellite tv for pc place by earth’s rotation in time tau to align with consumer’s ECEF body at time t 5. Kind G matrix by concatenating unit vectors from the consumer to the satellite tv for pc 6. Calculate delta pseudoranges by taking the distinction between the corrected pesudorange (step 1) and anticipated pseudorange, given the present estimate of the consumer’s place and consumer clock bias Finish For
Clear up for corrections in consumer place and clock bias and calculate new consumer place and clock bias
Finish Do |
Word in regards to the Matlab Code
It’s value noting that whereas many of the equations within the Matlab code proven within the Appendix contain analysis of expressions the place the recognized portions are on the appropriate hand aspect and unknown portions on the left hand aspect (and thus may be evaluated in a single step), there are a couple of that requires invocation of a solver. One instance is the calculation of the eccentric anomaly (E) from the imply anomaly (M) required throughout the calculation of the satellite tv for pc place from ephemeris parameters. The relation between the 2 is expressed as:
the place is the eccentricity of the earth’s orbit. Sometimes, is calculated first, and calculating from can’t be carried out in closed kind and requires the usage of a solver. A part of the code is proven beneath.
|
% mk: Imply anomaly % remedy for eccentric anomaly syms E; eqn = E – eph.e*sin(E) == mk; solx = vpasolve(eqn, E); Ek = double(solx); |
Experimental Setup
On this part, I’ll describe the {hardware} setup I used to gather uncooked GPS knowledge which was then processed utilizing the algorithms described above to calculate consumer place and clock bias. An consumer ought to be capable of simply replicate my setup utilizing low cost and commercially out there GPS receivers and open supply software program.
The determine above reveals the primary steps concerned in my setup. For gathering uncooked GPS knowledge, particular GPS models that output “timing” data consisting of uncooked pseudoranges and satellite tv for pc ephemeris data should be used. Common GPS models calculate the consumer place internally and don’t output the uncooked knowledge we have to calculate the consumer place utilizing the algorithm described above. The NEO-M8T and 6T chips from u-blox match our wants. Full {hardware} assemblies with the GPS unit, antennae and serial output port may be bought from Amazon for ~40 {dollars}.
In an effort to obtain and save the uncooked GPS sign, I take advantage of the STRSVR utility in RTKLib (RTKLIB is an open supply program package deal for normal and exact positioning that helps all widespread International Navigation Satellite tv for pc Programs (GNSS) – GPS, Glonass, Galileo, Baidu and so on. See: http://www.rtklib.com). STRSVR takes the customized u-blox formatted output from the u-blox receiver and converts it into RTCM commonplace format. RTCM (Radio Technical Fee for Maritime Companies, see: http://www.rtcm.org/differential-global-navigation-satellite–dgnss–requirements.html) is a normal for GNSS knowledge and content material designed to assist a wide range of GNSS functions in air/land/sea navigation, surveying, radio navigation/location and so on.
RTCM commonplace gives the definition of varied messages that present particular GPS data. The data we’re taken with are the uncooked pseudoranges and satellite tv for pc ephemeris. This data is contained in messages 1002 and 1019.
We should request the u-blox receiver to ship 1002 and 1019 message data as a part of the info it sends to STRSVR. That is carried out through the use of the next instructions within the Cmd window:
The primary command units the replace charge to 1Hz and the opposite two allow RAW messages. The small print on how this occurs are a bit murky. I attempted going by means of elements of the UBX documentation to grasp this higher however quickly acquired misplaced. Suffices to say that the above instructions work and trigger the receiver to ship the info we’d like.
I configure the STRSVR utility to obtain knowledge from the serial port at 9600 Baud and save the info to a file in RTCM 3 format.
To gather the info, I went to the roof of my house constructing and positioned the GPS receiver at a location the place it may get an unobstructed view of the sky. I used the u-blox configuration software program (https://www.u-blox.com/en/product/u-center-windows) to confirm {that a} adequate variety of satellites have been seen and a superb place repair might be obtained. I then used STRSVR to gather about an hour of uncooked GPS knowledge and saved the info to a file.
Processing Uncooked GPS Information
STRSVR saves the uncooked GPS knowledge into binary RTCM3 format. We should decode the RTCM3 knowledge to create Matlab knowledge buildings out of it. I thought-about writing my very own RTCM decoder, however then discovered a superb Matlab library referred to as goGPS (http://www.gogps-project.org/about/) that gives many helpful routines to learn and course of GPS knowledge. I used the load_stream operate that reads an RTCM formatted file and extracts the RTCM messages (line 95 in my model of goGPS). I then saved the extracted knowledge to a .mat file to function enter to my the place calculation algorithm that implements the equations above. The Matlab code is proven within the part 1.a of the appendix. I’m additionally attaching the rtcm_data since many individuals have requested for it. I modified the file extension from .mat to .txt as a result of wordpress safety restrictions. Rename the file again to .mat whenever you obtain it.
Evaluation of Outcomes
On this part, I’ll analyze the positions and clock bias computed by my algorithms. We are going to take a look at the variation of the north/east/up parts of the place with time, variation of the clock bias with time and introduce the idea of Dilution of Precision (DOP), a standard metric used to measure the standard of GPS place estimates. Because the GPS receiver was stationary throughout knowledge assortment, the variation of the calculated place displays the true efficiency of the algorithm used to calculate the place.
East | North | Up | |
Std-Dev | 14.00 | 39.88 | 47.35 |
The plot of E/N/U parts of the consumer place in a consumer centered ENU body together with the place scatter plot are proven above. As anticipated, the variation in place is round 30m within the East and North route and barely greater alongside the Up route. We’ll clarify the rationale for this throughout the dialogue about DOP (Dilution of Precision) beneath.
Clock Bias Drift
The variation of the receiver clock bias towards time is proven beneath. Word that the clock bias used within the algorithm above is within the unit of distance. Within the plot beneath, the bias has been transformed into unit of time by dividing by the pace of sunshine.
We will see that the clock bias isn’t a relentless however drifts linearly with time. The quantity of drift is 4.27 e-7sec/sec.
Computing the Satellite tv for pc Azimuth/Elevation
As an train, let’s compute the azimuth and elevation of all of the satellites seen at a given time instantaneous. This may neatly tie in most of the concepts mentioned above and likewise present a superb segue to discussing DOP.
Azimuth and elevation angles are calculated from the attitude of the consumer. Thus, they’re expressed in an ENU body centered in regards to the consumer place.
If the place of the satellite tv for pc within the consumer centered ENU body is (), then the azimuth (az) and elevation (el) is given by:
The process to extract azimuth and elevation from satellite tv for pc and consumer positions (calculated within the ECEF body) is as follows:
- Calculate the place vector from the consumer to the satellite tv for pc (in ECEF body)
- Calculate the consumer place in Ellipsoidal coordinates (lat/lng)
- Rotate the place vector to the ENU body centered in regards to the consumer place
- Calculate azimuth/elevation utilizing equations above)
The Matlab code is proven beneath:
|
operate [az el] = get_satellite_az_el(xs,ys,zs,xu,yu,zu) % get_satellite_az_el: computes the satellite tv for pc azimuth and elevation given % the place of the consumer and the satellite tv for pc in ECEF % Utilization: [az el] = get_satellite_az_el(xs,ys,zs,xu,yu,zu) % Enter Args: xs,ys,zs: satellite tv for pc place in ECEF % xu,yu,zu: consumer place in ECEF % Output Args: azimuth and elevation
[lambda, phi, h] = WGStoEllipsoid(xu,yu,zu); lat = phi*180/pi; lng = lambda*180/pi; enu =Rotxyz2enu([xs–xu,ys–yu,zs–zu]‘, lat, lng); az = atan2(enu(1), enu(2)); el = asin(enu(3)/norm(enu)); % The azimuth and elevation finish |
The computed azimuth and elevations at a given epoch are proven within the desk and the corresponding 3D positions within the ENU body are proven within the plot beneath
Azimuth | Elevation |
69.68 | 62.89 |
-20.46 | 81.63 |
96.38 | 16.91 |
34.71 | 5.21 |
-145.06 | 12.59 |
-165.22 | 7.44 |
-110.29 | 39.03 |
-49.30 | 43.11 |
As may be seen the azimuth angles are each optimistic and damaging, whereas the elevations are solely optimistic. This is smart because the consumer can’t see the satellites beneath the horizon.
You’ll have seen satellite tv for pc observe charts that many GPS processing software program output as a visualization assist. These charts are created by calculating the satellite tv for pc positions utilizing the process described right here at a number of epochs.
Dilution of Precision (DOP)
DOP helps us reply the query, “how good are my place estimates”? There are two parts of the errors in our place estimate. The primary one is the measurement noise, which is apparent. The noisier our measurements (pseudorange, satellite tv for pc place and so on), greater are the anticipated place errors. Nevertheless, there’s one other, much less apparent part of the positioning errors. This part is the user-satellite geometry. As defined in chapter 6 of 1, it the best to see this in a 2D instance.
A consumer measures his distance from a pair of sign sources S1 and S2 at recognized places. If the vary measurements have been excellent, the consumer may decide his place precisely as mendacity on the intersection of two circles centered on S1 and S2 and radii equal to the measured ranges. The measurements nevertheless are imperfect and have a most uncertainty of . The determine beneath reveals how the user-source geometry impacts the quantity of uncertainty within the consumer place.
The uncertainty within the place and clock bias is measured by the covariance of the estimated place and clock bias error. Representing the true place and clock bias by and , the place and clock bias estimation errors are given as:
The place and are our estimates of the consumer place and clock bias (calculated utilizing the algorithm above). As proven in chapter 6 of 1, the covariance matrix of place and clock bias is given as:
Right here is the “consumer vary error” which captures the uncertainty within the pseudoranges and satellite tv for pc positions. The matrix is the matrix consisting of the unit vectors from the consumer to the satellite tv for pc that we noticed earlier. This matrix relies upon fully on the user-satellite geometry. Thus, the covariance may be neatly factored right into a product of measurement uncertainty and a operate of the user-satellite geometry matrix. The weather of the G matrix are expressed within the ECEF body. It’s extra handy to rotate it into the consumer’s native ENU body. Let be the required rotation matrix and be the ensuing geometry matrix.
Right here is the variety of satellites. The rotation is utilized to the place parts of the geometry matrix. it may be simply proven that
Setting
,
The East, North and Up parts of DOP are outlined as
We will additional outline a horizontal DOP (HDOP) by combining the E and N time period (because the East and North instructions outline the horizontal airplane on the consumer’s location) and vertical DOP (VDOP) consisting of the U time period.
DOP gives a easy characterization of the user-satellite geometry. The extra beneficial the geometry, the decrease the DOP. Extra beneficial means the satellites are unfold aside in azimuth and elevation. The decrease the DOP and consumer vary error (), the higher the standard of the place estimate. To grasp the connection between DOP and satellite tv for pc geometry higher, lets take into account two easy examples. The primary instance seems to be on the variation between DOP and the angle between the satellite tv for pc vectors in a 3 satellite tv for pc configuration proven within the determine beneath. The primary satellite tv for pc is situated alongside the y axis and the opposite two are situated symmetrically in regards to the y axis, at an angle from the x-axis. The G matrix and the plot of DOP towards angle theta is proven beneath.
The minimal DOP happens at . This makes intuitive sense as at this angle, the satellites are maximally separated from one another. Word that the DOP doesn’t range symmetrically with optimistic and damaging . It is because for a given , the separation between the satellite tv for pc vectors is greater for a damaging worth than for a optimistic worth.
Subsequent let’s take a look at a extra sensible instance of 4 satellites situated in 3D. First satellite tv for pc is situated on the zenith and the others three are situated 120 levels aside in azimuth and at an elevation of (identical for the three satellites). We’ll take a look at the variation of VDOP with the elevation angle.
As anticipated, the VDOP decreases with growing elevation angle, because the satellites get farther aside from one another. It continues to lower because the elevation goes previous the horizon (elevation = 90 levels). Since a consumer situated on the earth floor can’t observe satellites beneath the horizon (actually, sign from satellites < 10 levels above the horizon are too noisy and usually not used), the minimal worth of VDOP isn’t achievable. This instance demonstrates why VDOP is usually greater than HDOP.
Let’s now take a look at the variation of HDOP and VDOP with time calculated by our place algorithm on actual knowledge.
No surprises right here. The HDOP/VDOP values are typically < 2.5, which is taken into account ample and as anticipated, VDOP is greater than HDOP.
This concludes the put up! I hope that subsequent time you utilize Google maps to get instructions, you’ll take into consideration the unbelievable scientists, engineers and coverage makers who’ve given us this unbelievable system that makes doable so many functions that we now take with no consideration. In line with 1, the GPS constellation price about 30 billion {dollars} to place in place and prices the US authorities about 1B yearly to keep up. The valuation of Uber alone, which wouldn’t exist with out GPS is upwards of 70B {dollars}. While you embody all the different wonderful functions made doable by GPS, the general public funding in GPS seems to be among the finest public investments ever made! ????
Appendix
1.a Code for Calculating Consumer Place and Clock Bias
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
|
% Constants that we’ll want % Velocity of sunshine c = 299792458; % Earth’s rotation charge omega_e = 7.2921151467e–5; %(rad/sec)
% load out knowledge knowledge = load(‘rtcm_data.mat’);
% Information is a cell array containing knowledge about completely different RTCM messages. We % are taken with 1002 and 1019 % msgs is a an array of message ids (1002, 1019 and so on) msgs = [data.data{1,:}];
% Get indicies of ephemeris data (msg 1019) [idx_1019] = discover(msgs == 1019); % Get indicies of uncooked pseudorange data (msg 1002) [idx_1002] = discover(msgs == 1002); % Satellite tv for pc ephemeris knowledge is all blended up since completely different satellites are seen at % completely different epocks. eph = [data.data{2, idx_1019}]; % Lets group knowledge for every satellite tv for pc % discover distinctive satellite tv for pc indicies sv_arr = distinctive(eph(1,:)); % eph_data will include ephemeris knowledge for all epochs grouped by satellite tv for pc % quantity eph_data = {};
for i = 1: size(sv_arr) % discover indicies of all entries comparable to this satellite tv for pc sv = sv_arr(i); idx = discover(eph(1,:) == sv); eph_data{sv} = eph(:,idx); finish % Now let’s cope with 1002 messages. 1002 messages have two entries – first % one (nav1) is a 6*1 array containing: reference station id, receiver time % of week, variety of satellites and so on. See decode_1002.m in goGPS for particulars % The vital items of information in nav1 are the receiver time of week and the % variety of satellites seen % The second (nav2) accommodates a block of 56*5 for each epoch. % Num of rows (56) refers back to the most variety of satellites within the % constellation. Num of cols (5) is the variety of knowledge components for every satellite tv for pc. % We have an interest within the second factor, the uncooked pseudorange. % For these satellites for which no data is accessible, % the rows of nav2 include 0s. nav1 = [data.data{2, idx_1002}]; nav2 = [data.data{3, idx_1002}]; len = size(nav1);
% Arrays to retailer varied outputs of the place estimation algorithm user_position_arr = []; HDOP_arr = []; VDOP_arr = []; user_clock_bias_arr = [];
% preliminary place of the consumer xu = [0 0 0]; % preliminary clock bias b = 0; % 1002 messages are spaced aside 200ms. Let’s use 1 out of each 5 samples. % Because of this we’ll compute place each second, which is adequate for idx = 1: 5: len % second factor of nav1 accommodates receiver time of week rcvr_tow = nav1(2,idx); % knowledge block comparable to this satellite tv for pc nav_data = nav2(:, 5*(idx–1)+1: 5*idx); % discover indicies of rows containing non-zero knowledge. Every row corresponds % to a satellite tv for pc ind = discover(sum(nav_data,2) ~= 0); numSV = size(ind); eph_formatted_ = []; % The minimal variety of satellites wanted is 4, let’s go for greater than % that to be extra sturdy if (numSV > 4) pr_ = []; % Right for satellite tv for pc clock bias and discover one of the best ephemeris knowledge % for every satellite tv for pc. Word that satellite tv for pc ephemeris knowledge (1019) is distributed % far much less often than pseudorange data (1002). So for each % epoch, we discover the closest (in time) ephemeris knowledge. for i = 1: numSV, sv_idx = ind(i); sv_data = nav_data(sv_idx,:); % discover ephemeris knowledge closest to this time of week [c_ eph_idx] = min(abs(eph_data{sv_idx}(18,:)–rcvr_tow)); eph_ = eph_data{sv_idx}(:, eph_idx); % Convert the ephemeris knowledge into a normal format so it will possibly % be enter to routines that course of it to calculate satellite tv for pc % place and satellite tv for pc clock bias eph_formatted = format_ephemeris3(eph_); eph_formatted_{finish+1} = eph_formatted; % To be appropriate, the satellite tv for pc clock bias needs to be calculated % at rcvr_tow – tau, nevertheless it would not make a lot distinction to % do it at rcvr_tow dsv = estimate_satellite_clock_bias(rcvr_tow, eph_formatted); % measured pseudoranges corrected for satellite tv for pc clock bias. % Additionally apply ionospheric and tropospheric corrections if % out there pr_raw = sv_data(2); pr_(finish+1) = pr_raw + c*dsv; finish % Now lets calculate the satellite tv for pc positions and assemble the G % matrix. Then we’ll run the least squares optimization to % calculate corrected consumer place and clock bias. We’ll iterate % till change in consumer place and clock bias is lower than a % threhold. In follow, the optimization converges in a short time, % normally in 2-3 iterations even when the place to begin for the % consumer place and clock bias is much away from the true values. dx = 100*ones(1,3); db = 100; whereas(norm(dx) > 0.1 && norm(db) > 1) Xs = []; % concatenated satellite tv for pc positions pr = []; % pseudoranges corrected for consumer clock bias for i = 1: numSV, % appropriate for our estimate of consumer clock bias. Word that % the clock bias is in models of distance cpr = pr_(i) – b; pr = [pr; cpr]; % Sign transmission time tau = cpr/c; % Get satellite tv for pc place [xs_ ys_ zs_] = get_satellite_position(eph_formatted_{i}, rcvr_tow–tau, 1); % specific satellite tv for pc place in ECEF body at time t theta = omega_e*tau; xs_vec = [cos(theta) sin(theta) 0; –sin(theta) cos(theta) 0; 0 0 1]*[xs_; ys_; zs_]; xs_vec = [xs_ ys_ zs_]‘; Xs = [Xs; xs_vec’]; finish % Run least squares to calculate new consumer place and bias [x_, b_, norm_dp, G] = estimate_position(Xs, pr, numSV, xu, b, 3); % Change within the place and bias to find out when to fairly % the iteration dx = x_ – xu; db = b_ – b; xu = x_; b = b_; finish % finish of iteration % Convert from ECEF to lat/lng [lambda, phi, h] = WGStoEllipsoid(xu(1), xu(2), xu(3)); % Calculate Rotation Matrix to Convert ECEF to native ENU reference % body lat = phi*180/pi lon = lambda*180/pi R1=rot(90+lon, 3); R2=rot(90–lat, 1); R=R2*R1; G_ = [G(:,1:3)*R‘ G(:,4)]; H = inv(G_’*G_); HDOP = sqrt(H(1,1) + H(2,2)); VDOP = sqrt(H(3,3)); % File varied portions for saving and plotting HDOP_arr(finish+1,:) = HDOP; VDOP_arr(finish+1,:) = VDOP; user_position_arr(finish+1,:) = [lat lon h]; user_clock_bias_arr(finish+1,:) = b; finish finish HDOP_arr; %Perform R=rot(angle (levels), axis) returns a 3×3 %rotation matrix for rotating a vector a couple of single %axis. Setting axis = 1 rotates in regards to the e1 axis, %axis = 2 rotates in regards to the e2 axis, axis = 3 rotates %in regards to the e3 axis.
operate R=rot(angle, axis) %operate R=rot(angle (levels), axis)
R=eye(3); cang=cos(angle*pi/180); sang=sin(angle*pi/180);
if (axis==1) R(2,2)=cang; R(3,3)=cang; R(2,3)=sang; R(3,2)=–sang; finish;
if (axis==2) R(1,1)=cang; R(3,3)=cang; R(1,3)=–sang; R(3,1)=sang; finish;
if (axis==3) R(1,1)=cang; R(2,2)=cang; R(2,1)=–sang; R(1,2)=sang; finish;
return; finish |
1.b Code for Calculating Satellite tv for pc Place
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
operate [x y z] = get_satellite_position(eph, t, compute_harmonic_correction) % get_satellite_position: computes the place of a satellite tv for pc at time (t) given the % ephemeris parameters. % Utilization: [x y z] = get_satellite_position(eph, t, compute_harmonic_correction) % Enter Args: eph: ephemeris knowledge % t: time % compute_harmonic_correction (elective): 1 if harmonic % correction needs to be utilized, 0 if not. % Output Args: [x y z] in ECEF in meters % ephmeris knowledge will need to have the next fields: % rcvr_tow (receiver tow) % svid (satellite tv for pc id) % toc (reference time of clock parameters) % toe (referece time of ephemeris parameters) % af0, af1, af2: clock correction coefficients % ura (consumer vary accuracy) % e (eccentricity) % sqrtA (sqrt of semi-major axis) % dn (imply movement correction) % m0 (imply anomaly at reference time) % w (argument of perigee) % omg0 (lontitude of ascending node) % i0 (inclination angle at reference time) % odot (charge of proper ascension) % idot (charge of inclination angle) % cus (argument of latitude correction, sine) % cuc (argument of latitude correction, cosine) % cis (inclination correction, sine) % cic (inclination correction, cosine) % crs (radius correction, sine) % crc (radius correction, cosine) % iod (subject of knowledge quantity)
% set default worth for harmonic correction swap nargin case 2 compute_harmonic_correction=1; finish mu = 3.986005e14; omega_dot_earth = 7.2921151467e–5; %(rad/sec)
% Now observe desk 20-IV A = eph.sqrtA^2; cmm = sqrt(mu/A^3); % computed imply movement tk = t – eph.toe; % account for starting of finish of week crossover if (tk > 302400) tk = tk–604800; finish if (tk < –302400) tk = tk+604800; finish % apply imply movement correction n = cmm + eph.dn;
% Imply anomaly mk = eph.m0 + n*tk;
% remedy for eccentric anomaly syms E; eqn = E – eph.e*sin(E) == mk; solx = vpasolve(eqn, E); Ek = double(solx);
% True anomaly: nu = atan2((sqrt(1–eph.e^2))*sin(Ek)/(1–eph.e*cos(Ek)), (cos(Ek)–eph.e)/(1–eph.e*cos(Ek))); %Ek = acos((e + cos(nu))/(1+e*cos(nu)));
Phi = nu + eph.w; du = 0; dr = 0; di = 0; if (compute_harmonic_correction == 1) % compute harmonic corrections du = eph.cus*sin(2*Phi) + eph.cuc*cos(2*Phi); dr = eph.crs*sin(2*Phi) + eph.crc*cos(2*Phi); di = eph.cis*sin(2*Phi) + eph.cic*cos(2*Phi); finish
u = Phi + du; r = A*(1–eph.e*cos(Ek)) + dr;
% inclination angle at reference time i = eph.i0 + eph.idot*tk + di; x_prime = r*cos(u); y_prime = r*sin(u); omega = eph.omg0 + (eph.odot – omega_dot_earth)*tk – omega_dot_earth*eph.toe;
x = x_prime*cos(omega) – y_prime*cos(i)*sin(omega); y = x_prime*sin(omega) + y_prime*cos(i)*cos(omega); z = y_prime*sin(i);
finish |
1.c Code for Computing the Least Squares Answer for Consumer Place and Clock Bias
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
operate [x, b, norm_dp, G] = estimate_position(xs, pr, numSat, x0, b0, dim) % estimate_position: estimate the consumer’s place and consumer clock bias % Utilization: [x, b, norm_dp, G] = estimate_position(xs, pr, numSat, x0, b0, dim) % Enter Args: xs: satellite tv for pc place matrix % pr: corrected pseudo ranges (adjusted for recognized worth of the % satellite tv for pc clock bias) % numSat: variety of satellites % x0: beginning estimate of the consumer place % b0: place to begin for the consumer clock bias % dim: dimensions of the satellite tv for pc vector. 3 for 3D, 2 for 2D % Notes: b and b0 are normally 0 as the present estimate of the clock bias % has already been utilized to the enter pseudo ranges. % Output Args: x: optimized consumer place % b: optimized consumer clock bias % norm_dp: normalized pseudo-range distinction % G: consumer satellite tv for pc geometry matrix, helpful for computing DOPs
dx = 100*ones(1, dim); db = 0; norm_dp = 100; numIter = 0; b = b0; %whereas (norm_dp > 1e-4) whereas norm(dx) > 1e–3 norms = sqrt(sum((xs–x0).^2,2)); % delta pseudo vary: dp = pr – norms + b – b0; G = [–(xs–x0)./norms ones(numSat,1)]; sol = inv(G‘*G)*G’*dp; dx = sol(1:dim)‘; db = sol(dim+1); norm_dp = norm(dp); numIter = numIter + 1; x0 = x0 + dx; b0 = b0 + db; finish x = x0; b = b0; finish |
1.d Code for Calculating Satellite tv for pc Clock Bias
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
operate dsv = estimate_satellite_clock_bias(t, eph) F = –4.442807633e–10; mu = 3.986005e14; A = eph.sqrtA^2; cmm = sqrt(mu/A^3); % computed imply movement tk = t – eph.toe; % account for starting or finish of week crossover if (tk > 302400) tk = tk–604800; finish if (tk < –302400) tk = tk+604800; finish % apply imply movement correction n = cmm + eph.dn;
% Imply anomaly mk = eph.m0 + n*tk;
% remedy for eccentric anomaly syms E; eqn = E – eph.e*sin(E) == mk; solx = vpasolve(eqn, E); Ek = double(solx);
dsv = eph.af0 + eph.af1*(t–eph.toc) + eph.af2*(t–eph.toc)^2 + F*eph.e*eph.sqrtA*sin(Ek); finish |
1.e Code for changing ECEF (WGS84) to Ellipsoidal Coordinates
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
operate [lambda, phi, h] = WGStoEllipsoid(x,y,z) % WGStoEllipsoid Convert ECEF coordinates to Ellipsoidal (longitude, latitude, top above ellipsoid) % Utilization: [lambda, phi, h] = WGStoEllipsoid(x,y,z) % Enter Args: coordinates in ECEF % Output Args: Longitude, Latitude in radians, top in meters
% WGS ellipsoid params a = 6378137; f = 1/298.257; e = sqrt(2*f–f^2); % From equation 4.A.3, lambda = atan2(y,x); p = sqrt(x^2+y^2);
% preliminary worth of phi assuming h = 0; h = 0; phi = atan2(z, p*(1–e^2)); %4.A.5 N = a/(1–(e*sin(phi))^2)^0.5; delta_h = 1000000; whereas delta_h > 0.01 prev_h = h; phi = atan2(z, p*(1–e^2*(N/(N+h)))); %4.A.5 N = a/(1–(e*sin(phi))^2)^0.5; h = p/cos(phi)–N; delta_h = abs(h–prev_h); finish finish |
1.f format_ephemeris3.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
operate eph = format_ephemeris3(eph_) eph = []; eph.svid = eph_(1); eph.toc = eph_(21); eph.toe = eph_(18); eph.af0 = eph_(19); eph.af1 = eph_(20); eph.af2 = eph_(2); eph.ura = eph_(26); % test eph.e = eph_(6); eph.sqrtA = eph_(4); eph.dn = eph_(5); eph.m0 = eph_(3); eph.w = eph_(7); eph.omg0 = eph_(16); eph.i0 = eph_(12); eph.odot = eph_(17); %eph.wdot = eph_(17);
eph.idot = eph_(13); eph.cus = eph_(9); eph.cuc = eph_(8); eph.cis = eph_(15); eph.cic = eph_(14); eph.crs = eph_(11); eph.crc = eph_(10); eph.iod = eph_(22); eph.GPSWeek = eph_(24); finish |
2.a Taylor Collection Enlargement of Vector Modulus
Within the derivation of the place estimation system, we used the taylor sequence growth of the modulus operate. The proof is as follows:
First two phrases of the taylor sequence growth of about are:
2.b Ionospheric and Tropospheric Delay
The passage of the satellite tv for pc sign by means of the earth’s environment modifications the pace of the sign and bends the sign path. These results end result within the distance to the satellite tv for pc calculated by multiplying the time delay between sign transmission and reception with the pace of sunshine to be completely different from the true distance. Estimating the impact of the environment is vital to calculate correct pseudoranges and thus correct consumer place. Within the therapy above, we uncared for the atmospheric results. On this part, we’ll present some details about atmospheric results and the way they’re sometimes modeled. The reader is referred to chapter 5 of 1 for particulars.
For the aim of analyzing its interplay with GPS indicators, the earth’s environment may be break up into two elements – troposphere and the ionosphere. The ionosphere extends from a top of about 50km to about 1000km above the earth is a area of ionized gases. The ionization is attributable to the solar’s radiation and the state of the ionosphere is decided primarily by the depth of photo voltaic exercise. Electron density typically builds up throughout the day because the solar rises, peaking at round 2 PM native time after which begins declining. There may be appreciable variability from day after day relying upon the photo voltaic exercise. The pace of propagation of the sign within the ionosphere relies upon upon the variety of free electrons within the path of the sign, outlined because the whole electron depend (TEC). The variety of electrons in a tube of 1 cross part extending from the receiver to the satellite tv for pc is given as:
the place is the electron density alongside the sign path and the integral is alongside the sign path from the satellite tv for pc to the receiver. The trail size by means of the ionospheric is shortest within the zenith route (when the satellite tv for pc is instantly overhead) and longest when the satellite tv for pc is near the horizon.
Typically, ionosphere delays are onerous to mannequin as photo voltaic flares and magnetic storms can giant and quickly various fluctuations in electron densities. Two strategies are primarily used to estimate ionospheric delays. The primary methodology makes use of twin frequency GPS measurements and the truth that the ionospheric delay is inversely proportional to the sq. of the frequency. This permits us to arrange a system of equations to estimate the ionosphere free pseudoranges from the noisy pseudoranges.
Receivers restricted to single frequency measurements can use an empirical mannequin referred to as the Klobuchar mannequin parameterized by the consumer’s latitude, longitude, satellite tv for pc azimuth/elevation, native time and a set of parameters broadcast by the satellites. A step-by-step implementation of this mannequin is detailed within the GPS Interface Specification and may be simply applied in Matlab or C.
The troposphere extends to about 16 Km above the equator and accommodates roughly three quarters of the gaseous mass of the environment. The troposphere is primarily composed of the dry gasses – nitrogen and oxygen, and water vapour. The first impact of the troposphere on GPS sign propagation is to delay it barely, inflicting the obvious vary to the satellite tv for pc to look longer by about 2.5m, relying on the satellite tv for pc elevation angle. Not like the ionosphere, the troposphere is non-dispersive for GPS frequencies, and thus the tropospheric impact can’t be estimated by twin frequency measurements. The quantity of delay attributable to the troposphere depends upon the strain, temperature and humidity. Varied fashions exist to calculate the delay from meteorological measurements. Seek advice from chapter 5 of 1 for particulars.
2.c Plotting code
Some individuals have requested for the plotting code – here it’s.
1.
Misra P, Enge P. International Positioning System. Vol 0. 0th ed. Ganga-Jamuna Press; 2011.
2.
None S. International Positioning System Interface Specification. International Place Programs Directorate; 2013:213.