User talk:Crazy Software ProductionsPlease feel free to place comments on text that I wrote : GPS :
Editing commentsEditing your own comments for changes other than spelling is frowned upon because you can change the appearance of a discussion. Also, your editing deleted a comment I had placed. I'm sure it was a mistake but please be careful in the future. - Davandron | Talk 23:30, 6 June 2007 (UTC) Yes my apologies for that, I had an edit conflict. I had just made some minor edits in my part (satelite should be written as satellite for example), when the conflict occured I saved my 'progress', had a look at what was changed and pasted my edits back from my 'progress', not realizing that a comment was inserted in that part. Should have been more carefull.Crazy Software Productions 20:32, 9 June 2007 (UTC) Simplified method of operation ON 20071117A GPS receiver calculates its position by measuring the distance between itself and three or more GPS satellites. Each satellite has an atomic clock, and continually transmits messages containing the exact time, the location of the satellite (the ephemeris), and the general system health (the almanac). The receiver, using its own clock, carefully measures the reception time of each message. This gives the distance to each satellite since the signal travels at a known speed near the speed of light. Knowing the distance to at least three satellites, and their positions, the receiver computes its position using trilateration.[1] In practice, receivers typically do not have perfectly accurate clocks, but tracking four or more satellites allows them to compute their location and the accurate time.
Simplified method of operation PROPOSALA GPS receiver receives location and timing informatin from satellites. From this information the GPS receiver can calculate its position and the actual time. To do this the GPS receiver times the difference of arrival times of the satellite signals. The speed of the signals is know, so the receiver can determine the distance differences to the satellites. The signals of four satellites are needed to calculate the position. As a side effect the actual time can be calculated as well. Example (in 2D). We are in a location in Great Britain, we are D meters from Iron Bridge. (We do not know the value D).
GPS is a 3D situation, where the satellites are on the move all the time. Because of the extra dimension 4 satellites are needed, the information which satellites are visible (almanac) and the information where each satellite exactly is (the ephemeris) is send all the time. Distances differences are determined by multiplying the timing differences by the speed of light.
The position is calculated from the time differences between the different satellite signals. The usual explanation is that the position is calculated from 'known' distances to the satellites. If the clock of a GPS receiver would be very accurate this would be possible. But the distances to the satellites are not know until the actual position is calculated. I attempted to take the last two paragraphs in the Using the C/A code section and merge them into one based on how I interpreted the description of the process. Is it within your mind's "estimated precision error"? Also, you might want to add a discussion about GPS to the multilateration article. -- Denelson83 23:53, 12 September 2007 (UTC) Modifications on Using the C/A codeORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL ORIGINAL Using the C/A codeTo start off, the receiver picks which C/A codes to listen for by PRN number, based on the almanac information it has previously acquired. As it detects each satellite's signal, it identifies it by its distinct C/A code pattern, then measures the time delay for each satellite. To do this, the receiver produces an identical C/A sequence using the same seed number as the satellite. By lining up the two sequences, the receiver can measure the delay and calculate the distance to the satellite, called the pseudorange[2]. Next, the orbital position data, or ephemeris, from the Navigation Message is then downloaded to calculate the satellite's precise position. A more-sensitive receiver will potentially acquire the ephemeris data quicker than a less-sensitive receiver, especially in a noisy environment.[3] Knowing the position and the distance of a satellite indicates that the receiver is located somewhere on the surface of an imaginary sphere centered on that satellite and whose radius is the distance to it. Receivers can substitute altitude for one satellite, which the GPS receiver translates to a pseudorange measured from the center of the earth. ARGUMENTS FOR CHANGING, CALCULATIONS CAN BE DONE IN ONLY THREE-DIMENSIONAL SPACE. ALTHOUGH THERE ARE FOUR PARAMETERS (X,Y,Z, D), THE FOURT PARAMETER CAN BE A DISTANCE PARAMETERS. THE TIME OF THE DAY IS NOT IMPORTANT AT ALL.
CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED CHANGED Using the C/A codeTo start off, the receiver picks which C/A codes to listen for by PRN number, based on the almanac information it has previously acquired. As it detects each satellite's signal, it identifies it by its distinct C/A code pattern, then measures the time delay for each satellite. To do this, the receiver produces an identical C/A sequence using the same seed number as the satellite. By lining up the two sequences, the receiver can measure the delay and calculate the distance to the satellite, called the pseudorange[4]. Next, the orbital position data, or ephemeris, from the Navigation Message is then downloaded to calculate the satellite's precise position. A more-sensitive receiver will potentially acquire the ephemeris data quicker than a less-sensitive receiver, especially in a noisy environment.[3] Knowing the position and the distance of a satellite indicates that the receiver is located somewhere on the surface of an imaginary sphere centered on that satellite and whose radius is the distance to it. Receivers can substitute altitude for one satellite, which the GPS receiver translates to a pseudorange measured from the center of the earth.
All calculations can be done without any time components. With four satellites there are four spheres which all should intersect in one point. This is four equations, with four unknown, (x,y,z, ^d) (^d = c*^t for distance). Four lineair equations with four unknowns are easy to solve. But spheres are not lineair. In pseudo range calculations 4 lineair equations (planes instead of spheres) are used. The planes approcimate the sphere well enough for this solution to work and give a very fast and very accurate results. With 5 or more satellites, extra points can be calculated. They should be very close, but for each point calculated, it is possible to calculate how good this point is. The reciever then determins which combinations to use and how to calculate the position from all the results. After the final location (and time) are calculated, the location is expressed in a specific coordinate system, e.g. latitude/longitude, using the WGS 84 geodetic datum or a local system specific to a country.
The principle explaned with a 2D example.We are in a location in Great Britain, we are D meters from Iron Bridge. (We do not know the value D).
Question: Where are we, and the side question what is the value of D.
If we assume Britain to be flat, and use a 'square' grid, this will aid calculations. Using London Bridge at 0,0 and use kilometers as the grid size we get :
In this coordinate system we can calculate the x,y position, but because Britain is not completely flat it will only be an approximation of the actual position. Using pseudorange calculation in this flat system we have to solve the following equations. The position to be solved is x,y and D for the distance. Iron Bridge
These equations are not lineair, but quadratic. Because of the squareroots there will be two solutions (x,y,D) which satisfy alle three solutions. This calculation can be used in several ways. Changing the D can be done until one or both solutions are found. This still takes some calculations, but substituting the D with an estimate, makes it possible to calculate several pairs of XY. using the correct D there will only be two pairs. This is actually calculating the solution using the circle (3D sphere) method. Often used to explain the GPS principle. Very ofte simplified by assuming the D is know. Pseudo range calculation does not use this computation intensive method. The set of equations is made into a set of lineair equations. This will only result in the same solution if the lines (3D planes) are close enough to the actual solution that the circles (spheres) can be assumed flat for the calculation. To do this a estimate is needed, the estimate should not be to far from the end solution. (We choose York as an estimated point). (3D and on the world the last known location can be used, the side of the earth were we the satelites are visible from can be used, or even the centre of the earth can be used.) For this location we calculate the lines which we are going to work with. The lines are perpendular on the line known point to york. (They we be used as direction vectors in het new calculations). TO BE CONTINUED HERE.
Now with some carefull plotting in Google earth the you can find the location. There are lot of methods to determine the actual location. For a GPS on of the best methods is pseudorange calculation. How to find the locations :Using intersecting circles. Draw circles (of the correct size) around the known places. Change the circles until they intersect in one place. (There are two solutions where the 3 circles intersect in precise one place. They do not occure with the same circle sizes). Using hyperboles. Plot all the points from two known locations with the same difference in distance. (An Example should be shown for this). This gives the shape of a hyperbool. Two hyperboles give two intersection points. (The third hyperbool will go through the same two points. These points are the same as the points obtained by the circle method). Calculating methods. For easier calculation a 'rectangular' grid wil be easier, so one can calculate with x,y points. The coordinates are given above. One of the methods is finding a for one combination the line and moving over that line or following that line close, to find the other line. This can also been done with a least square method. Depending where you start you should find a point. A better calculating method is the pseudo range calculation. Based on a first estimate, with pseudorange calculation this iterates very fast to the endsolution. The pseudorange calculation is based on the circle methods. But because lineair equations are easier to solve, 3 (in this case For GPS 4) lineair equitions are used to solve the x,y,d (where d is the distance to the nearest known location).
In the GPS the calculations can be done with distance in meters as the working method. But distances can be converted to travel times of light and vice versa, the distance to the first satellite (delta d) or the clock error (delta t) are equivalent. So within the calculation the distance error or the clock error can be corrected for.
Remarks :With the example everything is in 2D, there is no time component. So all calculations fall in 2D space, although there are three unknown value's to be determined. For a 3D world.
But there are still 2 solutions which both fit the set of given data. Because speed of light is known, distances can be converted to delaytimes. (With some correctionsof atmospheric conditions). In the 3D world one satellite can be exchanged for a known hight (distance from the centre of the earth). In the 2 D world one of the known bridges can be exchanged for a known distance to a fixed point, the other two known bridges are still needed. The solution(s) will be the intersection of one circle (of known size) with the hyperboole which defines the distance between the two know bridges. Why ?why ?First I do not mind that simplified explanations are used. Also I do not mind that incorrect concepts are used. But both if used to explain the principle. I object to that simplified of incorrect concepts are used the explain matters they can not explain. A very specific example is the number of satellites that is needed for the calculationof the position. The simplified (and incorrect) concepts just do not explain the behavior of GPS receivers and do not explain the number of satellites needed. Because this simplified (and incorrect) explanation is used in so many places (trimble, how stuff works and even Garmin), everbody assumes it to be correct and quotes these explanations as through. While the behavior of GPS receivers, mathematics, physics and technology do not conver to this resoning. Mathematics. If the exact time is know with enough accuracy, circles can be used as the model. In real live, the circles can be used as the model but do not determine where the GPS receiver is, these are hyperboloids. Physics. Yes the signals expand as spheres, except that the sphere size can not be determined, and therefore the distance can not be determined. Technology. Clocks drift for up to 30 seconds each month, look at expensive watches how much they drift. But even a watch that only would drift 1 sec a year would not be accurate enough. Technology at this moment does not supply is with a within clock device which is accurate enough. *)
WRONGS:
Do we need the atomic clocks in the satellites.Could a GPS system be designed with quartz clocks in a GPS satelite. This would very probable be possible. The principle would be simple use ground stations which would determine the clockerror for the satellite often enough and send a correction signal for this error. With enough groundstations it would be possible to determine the drift of the satellite clock and correct for this. With enough knowledge, time drift of the clock can be predicted fairly correctly and corrections can be less frequent. Even the satellites could be used to correct each other. Because the errors would be very dependend on each other this would need a complex system to correct for the errors, on a continues base, but most problems would be solvable with software, making the system cheaper. Would this be practical, not at the start of the GPS system, because of the limited number of satellites available, probably not enough to correct them. And by know the atomic clock only is a small part of the total cost of the satellite. Large part of the new GPS system (Galileo) is based on the extra correction power designed in the system. Although clocks have improved as wel. Also have algoritms to correct 'smal' errors in the 'hardware' system, so that hardware with the combined software delivers a beter accuracy. Examples of this technologie. GPS satellites can determine the distance not by using the same clock but by sending the signal from one satellite to another and then a returnsignal backwards. The time between the sending and receiving will be the time needed to travel the distance twice plus the processing time. If the processing time is known, the satellites do not need to have a clock on sync, because only the first satellite clock is used. By determining the distance between all satelites which can see each other, the satelites all become part of a know fixed grid. now the only thing which has to be done is determine where the earth is compared to this grid. Having this fixed grid of satellites sure will help the positioning system. And this fixed grid would be fairly accurate if all satellites would only carry simple quartz clocks. But what the heck, use atomic clocks in a few satellites, just to make the grid 'more fixed' to the earth. for example 3 atomic clocks, two on opposite sides of the earth and one which is does relative move from the fixed ones, so that the third satellite once in a while sees the one and the other satellite. (Maybe one, or two would be enough so sync everything, because we know the grid, but just in case). Three could als be the minimum, because then in 3D space the earth is fixed. With two it's possible to rotate. ????? So having a grid with good timing an a relatively good emipheris. Using only a few fixed spots on earth would fix the earth as well to the grid. Maybe, 'strait' lasers can be used to determine the 'distance' or angular position to parts of the system. Only a few are needed to fix the grid to the earth. (Fixing in this context means that we know the relative position of the earth compared to the grid). With all the corrections on the grid, I would say that this is even possible with 'standard' quartz clocks. Satellite paths do cross so then the distance is very small. Distances are at most about 50.000 km. The distance to the closed satellite will never be more than 30000 km. Without corrections and an 'inaccurate' quartzclock this would lead to positional error of hundreds of meters. With a corrected quartzclock and corrections the error could be reduced to only a few meters, not a lot worse than the actual known positions of the satellites. A simplified and limited way to determine the position.A lot of the GPS position system is works around the clocks. During the day there are many moments when the observers position is exactly between satellites. The distance to both satellites is the same at that moment. Using only that type of moments to determine the position, no clock is needed, no timing is needed and the position can be easely calculated. Because if the distance to both satellites is the same, we are on the (flat) plane exactly between the two satellites. The intersection of three such planes determines one single point where we are. Even most atmospheric errors are eliminated. Because the satellites all circle abouth the same distance from the earth, two satellites having the same distance from the observer must have the same angle (above the horizon) from the observers view, so both signals travel the same distance through the atmosphere (including the ionosphere). Also there is no clock so no clockerror at the recievers side. Offcourse this is not a practical way to use a GPS system, but it is a practical way to explain GPS. If the reception is not exactly the same but a littlebit different, the flat plane 'warps' and becomes a hyperboloid. With small differences close to the flat plane but with greater distances the angle of the hyperboloide becomes less. The observer now is on the intersection of three independend hyperboloids. (Because of the curvature, it's possible that there are two solutions in the set). Crazy Software Productions (talk) 14:02, 1 March 2008 (UTC) Construction of the location in 2 D.In two D one can use construction to determine ones position. Needed large paper. Calipers Ruler (without a scale). The three points which represent the satellites on the paper. The difference in signal differences. Markt the satellite of which the first signal is received as 1. Mark the satellite of which the second signal is received as 2. Mark the satellite of which the third signal is received as 3. Draw a circel the size of the difference in distance between one and 2 around 2. Draw a circel the size of the difference in distance between one and 3 around 3. Mark the middle between 1 and the circle around 2. Draw two lines A going through 1 and touching the circle around 2. Draw two lines B going from 2 through the lines where they touch the circle of 2. Draw two parallel lines C through the middle point parallel to the last two lines. Draw two parallel lines D through the middle points of the touching lines. your position in in between the parallel lines C and D. (Two sets.) Do the same for 1 and three. Now your position is limited to two boxes. From point 2 draw lines to the four points of both boxes, use the two outer most points in both cases. Reconstuct the box form that, steps to follow. 1. 2. 3. From point 3 draw lines to the four points of both boxes in the same manner. Repeating this process will result in the exact location.Crazy Software Productions (talk) 20:48, 3 May 2008 (UTC) Construction of the location in 2 D.Similar to the pseudorange calculations. calipers and ruler method (no markings on the ruler), this can be done in Geogebra. Given three sats (S1,S2,S3), and give three pseudoranges (V1,V2,V3). The three pseudoranges are the ranges from the sats 1,2,3. The values should be low but not negative. A Guestimate is needed. (Centre of the earth wil sufficiece).
Two solutions. (Four satellites).In Method of operation from Introduction to the Global Positioning System it says:
The suggestion is made that adding a fourth satellite, that this can be used to determine which of the two points is the correct point. This is not true. A fourth satellite does not eliminate one of the points, neither does it give an indication which is the correct point. With four satellites there are still many situations with more than one solution. Example. Receiver on (0,0,0), three satellites on (3,4,10), (-3,4,10), (3,-4,10), with the fourth satellite on (0,4.9,9.9), there is a second solution on (0,0,7.48). A both the positions you get the exact same timing of signals from all four satellites. (The timing error is different but very smal). Changing the Z value of the fourth satellite from 9.5 to 10.24 the Z goes from minus infinity to plus infinity. So the second point can be anywhere in distance as well. Changin one of the parameters slightly will not dissolve the second point, but the point will move. With the positions of the first 3 satellites all points on the axes (0,0,Z) are a correct solution. This can be generalised to: Any three satellites have a middle point where the line through this middle point perpendular on the plane the three satellites fall in exists of points with the same timing in respect to these three satellites. (The middlepoint is the centre of the circle through the three satellites). Because all satellites have about the same distance from the earth the plane of three satellites which are visible from the earth is fairly horizontal, this means that the line through the middle will also intersect with the earthsphere at two points, one point close to the satellites and there is an exit point as well. If a fourth satellite is added there is a fair chance that for any point on the line there is a point with the same timing differences as the point. If the constellation of the first 3 satellites or the position of the receiver is moved, the line will bend into a curve, this curve will represent all the points with the same timing differences in respect to the first 3 satellites. Adding a fourth satellite, there still is a fair chance that for any point on the line there is another point with the same timing differeces to all four satellites. The second point is very instalble and changing the parameters to much the second point will go beyond infinity and then there is no second point anymore. Inconclusion:
The timing from visible satellites (at a height of 20200 km) is always between 0.067 seconds and 0.089 seconds for anything on the earth surface or in the air. In most cases this can be used to eliminate the second solution. Or the stable point is the correct solution. (Using the last calculated point in Pseudorange calculation will see to that). For trilateration it is fairly easy to set up a situation with a small timing error where the fourth sphere is closer to the 'wrong' solution than to the correct solution. On the numbers choosen in the example. The point of origin is choosen as the point of the receiver, this makes the calculations (for checking) simpler. The three satellites where all set in the same horizontal plane with a distance of 5 to the z axes. Also to make the calculation more simple. Any three points can be choosen on that circle. There are 12 points with only integer numbers on that circle, any 3,4 combined or 0,5 negative or positive. Any constellation of three satellites does form a circle. There is always a line throug the 'middle' point where all the point have the same timing difference in accordance with the 3 satellites. It depends on the position of the fourth satellite if there are 1 or 2 solutions. If you have a constallation with 2 solutions, changing the parameters slowly will change the position of the second solution until it goes beyond infinity and disappears. If you want to use the constallation for Trilateration add (3,-4,-10) to all points and the second pont will become the point of origine, the first point will be on the y axes the third point will be in the x,y plane. This is exactly what is described in the trilateration article. Depending on the timing error the 'correct' or 'wrong' point will the be selected as a solution. But it's quite a feat to find the solution with trilateration.
Within this article/subject/paragraaf, I want to show that for any constellation of four satellites there are situations that there are 2 solutions. First I will show a simplified example of four satellites and more than one solution. Then I will generalise this into any four satellite situation. At the moment I have to check the any in the above sentence. I still think that Simplified example.
Example 3 sats (3,4,10), (-3,4,10), (3,-4,10)
The fourth satellite should not be inline with sats and not on the plane with the sats.
Somewhere between 10.023 and 10.024 it goes beyond infinity and does not give a second solution. The otherside somewhere between 9.6 and 9.5 it goes beyond infinity and does not give a second solution. As shown the second point can be anywhere (in distance) So basing decisions on distance (closest to or farthest away) can not be used to discern between the two point. The second point is always unstable. Slight alterations in the situation lets the second point move large distances. This goes for the iteration process as wel.
The shown situation is very specific, the first 3 satellites are in a plane in a triangle with the middle exactly above the receiver. For the above situation any satellite can be choosen as long as the z is 10 and the distance from (0,0,-) is always 5. All those positions have the same effect. If the receivers position is shifted. It gets more complex, but in most situations it is still possible to get a second solution. If the position of the receiver is shifted slowly the line (0,0,z) is not the solution line anymore, but a bended line is. The more you shift the receiver, the more the line get's bended. It still remains a curve with no end and no beginning. Also the second point changes when shifting the receiver, it doesn't disappear suddenly. But the intersection can become undone. This happens at the endless distance. How general is this example. Any three satellites can be used, they always form a triangle in a plane fairy horizontal above us. Any triangle has a middle so on this line there is no time difference between the reception of the signals. Because all satellites are fairly horizontal above the earth, the line will run through the earth. For a 2 D situation where the height is used as a parameter (or the sphere of the earth is used), you can easely see that the line of solutions runs through the earth, given 2 posible solutions, the place where it enters the earth and the place where it exits the earth. If trilateration would be used for this it would be virtually impossible with only the tralateration rules to discern between the two solutions. The timing error only has to be a bit in the positive when switching on and the second point would be selected. So trilateration would need extra information to get to the correct point. (It's very easy to distinct between the two points because it's unlikely that on the second point the same satellites would be visible. But this is using extra info). For pseudorange calculation this is no problem because the last estimate can be used. Even if this estimate is hours old it still would come up with the correct solution. —Preceding unsigned comment added by 83.85.120.147 (talk) 21:58, 10 September 2008 (UTC)
Proove that for any constellation of four satellites there is always a situation with more than one solution. Take any situation with four satellites, select three, determine within the plane of the three satellites the 'middle', that is the point which has equal distances to all satellites. You can always draw a circle to any three satellites (which are not in line) and a circle always has a centre, this centre has the same distance to all three satellites. Flaws in trilateration.1. No complete description can be found of the algoritmn using trilateration of position determination. More specific it is not (correct) described how the timing error is corrected. Further flaws are based on the describtion of the system which is present in the trilateration article and in the GPS article.
Because there are better algoritms, which converge faster and need less computing power and are not dependend on the timing error it's unlikely that manufacturers would choose trilateration over one of the better methods.
Pseudorange calculation in tekst only.An implementation of the pseudorange algoritmn. (No formulas). All has to be done for four satellites. First the pseudodistance to the four satellites is determined. A first estimate is choosen. (Probably the last known location). The distance for each satellite to the estimate is calculated. A vector is made for each satellite. A. Determine the difference in coordinates between the satellite and the estimate. B. Divide these three numbers by the distance. (We know have a vector of exactly one long, which is perpendular to a plane, this plane is exactly the plane at which the waves from the satellite arrive.) Calculate the difference between the determined pseudodistance and the estimatedistance. Move the plane with this amount. (perpendular to the vector, the direction is dependend on the sign). Now move all planes exactly the same amount toward or from their respective satellites till all four planes cross in one point. This point is used as the next estimate. If this process is repeated once each second, the mathematical precision of the calculated point will be less than millimeters after 5 iteration and stay this accurate. Formules or an implementation will be presented elsewere.
The pseudorange algoritm using NO formulas.First choose a point as a first estimate. Preferable use the last known point. If this is not available the centre of the earth can be used. The measured times for four satellites and the position of those satellites should be available. (Pseudodistances) For each satellite.
Calculate the difference between the determined pseudodistance and the estimatedistance. Move the plane with this amount. (perpendular to the vector, the direction is dependend on the sign). Now move all planes exactly the same amount toward or from their respective satellites till all four planes cross in one point. This point becomes the next estimate. If this process is repeated once each second, the mathematical precision of the calculated point will be less than millimeters after 5 iteration and stay this accurate. Formules or an implementation will be presented elsewere. Crazy Software Productions (talk) 20:51, 13 September 2008 (UTC) The pseudorange algoritm using formulas.First choose a point as a first estimate. Preferable use the last known point. If this is not available the centre of the earth can be used. (Xe, Ye, Ze) The measured times for four satellites and the position of those satellites should be available. For each satellite. (Xs, Ys, Zs)
Formula: Xu*X + Yu*Y + Zu*Z -1*TimingError = De-Dp One formula for each satellite this gives four formulas and four unknowns. This can easely be solved for X,Y,Z and TimingError. Add these values to the first estimate, this is the next estimate. Crazy Software Productions (talk) 20:41, 13 September 2008 (UTC)
Pseudocode for the pseudorange calculations: Pseudocode: Pseudorange calculation. Measured pseudorange distances: P(n) Measured pseudorange distances satellite n. E(n) Distance to estimate from satellite n to be calculated. Matrix(m,n,o) (M stands for the number of matrixes needed 0..4) (N stands for the satellitenumber 1..4) (O stands for orientation being x, y, z, delta-t and the column to solve 1..5) Matrix(Matrixnr, row (=satnr), kolom (=orientation)) Matrixnr is extra. All calculations can also be done in a single (4,5) matrix. Temporary variables: Divisor Multiplier Estimated position for Xe, Ye, Ze. Use the last known position or use (0,0,0). for ever once a second Get the measurements P(n) for n = 1..4 Main loop: Fill the matrix: for n from 1 to 4 E(n)= sqrt((Xn-Xe)^2+(Yn-Ye)^2+(Zn-Ze)^2) matrix(0,n,1) = (Xn-Xe)/E(n) -- Unity vector from sat to estimate X value matrix(0,n,2) = (Yn-Ye)/E(n) -- Unity vector from sat to estimate Y value matrix(0,n,3) = (Zn-Ze)/E(n) -- Unity vector from sat to estimate Z value matrix(0,n,4) = -1 matrix(0,n,5) = E(n)-P(n) Solve the matrix: for m from 1 to 4 divisor = matrix(m-1,m,m) for o from 1 to 5 matrix(m,m,o) = matrix(m-1,m,o)/divisor for n from 1 to 4 multiplier = matrix(m-1,n,m) ??????? for o from 1 to 5 if m <> n then matrix(m,n,o) = matrix(m-1,n,o) - matrix(m,m,o) * multiplier Next estimated position: Xe=Xe + matrix(4,1,5) (X value) Ye=Ye + matrix(4,2,5) (Y value) Ze=Ze + matrix(4,3,5) (Z value) T =T + matrix(4,3,5) (Time) (The first coordinate of the matrix is not needed, because one single matrix can be reused.)
Pseudocode: Pseudorange calculation. Measured pseudorange distances: P(n) Measured pseudorange distances satellite n. E(n) Distance to estimate from satellite n to be calculated. Matrix(n,o) (M stands the version of the matrix) (N stands for the satellitenumber 1..4) (O stands for orientation being x, y, z, delta-t and the column to solve 1..5) Matrix(row (=satnr), kolom (=orientation)) Fifth column is used for the differences in distance. Temporary variables: Divisor Multiplier Estimated position for Xe, Ye, Ze. Use the last known position or use (0,0,0). for ever once a second Get the measurements P(n) for n = 1..4 Main loop: Fill the matrix: for n from 1 to 4 E(n)= sqrt((Xn-Xe)^2+(Yn-Ye)^2+(Zn-Ze)^2) matrix(n,1) = (Xn-Xe)/E(n) -- Vector from sat to estimate X value matrix(n,2) = (Yn-Ye)/E(n) -- Vector from sat to estimate Y value matrix(n,3) = (Zn-Ze)/E(n) -- Vector from sat to estimate Z value matrix(n,4) = -1 matrix(n,5) = E(n)-P(n) Solve the matrix: for m from 1 to 4 divisor = matrix(m,m) for o from 1 to 5 matrix(m,o) = matrix(m,o)/divisor for n from 1 to 4 multiplier = matrix(n,m) ??????? for o from 1 to 5 if m <> n then matrix(n,o) = matrix(n,o) - matrix(m,o) * multiplier Next estimated position: Xe=Xe + matrix(1,5) (X value) Ye=Ye + matrix(2,5) (Y value) Ze=Ze + matrix(3,5) (Z value) T =T + matrix(4,5) (Time, Bonus not strictly needed.) Velocity and DirectionGPS does _not_ provide velocity and direction data (to can be calculated using further analysis of more data, of course), but to imply otherwise is akin to claiming that iron ore mining produces steel girders. Given that clarification on the matter seems to have confused even other editors, I am going to remove the reference entirely. 87.254.72.172 (talk) 04:14, 13 September 2008 (UTC)
You can emulate this situation by moving your GPS fast but not over a long distance, but keep moving it. For example keep your GPS in your hand and swing from left to right at a fairly high speed. Because the movement is not more that a meter, timing is once a second (most receivers), the speed can not be more than 1 * 3.6 km/hour. If the indicated max speed is higher, the reason can be because it's using doppler speeds or error. If you set your GPS to recording once a second, you can see if there are positional error causing high speed, or not. If in the recorded track are no high speeds, het max speed in the receiver must be obtained in another way. (Could be doppler). ClockThe GPS system consists of three segments. Control, space and receiver. Both the control and space segment have very accurate clocks, but the receiver segment has a 'cheap' clock. The clock in the receiver is a quartz clock or an electronic ossilater. Quartz clocks are accurate to about 1 in a million. So the clock can drift 1 millionth of a second each second. If this is expressed in distance (multiplied with the speed of light) this is about 300 meters a second. If the clock is used for absolute distance measuring, it can be drifting 300 meters a second, more speed than we usually travel at, so that is not very usefull. If the clock is used to measure the time difference of arrival, which is at most 0.03 seconds (0.06 for a near satellite and 0.09 for a far satellite), the error is 'only' 9 meters (at most). For a typical constallation where the difference normally is less than 0.015 seconds the error distance is less then a few meters. And this is not increasing each second. For 2 channel receivers only the difference between two satellites can be measured at the time. But the error in the difference does not increase with time where the absolute error will increase in time. So using the quartz clock for measuring time difference of arrival a quartz clock is sufficient. Using the quartz clock for measuring time of arrival, the estimate would be more off than speeds we can travel at. And although the clock is corrected once a second this is still not sufficient for measuring absolute time. This is the reason why four satellites (even after the clock is set) are needed for each 3D positioning, because for 3D postioning 3 parameters are needed and four satellites only deliver 3 (independend) time differences. Sphere model for GPS.The sphere model for GPS is an excellent model to explain the principle workings of GPS. The shape of a sphere is well understood by most people, where hyperboloids are not. So using spheres there are many more people who can understand the explanation. Even the explaining that to correct the timing error a fourth satellite is needed is acceptable. Spheres are the basic shape how the signal expands. From a physical point of view (relativistic points excluded) the signals travel as spheres. From the receiver point of view they do not intersect at the receivers point but just arrive at different times. **) If the sphere model is used, and the 4th satellite has to be explained. It should be used to correct for the timing error. It should not be used to choose between the two points which are delivered by three intersection spheres. Depending on the timing the wrong point could be choosen. And even with four satellites there are still situations where there is more than one solution. (And here I do not mean the situation where three satellites are in line or four satellites are in the same plane which is very rare and then only for a very short time). But do not use the sphere model as a basis for the algorithm. The algorithm using spheres do not perform very well. The actual problem is the solving of 4 functions with four unknowns. Solving 4 functions with 4 unknowns is a simple mathematical tasks, provided that the functions are linear. But the functions are not they are quadratic. For 4 solving four quadratic functions with 4 unknowns there are no algorithms. This specific problem is know as a hyperbolic or hyperboloid positioning problem. For the specific problem at hand there is a solution in an iteration process where the four functions are linearized and those linearized functions get solved. The solution of the linearized functions does not give an exact solution to the quadratic functions, but within constraints given a starting solution it will give a better solution for the quadratic functions. With the specific problem of GPS the iteration towards a better solution is very fast. With a sufficient close first estimate, the improvement will be orders of magnitude. For example using the middle of the earth as a first estimate will give a very good solution in only 5 iterations. For normal use using the last known position only one iteration is needed for a good enough solution. Trilateration is a method to solve with triangles (hence the tri) where the distances are known. Knowing the distance to 3 known points one can calculate it's own position from with trilateration. Trilateration could be used in a iterating process, process your position using three satellites, use the fourth satellite to determine that there is still an error. There are ways to estimate the size and the direction of the error, correct with the estimate and start the proces over. Depending on the situation the first calculation of the trilateration could result in a non solvable situation. For example because the timing is to far of. Also with a wrong timing there is no way to discern between the two points the trilateration will result to. And although there is a way to estimate the size and the direction of the error, this method is not stable and not garanteed to iterrate towards a solution. One way to estimate the error is using the point from the first three satellites and calculate the difference to the sphere of the fourth satellite. But this does not indicate a direction or size with which the 'clock' can be corrected for. Another way is to do the calculation two times, but with a very small difference in the timing. Again calculate the error with the sphere to the fourth satellite and compare both results. The size of the error and the size of the difference in timing can be considered lineair. Correct the timing with these numbers and the next result will probably be far better. (In instabel situations this still might lead to wrong corrections, but that has a low likelyhood). Point is by the time you get an acceptabel estimate, the pseudorange calculation is allready finished is less than 1/10th of the time. Back to **). From the receiver point of view the signals arrive at different times. Know it's the receivers job to calculate the position from this. So receiving the signal from 2 satellites with a time difference of X, how does the receiver know where it is. First with two satellites it does not. There can be more points which have the same time difference of X. If you define all points with a time difference of X this will form a shape of a hyperboloid (in 3D space, in 2D space it would be a hperbole). More timedifferences will give 'extra' hyperboloids the receiver must be on all those hyperboloids. Two intersecting hyperboloids will form a curve, if closed this is an elipses, if open this is a hyperbole. A third independend hyperboloid which intersects will result to two points (if it was a closed curve) or a single point if it was an open curve.
Solving these four unknowns solves our location problem. Problem is that there is no algorithm to solve these four hyperboloid functions. One could iterate towards a solution and come arbitrary close to the solution, but can not solve the four unknowns. A good way to solve the 4 hyperboloid function is to linearize the functions and solve them. But do not go into algorithms using the spheres. Most people will not be able or want to understand the algorithms anyway. More specific triangulation and trilateration is used. Because the calculation is not done with angles as triangulation revers to, the use of the word triangulation is not correct. Trilateration is solving triangular problems (hence the tri-) but with known distances. Because the distances are not known the word is also not correct. So trilateration on its own does not solve the problem. Using trilateration as a part of an algoritm where a solution is found by iteration is possible. But then trilateration is not the solution but part of a solution. Next to the trilateration a method has to be found to estimate the error and correct for this. The trilateration only uses the info of three satellites so the info of the fourth satellite can still be used. If the fourth satellite coincides with the info of the three we (very probably) have the correct the solution. Is there an error with the distance to the fourth satellite then can this error be used to correct the timing error. The problem is that the error does not indicate in which direction the timing should be corrected (sometimes it is plus and sometimes it is minus and the error does not need to have the same sign) neither does the size of the error indicate the size needed for the correction. (Using the position of four satellites and a clock, using three for the trilateration and varying which satellite to be used as the fourth will give different different errors in size and in sign).
The sphere model is less suitable to explain why 4 satellites are needed for a positional calculation. The suggestion that with the signal of one satellite we can determine on which distance we are from the satellite is simply not true. So the size of the sphere can not be determined with the signal of the one satellite. In the same way two satellites do not determine a circle where the receiver of the satellite is. The reception of two satellites tells us that the receiver is anywhere on a hyperboloid. TOA (Spheres) is Better than TDOA (Hyperboloids)This is an older text first placed in the talk page of RH100. There are references to using hyperboloids in the Wikipedia GPS article. Analytic Geometry tells us that the locus of points which have a constant difference in distance from two satellite positions lie on a surface called a hyperboloid. Since this surface can be computed based on the difference in time of arrival at the GPS Receiver of messages from different satellites, it suggests that this data would reduce the error due to the GPS Receiver Clock. However judging from GPS literature it seems that spheres based on TOA are used more often. I think there is a good reason for this. It is because you can get a very good clock correction using trilateration with four spheres. This negates the time difference advantage of using hyperboloids in my opinion.RHB100 (talk) 21:39, 9 July 2008 (UTC)
Pseudorange calculations converges very fast. An example with (0, 0, 0) (centre of the earth) as a first estimate gave the following 'errors' (this is independend of the timing error):
So in most situations only one iteration will be sufficient. The above numbers where calculated using an implementation of the pseudorange calculation in a spreadsheat, only using + - * / and the squareroot. (Spreadsheat is available). The number of calculations needed for one iteration for the pseudorange calculation can be as low as 69 additions/subtractions, 42 multiplications, 22 divisions and 4 squareroots. Because only one iteration is needed in most situations, this is thus the amount of calculation needed for one positioning. I have not analysed the trilateration but having seen parts of the algoritm I estimate that the amount of calculations for one iteration does exceed the above numbers and the number of iterations needed is larger as wel. So my conclusion is that TDAO is far better than TOA. Based on the amount of calculation needed and based on the number of iterations needed. (But because I haven't seen the complete algoritm or implementation of TOA a real comparison can not be made). If you can show that TOA does produce better numbers than the above I will be very interrested. The reason why: "However judging from GPS literature it seems that spheres based on TOA are used more often." Is because this explanes the physics of the GPS system very well. The signals are spread in spheres (and not hyperboloids). And would the signals be timed in such a way that they arrive at the receivers end at the same time, the spheres exactly describe the situation at that point in time. But the picture is draw based on the knowledge where the point of the receiver is. It's much more difficult to explain the process if within that explanation the location of the receiver must be left unknown until the end of the explanation. Where those explanations very often fail is the explaining why a fourth satellite is needed. So sometimes this is described for picking the correct point of two. Or sometimes it is described that it's used to correct the clock. But with pseudorange calculation the whole calculation is based on the information of four satellites, the calculation of the clock error is just one of the results. Crazy Software Productions (talk) 19:58, 3 September 2008 (UTC) Layout exploration (tables/spreadsheets)For basic use of a wikitable, see Help:Wikitable.
CellsA "cell" can be thought of as a box for holding a datum. A single cell is usually referenced by its column and row (A2 would represent the cell below containing the value 10). Its physical size can usually be tailored for its content by dragging its height or width at box intersections (or for entire columns or rows by dragging the column or rows headers).
Decimal point alignmentA method to get columns of numbers aligned at the decimal point is as follows: {| cellpadding="0" cellspacing="0" |align="right"| 432 || .1 |- |align="right"| 43 || .21 |- |align="right"| 4 || .321 |} What it looks like in your browser:
Iteration using Trilateraton
The example
It is a regrettable that the author(s) of these parts of the articles have not checked for this. This is not the only problem for this supposed method of positional calculation. Conclusion:
Correcting a GPS receiver's clockThe method of calculating position for the case of no errors has been explained. One of the most significant error sources is the GPS receiver's clock. Because of the very large value of the speed of light, c, the estimated distances from the GPS receiver to the satellites, the pseudoranges, are very sensitive to errors in the GPS receiver clock. This suggests that an extremely accurate and expensive clock is required for the GPS receiver to work. On the other hand, manufacturers prefer to build inexpensive GPS receivers for mass markets. The solution for this dilemma is based on the way sphere surfaces intersect in the GPS problem. It is likely that the surfaces of the three spheres intersect, since the circle of intersection of the first two spheres is normally quite large, and thus the third sphere surface is likely to intersect this large circle. It is very unlikely that the surface of the sphere corresponding to the fourth satellite will intersect either of the two points of intersection of the first three, since any clock error could cause it to miss intersecting a point. However, the distance from the valid estimate of GPS receiver position to the surface of the sphere corresponding to the fourth satellite can be used to compute a clock correction. Let denote the distance from the valid estimate of GPS receiver position to the fourth satellite and let denote the pseudorange of the fourth satellite. Let . Note that is the distance from the computed GPS receiver position to the surface of the sphere corresponding to the fourth satellite. Thus the quotient, , provides an estimate of
and the GPS receiver clock can be advanced if is positive or delayed if is negative. Regrettabilly this does not work, in a single constellation one can get four different value's for da, depending on which satellite is used as the fourth satellite. Some of the values will converge towards a solution some of the values will not. Example, the constellation given on:
Will give the following four values for da (-1488.179383, -176.3092095, +148.8429348, -269.6591897) It is not possible that each of these value's does correct the clock into the right direction or with the right amount. In fact only two of the values actually converge to a smaller clock-error. Position calculation advanced
REPLACE THE ABOVE WITH
No clocktime, no first position. Generally the GPS receiver will use the last known position as the first estimate. But on a hard reset it is possible that there is no first estimate. Further if the receiver has nog been used for some time the the clock can have a difference with the clocktime of seconds. Most quartz clocks wil drift with about 1 second a week. So a cold start with a non usable clock time and no first estimate. If the center of the earth is used as the first estimate, we are of by about 6400 km, but for the satellites we are of by less then 14 degrees. Allthough 14 degrees is not 'totaly' flat is is sufficient flat to use the flat surfaces going through our first estimate (off by 14 degrees), the example below shows that only four iterations are needed to bring the estimate close enough to the enough to the receivers actual position. What did happen to the clock, in the pseudorange calculation the actual clock time does not play a role at all, only the differences in the reception time of the satellites are of importance. (TDOA Time Difference Of Arrival). Example:
No first estimate, so going with the centre of the earth as the first estimate. This is a huge difference (6400 km) from our actual position. But for any satellite the angular difference is less than 14 degrees, this is still in the same general direction. So there is no problem in using the centre of the earth as a first estimate for a cold start.
Although it is true that "There are no good general methods for solving systems of more than one nonlinear equations."
[8][9][11] [5]
pseudorange calculations
[[Pseudocode]] for the pseudorange calculations simplified: <span style="color: green;">''Pseudocode: Pseudorange calculation.''</span> <span style="color: green;">''Measured pseudorange distances:''</span> <span style="color: green;">''P(n) Measured pseudorange distances satellite n.''</span> <span style="color: green;">''E(n) Distance to estimate from satellite n to be calculated.''</span> <span style="color: green;">'' Matrix(n,o) (M stands the version of the matrix)''</span> <span style="color: green;">'' (N stands for the satellitenumber 1..4)''</span> <span style="color: green;">'' (O stands for orientation being x, y, z, delta-t and the column to solve 1..5)''</span> <span style="color: blue;">'' Matrix(row (=satnr), kolom (=orientation))''</span> <span style="color: blue;">'' Fifth column is used for the differences in distance.''</span> <span style="color: green;">''Temporary variables:''</span> <span style="color: green;">'' Divisor</span> <span style="color: green;">'' Multiplier</span> <span style="color: green;">''Estimated position for Xe, Ye, Ze.''</span> <span style="color: green;">''Use the last known position or use (0,0,0).''</span> '''for''' ever once a second <span style="color: red;">''Get the measurements P(n) for n = 1..4 ''</span> <span style="color: green;">''Main loop:''</span> <span style="color: green;">''Fill the matrix:''</span> '''for''' n '''from''' 1 to 4 E(n)= sqrt((Xn-Xe)^2+(Yn-Ye)^2+(Zn-Ze)^2) matrix(n,1) = (Xn-Xe)/E(n) <span style="color: blue;">''-- Vector from sat to estimate X value''</span> matrix(n,2) = (Yn-Ye)/E(n) <span style="color: blue;">''-- Vector from sat to estimate Y value''</span> matrix(n,3) = (Zn-Ze)/E(n) <span style="color: blue;">''-- Vector from sat to estimate Z value''</span> matrix(n,4) = -1 matrix(n,5) = E(n)-P(n) <span style="color: green;">''Solve the matrix:''</span> '''for''' m '''from''' 1 to 4 divisor = matrix(m,m) '''for''' o '''from''' 1 to 5 matrix(m,o) = matrix(m,o)/divisor '''for''' n '''from''' 1 to 4 multiplier = matrix(n,m) ??????? '''for''' o '''from''' 1 to 5 '''if''' m <> n '''then''' matrix(n,o) = matrix(n,o) - matrix(m,o) * multiplier <span style="color: green;">''Next estimated position:''</span> Xe=Xe + matrix(1,5) (X value) Ye=Ye + matrix(2,5) (Y value) Ze=Ze + matrix(3,5) (Z value) T =T + matrix(4,5) (Time, Bonus not strictly needed.)
Plane of three satellites intersecting the center of the Earth.In the references there is a remark (numbered 27 on 5-5-2010) which I think should be removed. Somebody put the remark there, so there must be some significance to it. It is not significant at all for Bancroft or pseudorange calculations and I do not think it is significant for other systems. It should be removed because the remark is false.
Why is the earth on the other side? When three points (A/B/C) form a plane the sides can be defined by the clockwise or anticlockwise order the points are in. The points (A/B/C) are free to move in 3D space, the plane moves with them and also the sides of the plane. A fourth point (centre of the earth) can only get from one side of the plane to the other side by travelling through the plane or by jumping. Remarks.
Disadvantage of Multidimensional Newton MethodIn February 2009 AxelBoldt did allready write: I removed the following sentence about Newton's method, then it was reinserted:
While it is true that there are no good general methods for solving nonlinear systems, I don't think that this can be counted as a disadvantage of Newton's method, for two reasons:
AxelBoldt (talk) 23:58, 10 February 2009 (UTC) And I do agree with Axel, if this is an issue it is an issue for the problem not for the solving method. The Bancroft method has sufficiently show that this advantage has been overcome, allthough also Bancroft still is not a general method. It is more general than Newton and iteration with trilateration. Why in a case of multiple solutions both Newton Raphson and iteration with trilateration will only find one solution, Bancroft can find two solutions. So this does disqualify Newton and also iteration with trilateration as a general method, therefore the remark does not apply to the Newton method and should not be 'aimed' at the Newton method. The sentence should be removed. Crazy Software Productions (talk) 12:58, 27 June 2010 (UTC)
TESTTESTTEST Crazy Software Productions (talk) 09:40, 13 February 2024 (UTC) GPS <iframe scrolling="no" title="GPS-20240210-13:46-1Level" src="https://www.geogebra.org/material/iframe/id/mpds3w9h/width/1536/height/784/border/888888/sfsb/true/smb/false/stb/false/stbh/false/ai/false/asb/false/sri/false/rc/false/ld/false/sdz/false/ctl/false" width="1536px" height="784px" style="border:0px;"> </iframe> GPS explained (???) using calipers and ruler testtesttest Crazy Software Productions (talk) 09:40, 13 February 2024 (UTC) GPS <ggb_applet id="mpds3w9h" width="1536" height="784" border="888888" />
|