Algebraic Geodesy and Geoinformatics - 2009 - PART II APPLICATIONS 11 Ranging by Global Navigation Satellite Systems (GNSS) Overview First the observation equations are developed for implicit and explicit error definition, and simplified by preliminary elimination. These equations of the 4- Point Problem can be solved in symbolic way via different methods: Sturmfels’ method, Dixon resultant, standard Groebner basis, reduced Groebner basis and Global Symbolic Solver (GSS). All of these methods give the same result, a quadratic monomial. In addition Global Numerical Solver (GNS ) can provide a fast, numerical solution. For N- Point Problem the solution of the implicit and explicit error representation are different. However, one can use the result of the 4- Point Problem with the Gauss- Jacobi combinatorial algorithm for N- points, too, but the weights should be computed on the basis of the equations of the explicit distance error representation. ALESS model for explicit error representation can be also generated and solved by homotopy method as well as with Extended Newton- Raphson method and local minimization method employing a subset solution of the Gauss-Jacobi algorithm as initial condition. 11- 1 Problem definition 11- 1- 1 Observation equations Throughout history, position determination has been one of the most important tasks of mountaineers, pilots, sailor, civil engineers etc. In modern times, Global Navigation Satellite Systems (GNSS) provide an ultimate method to accomplish this task. If one has a hand held GNSS receiver, which measures the travel time of the signal transmitted from the satellites, the distance travelled by the signal from the satellites to the receiver can be computed by multiplying the measured time by the speed of light in vacuum. The distance of the receiver from the i-th GNSS satellite, the pseudo- range observations, di is related to the unknown position of the receiver, {x1 , x2 , x3 } by di = Hx1 - ai L2 + H x2 - bi L2 + Hx3 - ci L2 + x4 where 8ai , bi , ci <, i = 0, 1, 2, 3 are the coordinates of the ith satellite. The distance is influenced also by the satellite and receiver’ clock biases. The satellite clock bias can be modelled while the receiver’ clock bias has to be considered as an unknown variable, x4 . This means, we have four unknowns, consequently we need four satellite to provide a minimum observation. The general form of the equation for the i-th satellite is fi = Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - Hx4 - di L2 The residual of this type of equation represents the error implicitly. However in geodesy the explicit distance error definition is usual, namely, 2 RangingGNSS_11.nb The residual of this type of equation represents the error implicitly. However in geodesy the explicit distance error definition is usual, namely, gi = di - Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - x4 The relation between the two expressions, gi = di - fi + Hx4 - di L2 - x4 which implies that if fi = 0 then gi = 0 and vica versa. Therefore, in case of four observations, determined system, we employ the first expression, which is easy to handle as a polynomial. The observation equations, Clear@"Global‘*"D e1 = Hx1 - a0 L2 + Hx2 - b0 L2 + Hx3 - c0 L2 - Hx4 - d0 L2 ; e2 = Hx1 - a1 L2 + Hx2 - b1 L2 + Hx3 - c1 L2 - Hx4 - d1 L2 ; e3 = Hx1 - a2 L2 + Hx2 - b2 L2 + Hx3 - c2 L2 - Hx4 - d2 L2 ; e4 = Hx1 - a3 L2 + Hx2 - b3 L2 + Hx3 - c3 L2 - Hx4 - d3 L2 ; Let us suppose that the observation data are, data = 9a0 ® 1.483230866 107 , a1 ® - 1.579985405 107 , a2 ® 1.98481891 106 , a3 ® - 1.248027319 107 , b0 ® - 2.046671589 107 , b1 ® - 1.330112917 107 , b2 ® - 1.186767296 107 , b3 ® - 2.338256053 107 , c0 ® - 7.42863475 106 , c1 ® 1.713383824 107 , c2 ® 2.371692013 107 , c3 ® 3.27847268 106 , d0 ® 2.4310764064 107 , d1 ® 2.2914600784 107 , d2 ® 2.0628809405 107 , d3 ® 2.3422377972 107 =; 11- 1- 2 Preliminary elimination First, this system of polynomials, will be transformed into a system of linear equations and a quadratic equation. Let us expand and multiply by minus one, and arranged the original equations, eqsL = 8e1L, e2L, e3L, e4L< = Map@- Sort@Expand@ðDD &, 8e1, e2, e3, e4<D 9- x12 - x22 - x32 + x42 + 2 x1 a0 - a20 + 2 x2 b0 - b20 + 2 x3 c0 - c20 - 2 x4 d0 + d20 , - x12 - x22 - x32 + x42 + 2 x1 a1 - a21 + 2 x2 b1 - b21 + 2 x3 c1 - c21 - 2 x4 d1 + d21 , - x12 - x22 - x32 + x42 + 2 x1 a2 - a22 + 2 x2 b2 - b22 + 2 x3 c2 - c22 - 2 x4 d2 + d22 , - x12 - x22 - x32 + x42 + 2 x1 a3 - a23 + 2 x2 b3 - b23 + 2 x3 c3 - c23 - 2 x4 d3 + d23 = Subtruct the fourth equation from the other three ones, RangingGNSS_11.nb q = Table@eqsL@@iDD - eqsL@@4DD, 8i, 1, 3<D Simplify 92 x1 a0 - a20 - 2 x1 a3 + a23 + 2 x2 b0 - b20 - 2 x2 b3 + b23 + 2 x3 c0 - c20 - 2 x3 c3 + c23 - 2 x4 d0 + d20 + 2 x4 d3 - d23 , 2 x1 a1 - a21 - 2 x1 a3 + a23 + 2 x2 b1 - b21 - 2 x2 b3 + b23 + 2 x3 c1 - c21 - 2 x3 c3 + c23 - 2 x4 d1 + d21 + 2 x4 d3 - d23 , 2 x1 a2 - a22 - 2 x1 a3 + a23 + 2 x2 b2 - b22 - 2 x2 b3 + b23 + 2 x3 c2 - c22 - 2 x3 c3 + c23 - 2 x4 d2 + d22 + 2 x4 d3 - d23 = This is a system of three linear equations, and they can be written as, g1 = a0,3 x1 + b0,3 x2 + c0,3 x3 + d0,3 x4 + e0,3 ; g2 = g1 . 81 ® 2, 0 ® 1< x1 a1,3 + x2 b1,3 + x3 c1,3 + x4 d1,3 + e1,3 g3 = g1 . 81 ® 3, 0 ® 2< x1 a2,3 + x2 b2,3 + x3 c2,3 + x4 d2,3 + e2,3 The coefficients 9ai,3 , bi,3 , ci,3 , di,3 , ei,3 =, i = 0, .. 2, can be determined as, coeffs0 = Table@8Coefficient@q@@i + 1DD, x1D, Coefficient@q@@i + 1DD, x2D, Coefficient@q@@i + 1DD, x3D, Coefficient@q@@i + 1DD, x4D< Factor, 8i, 0, 2<D; which are the coefficients of the variables 8x1 , x2 , x3 , x4 <. The constant part is, coeffs1 = Table@8q@@iDD - coeffs0@@iDD.8x1, x2, x3, x4< Simplify<, 8i, 1, 3<D; Therefore, all of the coefficients are, coeffs = Table@Union@coeffs0@@iDD, coeffs1@@iDDD, 8i, 1, 3<D 992 Ha0 - a3 L, 2 Hb0 - b3 L, 2 Hc0 - c3 L, - 2 Hd0 - d3 L, - a20 + a23 - b20 + b23 - c20 + c23 + d20 - d23 =, 92 Ha1 - a3 L, 2 Hb1 - b3 L, 2 Hc1 - c3 L, - 2 Hd1 - d3 L, - a21 + a23 - b21 + b23 - c21 + c23 + d21 - d23 =, 92 Ha2 - a3 L, 2 Hb2 - b3 L, 2 Hc2 - c3 L, - 2 Hd2 - d3 L, - a22 + a23 - b22 + b23 - c22 + c23 + d22 - d23 == Let us assign these coefficients to the linear system, coeffsn = Flatten@ Table@Inner@ð1 ® ð2 &, 8ai,3 , bi,3 , ci,3 , di,3 , ei,3 <, coeffs@@i + 1DD, ListD, 8i, 0, 2<DD 9a0,3 ® 2 Ha0 - a3 L, b0,3 ® 2 Hb0 - b3 L, c0,3 ® 2 Hc0 - c3 L, d0,3 ® - 2 Hd0 - d3 L, e0,3 ® - a20 + a23 - b20 + b23 - c20 + c23 + d20 - d23 , a1,3 ® 2 Ha1 - a3 L, b1,3 ® 2 Hb1 - b3 L, c1,3 ® 2 Hc1 - c3 L, d1,3 ® - 2 Hd1 - d3 L, e1,3 ® - a21 + a23 - b21 + b23 - c21 + c23 + d21 - d23 , a2,3 ® 2 Ha2 - a3 L, b2,3 ® 2 Hb2 - b3 L, c2,3 ® 2 Hc2 - c3 L, d2,3 ® - 2 Hd2 - d3 L, e2,3 ® - a22 + a23 - b22 + b23 - c22 + c23 + d22 - d23 = In addition, we take one of the nonlinear equations, let say the fourth one, e4 Hx1 - a3 L2 + Hx2 - b3 L2 + Hx3 - c3 L2 - Hx4 - d3 L2 Now, we shall solve the linear system for the variables 8x1 , x2 , x3 <, with x4 as parameter. It means, the relations x1 = g1 (x4 ), x2 = g2 (x4 ) and x3 = g3 (x4 ) will be computed. To do that, different elimination methods can be employed. 3 4 RangingGNSS_11.nb 11- 2 GPS 4-Point Problem 11- 2- 1 Sturmfels' method The Sturmfels’ approach can be employed to solve the linear system of {g1 , g2 , g3 }. Depending on which variable one wants, the original system is rewritten such that this particular variable is hidden (i.e. is treated as a constant). If our interest is to solve x1 = g1 (x4 ), the equations are first homogenized using a new variable x5 and consider the variables x1 and x4 as well as the constant part as parameters, f1 = Ha0,3 x1 + d0,3 x4 + e0,3 L x5 + b0,3 x2 + c0,3 x3; f2 = Ha1,3 x1 + d1,3 x4 + e1,3 L x5 + b1,3 x2 + c1,3 x3; f3 = Ha2,3 x1 + d2,3 x4 + e2,3 L x5 + b2,3 x2 + c2,3 x3; The Jacobian determinant then becomes, ¶x2 f1 ¶x3 f1 ¶x5 f1 Jx1 = DetB ¶x2 f2 ¶x3 f2 ¶x5 f2 F; ¶x2 f3 ¶x3 f3 ¶x5 f3 Then the solution for x1 as function of x4 is, solx1 = Solve@Jx1 0, x1D 88x1 ® H- x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 x4 b0,3 c2,3 d1,3 - x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L<< Similarly, the homogenized system for x2 = g2 (x4 ) f4 = Hb0,3 x2 + d0,3 x4 + e0,3 L x5 + a0,3 x1 + c0,3 x3; f5 = Hb1,3 x2 + d1,3 x4 + e1,3 L x5 + a1,3 x1 + c1,3 x3; f6 = Hb2,3 x2 + d2,3 x4 + e2,3 L x5 + a2,3 x1 + c2,3 x3; then ¶x1 f4 ¶x3 f4 ¶x5 f4 Jx2 = DetB ¶x1 f5 ¶x3 f5 ¶x5 f5 F; ¶x1 f6 ¶x3 f6 ¶x5 f6 and its solution is, solx2 = Solve@Jx2 0, x2D 88x2 ® Hx4 a2,3 c1,3 d0,3 - x4 a1,3 c2,3 d0,3 - x4 a2,3 c0,3 d1,3 + x4 a0,3 c2,3 d1,3 + x4 a1,3 c0,3 d2,3 - x4 a0,3 c1,3 d2,3 + a2,3 c1,3 e0,3 a1,3 c2,3 e0,3 - a2,3 c0,3 e1,3 + a0,3 c2,3 e1,3 + a1,3 c0,3 e2,3 - a0,3 c1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L<< Finally x3 = g3 Hx4 L leads to f7 = Hc0,3 x3 + d0,3 x4 + e0,3 L x5 + a0,3 x1 + b0,3 x2; f8 = H c1,3 x3 + d1,3 x4 + e1,3 L x5 + a1,3 x1 + b1,3 x2; f9 = Hc2,3 x3 + d2,3 x4 + e2,3 L x5 + a2,3 x1 + b2,3 x2; RangingGNSS_11.nb ¶x1 f7 ¶x2 f7 ¶x5 f7 Jx3 = DetB ¶x1 f8 ¶x2 f8 ¶x5 f8 F; ¶x1 f9 ¶x2 f9 ¶x5 f9 solx3 = Solve@Jx3 0, x3D 88x3 ® H- x4 a2,3 b1,3 d0,3 + x4 a1,3 b2,3 d0,3 + x4 a2,3 b0,3 d1,3 x4 a0,3 b2,3 d1,3 - x4 a1,3 b0,3 d2,3 + x4 a0,3 b1,3 d2,3 - a2,3 b1,3 e0,3 + a1,3 b2,3 e0,3 + a2,3 b0,3 e1,3 - a0,3 b2,3 e1,3 - a1,3 b0,3 e2,3 + a0,3 b1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L<< Substituting the obtained expressions of x1 = g1 Hx4 L, x2 = g2 Hx4 L and x3 = g3 Hx4 L in the fourth equation e4 (x1 , x2 , x3 , x4 ), G = e4 . 8solx1@@1, 1DD, solx2@@1, 1DD, solx3@@1, 1DD<; This is a quadratic equation for x4 Exponent@G, x4, ListD 80, 1, 2< The coefficients of this equation, h2 x4 2 + h1 x4 + h0 = 0 are quite long expressions, therefore here we do not display them. h2 = CoefficientAG, x42 E Simplify; h1 = Coefficient@G, x4D Simplify; h0 = SimplifyAG - Ih2 x42 + h1 x4ME; The actual numeric solution of the original system means the evaluation of these coefficients with the numerical data, h2c = h2 . coeffsn . data - 0.91047 h1c = h1 . coeffsn . data 5.23339 ´ 107 h0c = h0 . coeffsn . data - 5.23341 ´ 109 and then solving the quadratic equation for variable x4 , solx4 = Solve@h2c x4 ^ 2 + h1c x4 + h0c 0, x4D 98x4 ® 100.001<, 9x4 ® 5.74799 ´ 107 == The two solutions are 8x41, x42< = x4 . solx4 9100.001, 5.74799 ´ 107 = Substituting these values in x1 = g1 (x4 ), we get x1 8X1, X2< = Map@x1 . solx1@@1, 1DD . coeffsn . data . x4 ® ð &, 8x41, x42<D 91.11159 ´ 106 , - 2.89212 ´ 106 = Similarly, the values for x2 are 8Y1, Y2< = Map@x2 . solx2@@1, 1DD . coeffsn . data . x4 ® ð &, 8x41, x42<D 9- 4.34826 ´ 106 , 7.56878 ´ 106 = and for x3 5 6 RangingGNSS_11.nb and for x3 8Z1, Z2< = Map@x3 . solx3@@1, 1DD . coeffsn . data . x4 ® ð &, 8x41, x42<D 94.52735 ´ 106 , - 7.20951 ´ 106 = We can select the proper solution according to their norms, Norm@8X1, Y1, Z1<D 6.37494 ´ 106 Norm@8X2, Y2, Z2<D 1.08456 ´ 107 The second position is in space, consequently, the first solution is admissible, SetPrecision @8X1, Y1, Z1<, 12D 91.11159045996 ´ 106 , - 4.34825863091 ´ 106 , 4.52735182025 ´ 106 = In order to get the symbolic expression for the coefficients of the quadratic equation, other methods also can be used. 11- 2- 2 Dixon Resultant << Resultant‘Dixon‘ Now we can solve the original system, eliminating the variables x2 and x3 to get x1 = g1 (x4 ), AbsoluteTiming @drx1 = DixonResultant @8g1 , g2 , g3 <, 8x2, x3<, 8u2, u3<D;D 80.0156250, Null< drx1 - x1 a2,3 b1,3 c0,3 + x1 a1,3 b2,3 c0,3 + x1 a2,3 b0,3 c1,3 - x1 a0,3 b2,3 c1,3 x1 a1,3 b0,3 c2,3 + x1 a0,3 b1,3 c2,3 - x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 - x4 b0,3 c2,3 d1,3 - x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 This is a linear expression contains only x1 and x4 , Exponent@drx1, 8x1, x2, x3, x4<D 81, 0, 0, 1< Then the solution for x1 solx1 = Solve@drx1 0, x1D 88x1 ® H- x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 x4 b0,3 c2,3 d1,3 - x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L<< Similarly, for the two additional variables, x2 = g2 (x4 ) and x3 = g3 (x4 ), drx2 = DixonResultant @8g1 , g2 , g3 <, 8x1, x3<, 8u1, u3<D x2 a2,3 b1,3 c0,3 - x2 a1,3 b2,3 c0,3 - x2 a2,3 b0,3 c1,3 + x2 a0,3 b2,3 c1,3 + x2 a1,3 b0,3 c2,3 - x2 a0,3 b1,3 c2,3 - x4 a2,3 c1,3 d0,3 + x4 a1,3 c2,3 d0,3 + x4 a2,3 c0,3 d1,3 - x4 a0,3 c2,3 d1,3 - x4 a1,3 c0,3 d2,3 + x4 a0,3 c1,3 d2,3 - a2,3 c1,3 e0,3 + a1,3 c2,3 e0,3 + a2,3 c0,3 e1,3 - a0,3 c2,3 e1,3 - a1,3 c0,3 e2,3 + a0,3 c1,3 e2,3 RangingGNSS_11.nb Exponent@drx2, 8x1, x2, x3, x4<D 80, 1, 0, 1< solx2 = Solve@drx2 0, x2D 88x2 ® Hx4 a2,3 c1,3 d0,3 - x4 a1,3 c2,3 d0,3 - x4 a2,3 c0,3 d1,3 + x4 a0,3 c2,3 d1,3 + x4 a1,3 c0,3 d2,3 - x4 a0,3 c1,3 d2,3 + a2,3 c1,3 e0,3 a1,3 c2,3 e0,3 - a2,3 c0,3 e1,3 + a0,3 c2,3 e1,3 + a1,3 c0,3 e2,3 - a0,3 c1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L<< and drx3 = DixonResultant @8g1 , g2 , g3 <, 8x1, x2<, 8u1, u2<D - x3 a2,3 b1,3 c0,3 + x3 a1,3 b2,3 c0,3 + x3 a2,3 b0,3 c1,3 - x3 a0,3 b2,3 c1,3 x3 a1,3 b0,3 c2,3 + x3 a0,3 b1,3 c2,3 - x4 a2,3 b1,3 d0,3 + x4 a1,3 b2,3 d0,3 + x4 a2,3 b0,3 d1,3 - x4 a0,3 b2,3 d1,3 - x4 a1,3 b0,3 d2,3 + x4 a0,3 b1,3 d2,3 - a2,3 b1,3 e0,3 + a1,3 b2,3 e0,3 + a2,3 b0,3 e1,3 - a0,3 b2,3 e1,3 - a1,3 b0,3 e2,3 + a0,3 b1,3 e2,3 Exponent@drx3, 8x1, x2, x3, x4<D 80, 0, 1, 1< solx3 = Solve@drx3 0, x3D 88x3 ® H- x4 a2,3 b1,3 d0,3 + x4 a1,3 b2,3 d0,3 + x4 a2,3 b0,3 d1,3 x4 a0,3 b2,3 d1,3 - x4 a1,3 b0,3 d2,3 + x4 a0,3 b1,3 d2,3 - a2,3 b1,3 e0,3 + a1,3 b2,3 e0,3 + a2,3 b0,3 e1,3 - a0,3 b2,3 e1,3 - a1,3 b0,3 e2,3 + a0,3 b1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L<< After substitution, we have again a quadratic equation for x4 , G = e4 . 8solx1@@1, 1DD, solx2@@1, 1DD, solx3@@1, 1DD<; Exponent@G, x4, ListD 80, 1, 2< The coefficents of the quadratic equation are, h2d = CoefficientAG, x42 E; h1d = Coefficient@G, x4D; h0d = SimplifyAG - Ih2d x42 + h1d x4ME; The coefficients provided by the Sturmfels’ method and the Dixon resultant are the same, 8h2 - h2d, h1 - h1d, h0 - h0d< Simplify 80, 0, 0< 11- 2- 3 Groebner basis First, again we want x1 = g(x4 ), therefore variables x2 and x3 should be eliminated from the Groebner basis, AbsoluteTiming @8gbx1< = GroebnerBasis @8g1 , g2 , g3 <, 8x1, x2, x3, x4<, 8x2, x3<D;D 80.0468750, Null< 7 8 RangingGNSS_11.nb gbx1 - x1 a2,3 b1,3 c0,3 + x1 a1,3 b2,3 c0,3 + x1 a2,3 b0,3 c1,3 - x1 a0,3 b2,3 c1,3 x1 a1,3 b0,3 c2,3 + x1 a0,3 b1,3 c2,3 - x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 - x4 b0,3 c2,3 d1,3 - x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 Now, the basis contains only one equation, Length@8gbx1<D 1 in which only x1 and x4 can be found, Exponent@gbx1, 8x1, x2, x3, x4<D 81, 0, 0, 1< Therefore x1 = g Hx4 L can be computed directly, solx1 = Solve@gbx1 0, x1D Simplify 88x1 ® Hb2,3 Hc1,3 Hx4 d0,3 + e0,3 L - c0,3 Hx4 d1,3 + e1,3 LL + b1,3 H- c2,3 Hx4 d0,3 + e0,3 L + c0,3 Hx4 d2,3 + e2,3 LL + b0,3 Hc2,3 Hx4 d1,3 + e1,3 L - c1,3 Hx4 d2,3 + e2,3 LLL Ha2,3 H- b1,3 c0,3 + b0,3 c1,3 L + a1,3 Hb2,3 c0,3 - b0,3 c2,3 L + a0,3 H- b2,3 c1,3 + b1,3 c2,3 LL<< Similarly, in the other cases 8gbx2< = GroebnerBasis @8g1 , g2 , g3 <, 8x1, x2, x3, x4<, 8x1, x3<D; Exponent@gbx2, 8x1, x2, x3, x4<D 80, 1, 0, 1< solx2 = Solve@gbx2 0, x2D Simplify 88x2 ® Ha2,3 H- c1,3 Hx4 d0,3 + e0,3 L + c0,3 Hx4 d1,3 + e1,3 LL + a1,3 Hc2,3 Hx4 d0,3 + e0,3 L - c0,3 Hx4 d2,3 + e2,3 LL + a0,3 H- c2,3 Hx4 d1,3 + e1,3 L + c1,3 Hx4 d2,3 + e2,3 LLL Ha2,3 H- b1,3 c0,3 + b0,3 c1,3 L + a1,3 Hb2,3 c0,3 - b0,3 c2,3 L + a0,3 H- b2,3 c1,3 + b1,3 c2,3 LL<< and 8gbx3< = GroebnerBasis @8g1 , g2 , g3 <, 8x1, x2, x3, x4<, 8x1, x2<D; Exponent@gbx3, 8x1, x2, x3, x4<D 80, 0, 1, 1< solx3 = Solve@gbx3 0, x3D Simplify 88x3 ® Ha2,3 Hb1,3 Hx4 d0,3 + e0,3 L - b0,3 Hx4 d1,3 + e1,3 LL + a1,3 H- b2,3 Hx4 d0,3 + e0,3 L + b0,3 Hx4 d2,3 + e2,3 LL + a0,3 Hb2,3 Hx4 d1,3 + e1,3 L - b1,3 Hx4 d2,3 + e2,3 LLL Ha2,3 H- b1,3 c0,3 + b0,3 c1,3 L + a1,3 Hb2,3 c0,3 - b0,3 c2,3 L + a0,3 H- b2,3 c1,3 + b1,3 c2,3 LL<< After substition them, we get G = e4 . 8solx1@@1, 1DD, solx2@@1, 1DD, solx3@@1, 1DD<; Exponent@G, x4, ListD 80, 1, 2< Then the coefficients of the quadratic equation are, RangingGNSS_11.nb Then the coefficients of the quadratic equation are, h2gR = CoefficientAG, x42 E; h1gR = Coefficient@G, x4D; h0gR = SimplifyAG - Ih2gR x42 + h1gR x4ME; We have again the same result, 8h2 - h2gR, h1 - h1gR, h0 - h0gR< Simplify 80, 0, 0< 11- 2- 4 Reduced Groebner basis First, again we want to determine x1 = g(x4 ), therefore variables x2 and x3 should be eliminated from the Groebner basis, AbsoluteTiming @8gbx1< = GroebnerBasis @8g1 , g2 , g3 <, 8x1, x2, x3, x4<, 8x2, x3<D;D 80.0468750, Null< gbx1 - x1 a2,3 b1,3 c0,3 + x1 a1,3 b2,3 c0,3 + x1 a2,3 b0,3 c1,3 - x1 a0,3 b2,3 c1,3 x1 a1,3 b0,3 c2,3 + x1 a0,3 b1,3 c2,3 - x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 - x4 b0,3 c2,3 d1,3 - x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 Now, the basis contains only one polynomial, Length@8gbx1<D 1 in which only x1 and x4 can be found, Exponent@gbx1, 8x1, x2, x3, x4<D 81, 0, 0, 1< Therefore x1 = g Hx4 L can be computed directly, solx1 = Solve@gbx1 0, x1D Simplify 88x1 ® Hb2,3 Hc1,3 Hx4 d0,3 + e0,3 L - c0,3 Hx4 d1,3 + e1,3 LL + b1,3 H- c2,3 Hx4 d0,3 + e0,3 L + c0,3 Hx4 d2,3 + e2,3 LL + b0,3 Hc2,3 Hx4 d1,3 + e1,3 L - c1,3 Hx4 d2,3 + e2,3 LLL Ha2,3 H- b1,3 c0,3 + b0,3 c1,3 L + a1,3 Hb2,3 c0,3 - b0,3 c2,3 L + a0,3 H- b2,3 c1,3 + b1,3 c2,3 LL<< Similarly, in the other cases 8gbx2< = GroebnerBasis @8g1 , g2 , g3 <, 8x1, x2, x3, x4<, 8x1, x3<D; Exponent@gbx2, 8x1, x2, x3, x4<D 80, 1, 0, 1< solx2 = Solve@gbx2 0, x2D Simplify 88x2 ® Ha2,3 H- c1,3 Hx4 d0,3 + e0,3 L + c0,3 Hx4 d1,3 + e1,3 LL + a1,3 Hc2,3 Hx4 d0,3 + e0,3 L - c0,3 Hx4 d2,3 + e2,3 LL + a0,3 H- c2,3 Hx4 d1,3 + e1,3 L + c1,3 Hx4 d2,3 + e2,3 LLL Ha2,3 H- b1,3 c0,3 + b0,3 c1,3 L + a1,3 Hb2,3 c0,3 - b0,3 c2,3 L + a0,3 H- b2,3 c1,3 + b1,3 c2,3 LL<< and 9 10 RangingGNSS_11.nb and 8gbx3< = GroebnerBasis @8g1 , g2 , g3 <, 8x1, x2, x3, x4<, 8x1, x2<D; Exponent@gbx3, 8x1, x2, x3, x4<D 80, 0, 1, 1< solx3 = Solve@gbx3 0, x3D Simplify 88x3 ® Ha2,3 Hb1,3 Hx4 d0,3 + e0,3 L - b0,3 Hx4 d1,3 + e1,3 LL + a1,3 H- b2,3 Hx4 d0,3 + e0,3 L + b0,3 Hx4 d2,3 + e2,3 LL + a0,3 Hb2,3 Hx4 d1,3 + e1,3 L - b1,3 Hx4 d2,3 + e2,3 LLL Ha2,3 H- b1,3 c0,3 + b0,3 c1,3 L + a1,3 Hb2,3 c0,3 - b0,3 c2,3 L + a0,3 H- b2,3 c1,3 + b1,3 c2,3 LL<< After substition them, we get G = e4 . 8solx1@@1, 1DD, solx2@@1, 1DD, solx3@@1, 1DD<; Exponent@G, x4, ListD 80, 1, 2< Then the coefficients of the quadratic equation are, h2gR = CoefficientAG, x42 E; h1gR = Coefficient@G, x4D; h0gR = SimplifyAG - Ih2gR x42 + h1gR x4ME; We have again the same result, 8h2 - h2gR, h1 - h1gR, h0 - h0gR< Simplify 80, 0, 0< 11- 2- 5 Global Symbolic Solver The solution of the system of 4 equations simultaneously in symbolic form, leads to a very large, impractical expression. However the solution of the linear system of 8g1 , g2 , g3 < with x4 as parameter is easy, AbsoluteTiming @solGSS3 = Solve@8g1 0, g2 0, g3 0<, 8x1, x2, x3<D;D 80.2187500, Null< solGSS3 88x1 ® - H- x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 x4 b0,3 c2,3 d1,3 - x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 L H- a2,3 b1,3 c0,3 + a1,3 b2,3 c0,3 + a2,3 b0,3 c1,3 - a0,3 b2,3 c1,3 - a1,3 b0,3 c2,3 + a0,3 b1,3 c2,3 L, x2 ® - H- x4 a2,3 c1,3 d0,3 + x4 a1,3 c2,3 d0,3 + x4 a2,3 c0,3 d1,3 - x4 a0,3 c2,3 d1,3 x4 a1,3 c0,3 d2,3 + x4 a0,3 c1,3 d2,3 - a2,3 c1,3 e0,3 + a1,3 c2,3 e0,3 + a2,3 c0,3 e1,3 - a0,3 c2,3 e1,3 - a1,3 c0,3 e2,3 + a0,3 c1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 L, x3 ® - H- H- a2,3 b0,3 + a0,3 b2,3 L H- a1,3 Hx4 d0,3 + e0,3 L + a0,3 Hx4 d1,3 + e1,3 LL + H- a1,3 b0,3 + a0,3 b1,3 L H- a2,3 Hx4 d0,3 + e0,3 L + a0,3 Hx4 d2,3 + e2,3 LLL H- H- a2,3 b0,3 + a0,3 b2,3 L H- a1,3 c0,3 + a0,3 c1,3 L + H- a1,3 b0,3 + a0,3 b1,3 L H- a2,3 c0,3 + a0,3 c2,3 LL<< The second order equation for solving x4 is, RangingGNSS_11.nb 11 solGSS34 = e4 . solGSS3 9- Hx4 - d3 L2 + H- b3 - H- x4 a2,3 c1,3 d0,3 + x4 a1,3 c2,3 d0,3 + x4 a2,3 c0,3 d1,3 - x4 a0,3 c2,3 d1,3 - x4 a1,3 c0,3 d2,3 + x4 a0,3 c1,3 d2,3 - a2,3 c1,3 e0,3 + a1,3 c2,3 e0,3 + a2,3 c0,3 e1,3 - a0,3 c2,3 e1,3 - a1,3 c0,3 e2,3 + a0,3 c1,3 e2,3 L Ha2,3 b1,3 c0,3 - a1,3 b2,3 c0,3 - a2,3 b0,3 c1,3 + a0,3 b2,3 c1,3 + a1,3 b0,3 c2,3 - a0,3 b1,3 c2,3 LL2 + H- a3 - H- x4 b2,3 c1,3 d0,3 + x4 b1,3 c2,3 d0,3 + x4 b2,3 c0,3 d1,3 - x4 b0,3 c2,3 d1,3 x4 b1,3 c0,3 d2,3 + x4 b0,3 c1,3 d2,3 - b2,3 c1,3 e0,3 + b1,3 c2,3 e0,3 + b2,3 c0,3 e1,3 - b0,3 c2,3 e1,3 - b1,3 c0,3 e2,3 + b0,3 c1,3 e2,3 L H- a2,3 b1,3 c0,3 + a1,3 b2,3 c0,3 + a2,3 b0,3 c1,3 - a0,3 b2,3 c1,3 - a1,3 b0,3 c2,3 + a0,3 b1,3 c2,3 LL2 + H- c3 - H- H- a2,3 b0,3 + a0,3 b2,3 L H- a1,3 Hx4 d0,3 + e0,3 L + a0,3 Hx4 d1,3 + e1,3 LL + H- a1,3 b0,3 + a0,3 b1,3 L H- a2,3 Hx4 d0,3 + e0,3 L + a0,3 Hx4 d2,3 + e2,3 LLL H- H- a2,3 b0,3 + a0,3 b2,3 L H- a1,3 c0,3 + a0,3 c1,3 L + H- a1,3 b0,3 + a0,3 b1,3 L H- a2,3 c0,3 + a0,3 c2,3 LLL2 = Exponent@solGSS34, x4D 82< This is the same equation what we have got by the different elimination techniques, for example with the Sturmfels’ method, SimplifyAh2 x42 + h1 x4 + h0 - solGSS34E 80< 11- 2- 6 Global Numeric Solver NSolve@8g1 0, g2 0, g3 0, e4 0< . coeffsn . data, 8x1, x2, x3, x4<D AbsoluteTiming 90.0312500, 99x1 ® - 2.89212 ´ 106 , x2 ® 7.56878 ´ 106 , x3 ® - 7.20951 ´ 106 , x4 ® 5.74799 ´ 107 =, 9x1 ® 1.11159 ´ 106 , x2 ® - 4.34826 ´ 106 , x3 ® 4.52735 ´ 106 , x4 ® 100.001=== NumberForm@%, 12D 90.0312500, 99x1 ® -2.89212341193 ´ 106 , x2 ® 7.56878434888 ´ 106 , x3 ® -7.20950510227 ´ 106 , x4 ® 5.74799181641 ´ 107 =, 9x1 ® 1.11159045996 ´ 106 , x2 ® -4.34825863091 ´ 106 , x3 ® 4.52735182025 ´ 106 , x4 ® 100.000550671 === 11- 2- 7 Linear Homotopy We have already solved this problem in Section 5- 10- 2. 11- 3 GPS N-point Problem 11- 3- 1 Observation equations In case of m > 4 satellites, the two representations, fi = Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - Hx4 - di L2 and 12 RangingGNSS_11.nb gi = di - Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - x4 will be not equivalent in least square sense, namely âfi m min x1 , x2 , x3 , x4 âgi 2 m ¹ min x1 , x2 , x3 , x4 i=1 i=1 Let us consider six satellites with the following numerical values, datan a2 b0 b3 c0 c3 d0 d3 = 8a0 ® 14 177 553.47, a1 ® 15 097 199.81, ® 23 460 342.33, a3 ® - 8 206 488.95, a4 ® 1 399 988.07, a5 ® 6 995 655.48, ® - 18 814 768.09, b1 ® - 4 636 088.67, b2 ® - 9 433 518.58, ® - 18 217 989.14, b4 ® - 17 563 734.90, b5 ® - 23 537 808.26, ® 12 243 866.38, c1 ® 21 326 706.55, c2 ® 8 174 941.25, ® 17 605 231.99, c4 ® 19 705 591.18, c5 ® - 9 927 906.48, ® 21 119 278.32, d1 ® 22 527 064.18, d2 ® 23 674 159.88, ® 20 951 647.38, d4 ® 20 155 401.42, d5 ® 24 222 110.91<; The number of the equations, m = 6; Let us see the result for the two different representations. In the first case the general form of the equation for the i-th satellite is, e = Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - Hx4 - di L2 ; The objective to be minimized is the sum of the residium of the equations, f = ApplyAPlus, TableAe2 . datan, 8i, 0, m - 1<EE Simplify JI- 6.99566 ´ 106 + x1M + 2 I2.35378 ´ 107 + x2M + I9.92791 ´ 106 + x3M - 1. I- 2.42221 ´ 107 + x4M N + 2 2 2 2 JI- 2.34603 ´ 107 + x1M + I9.43352 ´ 106 + x2M + I- 8.17494 ´ 106 + x3M 2 2 2 1. I- 2.36742 ´ 107 + x4M N + 2 2 JI- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M 2 2 2 1. I- 2.25271 ´ 107 + x4M N + 2 2 JI- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 2 2 2 1. I- 2.11193 ´ 107 + x4M N + 2 2 JI8.20649 ´ 106 + x1M + I1.8218 ´ 107 + x2M + I- 1.76052 ´ 107 + x3M 2 2 2 1. I- 2.09516 ´ 107 + x4M N + 2 2 JI- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2 2 2 1. I- 2.01554 ´ 107 + x4M N 2 2 The global minimum can be found by using the built-in function NMinimize, solN = NMinimize@f, 8x1, x2, x3, x4<D AbsoluteTiming 90.5000000, 92.21338 ´ 1018 , 9x1 ® 596 929., x2 ® - 4.84785 ´ 106 , x3 ® 4.08822 ´ 106 , x4 ® 13.4526=== or RangingGNSS_11.nb or NumberForm@%, 12D 90.5000000, 92.2133794032 ´ 1018 , 9x1 ® 596928.910449 , x2 ® -4.84784931442 ´ 106 , x3 ® 4.08822444717 ´ 106 , x4 ® 13.4525758574 === However, if we employ the norm of the distance instead of the residium of the equations, namely Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - x4; en = di - and then the objective is, fn = / ApplyAPlus, TableAen2 . datan, 8i, 0, m - 1<EE 2.25271 ´ 107 - I- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M 2 2.01554 ´ 107 - 2 2 2 - x4 + I- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2 2 2 - 2 + x4 2 2.09516 ´ 10 - I8.20649 ´ 10 + x1M + I1.8218 ´ 10 + x2M + I- 1.76052 ´ 10 + x3M 2.11193 ´ 107 - I- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 7 2 6 2 7 2 2 7 - x4 2 2 + - 2 x4 + 2.36742 ´ 107 - I- 2.34603 ´ 10 + x1M + I9.43352 ´ 10 + x2M + I- 8.17494 ´ 10 + x3M 7 7 2.42221 ´ 10 - 2 6 2 6 2 2 - x4 + I- 6.99566 ´ 10 + x1M + I2.35378 ´ 10 + x2M + I9.92791 ´ 10 + x3M 6 2 7 2 6 2 2 - x4 The optimum will be somewhat different, solNn = NMinimize@fn, 8x1, x2, x3, x4<D AbsoluteTiming 90.6562500, 936.1119, 9x1 ® 596 930., x2 ® - 4.84785 ´ 106 , x3 ® 4.08823 ´ 106 , x4 ® 15.5181=== or NumberForm@%, 12D 90.6562500, 936.1118812241 , 9x1 ® 596929.653491 , x2 ® -4.84785155261 ´ 106 , x3 ® 4.08822679566 ´ 106 , x4 ® 15.5180528678 === 11- 3- 2 Gauss - Jacobi solution 13 14 RangingGNSS_11.nb 11- 3- 2 Gauss - Jacobi solution Because in case of 4 satellites the two representation are the same, we can use the result of the GPS- 4 Point problem, but we should compute the weights of the Gauss-Jacobi algorithm on the basis of the second representation! First, the subsets should be determined. In our case n = 4; m = 6; The number of the subsets mn = Binomial@m, nD 15 These subsets are, qs = Partition@Map@ð - 1 &, Flatten@Subsets@Range@mD, 8n<DDD, nD 880, 1, 2, 3<, 80, 1, 2, 4<, 80, 1, 2, 5<, 80, 1, 3, 4<, 80, 1, 3, 5<, 80, 1, 4, 5<, 80, 2, 3, 4<, 80, 2, 3, 5<, 80, 2, 4, 5<, 80, 3, 4, 5<, 81, 2, 3, 4<, 81, 2, 3, 5<, 81, 2, 4, 5<, 81, 3, 4, 5<, 82, 3, 4, 5<< The value of the indices start from zero in correspondence of the indices of the coefficients of the equations. Now, we shall utilize the symbolic solution of the GPS 4-points problem, namely the expressions of the coefficients of the quadratic equation (h2 ,h1 ,h0 ). Therefore, we construct a new data list, datap similar to datan,which assignes the proper values to the coefficients of the equations of the subsets. This is the same technique that we have already used. datap = Table@Map@Select@datan, MemberQ@qs@@iDD, ð@@1, 2DDD &D . 8ð@@1DD ® 0, ð@@2DD ® 1, ð@@3DD ® 2, ð@@4DD ® 3< &, 8qs@@iDD<D, 8i, 1, mn<D; For example, the fourth subset is indexed as qs@@4DD 80, 1, 3, 4< and it has the proper data assignments, datap@@4DD 99a0 ® 1.41776 ´ 107 , a1 ® 1.50972 ´ 107 , a2 ® - 8.20649 ´ 106 , a3 ® 1.39999 ´ 106 , b0 ® - 1.88148 ´ 107 , b1 ® - 4.63609 ´ 106 , b2 ® - 1.8218 ´ 107 , b3 ® - 1.75637 ´ 107 , c0 ® 1.22439 ´ 107 , c1 ® 2.13267 ´ 107 , c2 ® 1.76052 ´ 107 , c3 ® 1.97056 ´ 107 , d0 ® 2.11193 ´ 107 , d1 ® 2.25271 ´ 107 , d2 ® 2.09516 ´ 107 , d3 ® 2.01554 ´ 107 == Now, we can employ the symbolic expressions of the coefficients of the quadratic equation for x4 , (h2 , h1 , h0 ), which were developed for the GPS 4-points problem. Let us consider the result of the Sturmfels’ approach. These coefficients can be evaluated for all of the 15 combinatorial subsets, (H2 , H1 , H0 ), H2 = Map@Hh2 . coeffsn . Flatten@ðDL &, datapD; H1 = Map@Hh1 . coeffsn . Flatten@ðDL &, datapD; H0 = Map@Hh0 . coeffsn . Flatten@ðDL &, datapD; It is useful to display these coeffients, H210 = Transpose@8H2, H1, H0<D; RangingGNSS_11.nb 15 H210c = Map@ð . datan &, H210D; TableForm@NumberForm@H210c, 12DD 99-0.914220949236 , 5.23741229849 ´ 107 , 4.90226817815 ´ 107 =, 9-0.934176403103 , 5.03968274999 ´ 107 , 7.91554182434 ´ 109 =, 9-0.921130625834 , 5.17418260148 ´ 107 , 3.43282824505 ´ 108 =, 9-0.86506089913 , 5.49504602842 ´ 107 , -1.02011051146 ´ 1010 =, 9-0.922335616485 , 5.18771660452 ´ 107 , 2.80298481247 ´ 108 =, 9-0.919296962706 , 5.15622329601 ´ 107 , 1.35426736626 ´ 109 =, 9-0.894980063579 , 5.33020056928 ´ 107 , -3.64264414758 ´ 109 =, 9-0.917233949645 , 5.21949461124 ´ 107 , 1.32408747325 ´ 108 =, 9-0.925853049262 , 5.11408476331 ´ 107 , 3.72671911237 ´ 109 =, 93369.83293929 , -1.79271333981 ´ 109 , 6.25161518563 ´ 1012 =, 9-0.877892756652 , 5.40238835657 ´ 107 , -6.51473528822 ´ 109 =, 9-0.942581538319 , 5.07933615304 ´ 107 , 7.84684296266 ´ 108 =, 9-0.908215141659 , 5.22466420795 ´ 107 , -2.49905474796 ´ 109 =, 9-0.883364070549 , 5.3566554387 ´ 107 , -5.4814110355 ´ 109 =, 9-0.866750765656 , 5.43806482092 ´ 107 , -7.32087148965 ´ 109 == This table indicates that the 10th combination has a poor geometry (see first column and Fig.11.1), which fact can be also detected by computing its PDOP (Position Dilution of Precision), see the text book. Then the 15 quadratic equations can be solved for x4 , ListPlot@H2, PlotRange ® All, Joined ® TrueD 3000 2500 2000 1500 1000 500 2 4 6 8 10 12 14 Fig. 11.1 Computed values of H2 coefficients AbsoluteTiming @ X4 = Map@x4 . Solve@ð@@1DD x4 ^ 2 + ð@@2DD x4 + ð@@3DD 0, x4D@@1, 1DD &, H210cD;D 80.0156250, Null< These values of x4 can be substituted into the symbolic relations x1 = g(x4 ), x2 = g(x4 ) and x3 = g(x4 ) developed for GPS 4 points problem. X1 = MapThread@Hx1 . solx1@@1, 1DD . coeffsn . Flatten@ð1D . x4 ® ð2L &, 8datap, X4<D; X2 = MapThread@Hx2 . solx2@@1, 1DD . coeffsn . Flatten@ð1D . x4 ® ð2L &, 8datap, X4<D; X3 = MapThread@Hx3 . solx3@@1, 1DD . coeffsn . Flatten@ð1D . x4 ® ð2L &, 8datap, X4<D; Let us display these solutions for (x1 , x2 , x3 , x4 ), 16 RangingGNSS_11.nb X = Transpose@8X1, X2, X3, X4<D; TableForm@NumberForm@X, 12DD 99596925.34851 , -4.84781736178 ´ 106 , 4.08820678223 ´ 106 , -0.936009582341 =, 9596790.312355 , -4.84776576369 ´ 106 , 4.08811570918 ´ 106 , -157.063830637 =, 9596920.419812 , -4.8478154785 ´ 106 , 4.08820345814 ´ 106 , -6.63453168162 =, 9596972.826096 , -4.84793343649 ´ 106 , 4.08841209091 ´ 106 , 185.642392703 =, 9596924.211793 , -4.8478145827 ´ 106 , 4.08820186669 ´ 106 , -5.40311809007 =, 9596859.971466 , -4.8478297585 ´ 106 , 4.0882288277 ´ 106 , -26.2647029492 =, 9596973.577873 , -4.84776247186 ´ 106 , 4.08839986702 ´ 106 , 68.3397984764 =, 9596924.234055 , -4.84781863015 ´ 106 , 4.08820232054 ´ 106 , -2.53681153606 =, 9596858.765038 , -4.84776453408 ´ 106 , 4.08822184676 ´ 106 , -72.8715766031 =, 9596951.527532 , -4.85277957102 ´ 106 , 4.0887586427 ´ 106 , 3510.40023708 =, 9597004.756243 , -4.84796522251 ´ 106 , 4.08830061355 ´ 106 , 120.590146886 =, 9596915.865748 , -4.84779970447 ´ 106 , 4.08819557703 ´ 106 , -15.4485556315 =, 9596948.56186 , -4.84791295488 ´ 106 , 4.08825215988 ´ 106 , 47.8319127582 =, 9597013.719411 , -4.84797414523 ´ 106 , 4.08826932057 ´ 106 , 102.329155723 =, 9597013.130018 , -4.84801967653 ´ 106 , 4.08827395652 ´ 106 , 134.62302196 == The poor geometry of the 10th combination can be also realized in Fig.11.2 as well as in the last column of X. ListPlot@X4, PlotRange ® All, Joined ® TrueD 3500 3000 2500 2000 1500 1000 500 2 4 6 8 10 12 14 Fig. 11.2 Computed values of variable x4 Computing the arithmetic average, Mean@XD 9596 933., - 4.84818 ´ 106 , 4.08828 ´ 106 , 258.84= NumberForm@%, 12D 9596933.148521 , -4.84818488616 ´ 106 , 4.08828286929 ´ 106 , 258.839835258 = But it is far from the acceptable solution. In order to compute the weights of these solutions, one has to compute the square of the 15 Jacobi determinants. Each has size of 4 4, because of four equations and four variables. Starting with the general form of the i-th equation, en - x4 - Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di The partial derivatives are, RangingGNSS_11.nb 17 de = 8D@en, x1D, D@en, x2D, D@en, x3D, D@en, x4D< Simplify : - x1 + ai , Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 2 2 - x2 + bi - x3 + ci Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 2 , 2 Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 2 , - 1> 2 The numerical values of these partial derivatives will be computed at the corresponding combinatorial solutions. Therefore, the weights, Π j , the square of the 15 Jacobi determinants are, Πs = TableAMapAHDet@8Hde . i ® ð@@1DDL, Hde . i ® ð@@2DDL, Hde . i ® ð@@3DDL, Hde . i ® ð@@ 4DDL< . datanDL2 &, qsE@@jDD . 8x1 ® X@@j, 1DD, x2 ® X@@j, 2DD, x3 ® X@@j, 3DD, x4 ® X@@j, 4DD<, 8j, 1, mn<E 80.0827252, 0.012777, 0.100156, 0.0273701, 0.498561, 0.211169, 0.0154972, 0.303065, 0.124842, 0.000121972, 0.0464547, 0.0340144, 0.0958754, 0.17896, 0.110697< The sum of these weights are sΠ, sΠ = âΠ j 15 j=1 sΠs = Apply@Plus, Πs D 1.84229 Then the weighted solution of the variable xi is xi = 1 sΠ âxi HjL 15 j=1 8X1s, X2s, X3s, X4s< = Map@Πs .ð &, 8X1, X2, X3, X4<D sΠs 9596 930., - 4.84785 ´ 106 , 4.08823 ´ 106 , 15.5192= NumberForm@%, 12D 9596929.654323 , -4.84785155418 ´ 106 , 4.08822679634 ´ 106 , 15.5192493007 = The result is correct. 11- 3- 3 ALESS Equations The equations of the determined model, vj = ¶ ¶ xj âgi 2 = â m i =1 The prototype of gi , en - x4 - since Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di m i =1 ¶ ¶ xj gi 2 , j = 1, ... 4 18 RangingGNSS_11.nb MapADAen2 , ðE &, 8x1, x2, x3, x4<E :- 2 Hx1 - ai L - x4 - Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di , Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 2 Hx2 - bi L - x4 - 2 2 Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di , Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 2 Hx3 - ci L - x4 - 2 2 Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di , Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 - 2 - x4 - Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di > then in general form, m-1 v = MapBâ ð &, %F i=0 :â -1+m 2 Hx1 - ai L - x4 - â - 2 Hx2 - bi L - x4 - â - 2 2 Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 i=0 -1+m , Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 i=0 -1+m Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di 2 Hx3 - ci L - x4 - â - 2 - x4 - Hx1 - ai L + Hx2 - bi L + Hx3 - ci L 2 i=0 In our case m = 6, therefore the numeric form of the equations, vn = v . m ® m . datan Expand; vn@@1DD 2 Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di > For example the first equation , 2 Hx1 - ai L2 + Hx2 - bi L2 + Hx3 - ci L2 + di 2 i=0 -1+m 2 , RangingGNSS_11.nb 6.80191 ´ 1014 - 1.05849 ´ 108 + 12 x1 + I- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M 2 2 2 4.50541 ´ 107 x1 + I- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M 2 2 2 5.64346 ´ 1013 I- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2 2 2 4.03108 ´ 107 x1 I- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2 2 2 3.43879 ´ 1014 I8.20649 ´ 106 + x1M + I1.8218 ´ 107 + x2M + I- 1.76052 ´ 107 + x3M 2 2 2 4.19033 ´ 107 x1 + I8.20649 ´ 106 + x1M + I1.8218 ´ 107 + x2M + I- 1.76052 ´ 107 + x3M 2 2 2 5.98839 ´ 1014 I- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 2 2 2 4.22386 ´ 107 x1 + I- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 2 2 2 1.11081 ´ 1015 I- 2.34603 ´ 107 + x1M + I9.43352 ´ 106 + x2M + I- 8.17494 ´ 106 + x3M 2 2 2 4.73483 ´ 107 x1 + I- 2.34603 ´ 107 + x1M + I9.43352 ´ 106 + x2M + I- 8.17494 ´ 106 + x3M 2 2 2 - 19 20 RangingGNSS_11.nb 3.38899 ´ 1014 I- 6.99566 ´ 106 + x1M + I2.35378 ´ 107 + x2M + I9.92791 ´ 106 + x3M 2 2 2 4.84442 ´ 107 x1 I- 6.99566 ´ 10 + x1M + I2.35378 ´ 10 + x2M + I9.92791 ´ 10 + x3M 2 6 2 7 2 6 3.01944 ´ 107 x4 + I- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M 2 2 2 2 x1 x4 I- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M 2 2 2 2.79998 ´ 106 x4 + I- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2 2 2 2 x1 x4 + I- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2 2 2 1.6413 ´ 107 x4 + I8.20649 ´ 106 + x1M + I1.8218 ´ 107 + x2M + I- 1.76052 ´ 107 + x3M 2 2 2 2 x1 x4 I8.20649 ´ 106 + x1M + I1.8218 ´ 107 + x2M + I- 1.76052 ´ 107 + x3M 2 2 2 2.83551 ´ 107 x4 + I- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 2 2 2 2 x1 x4 I- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 2 2 2 + RangingGNSS_11.nb 21 4.69207 ´ 107 x4 + I- 2.34603 ´ 107 + x1M + I9.43352 ´ 106 + x2M + I- 8.17494 ´ 106 + x3M 2 2 2 2 x1 x4 I- 2.34603 ´ 107 + x1M + I9.43352 ´ 106 + x2M + I- 8.17494 ´ 106 + x3M 2 2 2 1.39913 ´ 107 x4 + I- 6.99566 ´ 106 + x1M + I2.35378 ´ 107 + x2M + I9.92791 ´ 106 + x3M 2 2 2 2 x1 x4 I- 6.99566 ´ 106 + x1M + I2.35378 ´ 107 + x2M + I9.92791 ´ 106 + x3M 2 2 2 11- 3- 4 ALESS Numeric Now, to solve the ALESS equations, let us employ the homotopy method. In this case the system is not a polynomial one. We can not generate complex start system and its solution. However, we can use for example, fixed point homotopy. In order to illustrate the robustness of the method, we employ the result of the worst geometry of Gauss-Jacobi solution, that of the combination 10th . This will be the solution of the start system, X0 = 8X@@10DD< 99596 952., - 4.85278 ´ 106 , 4.08876 ´ 106 , 3510.4== The variables, V = 8x1, x2, x3, x4<; The start system itself, gF = V - First@X0D 9- 596 952. + x1, 4.85278 ´ 106 + x2, - 4.08876 ´ 106 + x3, - 3510.4 + x4= To avoid singularity of the homotopy function, let Γ = ä 81, 1, 1, 1<; << GeoAlgebra‘LinearHomotopy‘ Now employing path tracing by integration with high precision, AbsoluteTiming @solH = LinearHomotopyFR @vn, gF, V, X0, Γ, 10, ΛD;D 80.2031250, Null< solH@@1DD 99596 930., - 4.84785 ´ 106 , 4.08823 ´ 106 , 15.5181== NumberForm@%, 10D 99596929.6535, -4.847851553 ´ 106 , 4.088226796 ´ 106 , 15.5180506== Displaying the homotopy paths, RangingGNSS_11.nb GraphicsArray A TableA9ParametricPlot AH8Re@V@@iDD@ΛDD, Im@V@@iDD@ΛDD< . solH@@2, 1DDL 106 , 8Λ, 0, 1<, PlotRange ® All, BaseStyle -> 8FontSize ® 10, FontFamily -> "Times"<, Axes -> None, FrameLabel ® 8"Re", "Im"<, Frame ® True, AspectRatio ® 0.6, PlotLabel -> StringJoinAToString@V@@iDDD, "HΛL 10-6 "E, Epilog ® 9PointSize@0.02D, Blue, PointA9Re@X0@@1, iDDD 106 , Im@X0@@1, iDDD 106 =E, PointSize@0.02D, Red, PointA9HHRe@V@@iDD@ΛDD . solH@@2, 1DDL . Λ ® 1L 106 , HHIm@V@@iDD@ΛDD . solH@@2, 1DDL . Λ ® 1L 106 =E=E=, 8i, 1, Length@VD<EE x1HΛL 10-6 Im 0.0005 0.0000 -0.0005 0.5970 0.5975 0.5980 0.5985 Re x2HΛL 10-6 0.0000 Im -0.0005 -0.0010 -0.0015 -0.0020 -4.853 -4.852 -4.851 -4.850 -4.849 -4.848 Re x3HΛL 10-6 0.0006 0.0004 Im 22 0.0002 0.0000 -0.0002 4.0882 4.0884 4.0886 4.0888 4.0890 4.0892 4.0894 Re RangingGNSS_11.nb 23 x4HΛL 10-6 0.0015 Im 0.0010 0.0005 0.0000 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Re Fig. 11.3 Homotopy paths 11- 3- 5 Extended Newton- Raphson solution Now, we solve the original overdetermined system employing one of the solutions of the Gauss-Jacobi subset solution. Let us use again the worst combination, X0 = X@@10DD 9596 952., - 4.85278 ´ 106 , 4.08876 ´ 106 , 3510.4= << GeoAlgebra‘NewtonExtended‘ The equations of the overdetermined system, F = Table@en, 8i, 0, m - 1<D . datan :2.11193 ´ 107 - I- 1.41776 ´ 107 + x1M + I1.88148 ´ 107 + x2M + I- 1.22439 ´ 107 + x3M 2.25271 ´ 107 - I- 1.50972 ´ 107 + x1M + I4.63609 ´ 106 + x2M + I- 2.13267 ´ 107 + x3M - x4, 2.36742 ´ 107 - I- 2.34603 ´ 107 + x1M + I9.43352 ´ 106 + x2M + I- 8.17494 ´ 106 + x3M - x4, 2.09516 ´ 107 - I8.20649 ´ 106 + x1M + I1.8218 ´ 107 + x2M + I- 1.76052 ´ 107 + x3M 2.01554 ´ 107 - I- 1.39999 ´ 106 + x1M + I1.75637 ´ 107 + x2M + I- 1.97056 ´ 107 + x3M 2.42221 ´ 107 - I- 6.99566 ´ 106 + x1M + I2.35378 ´ 107 + x2M + I9.92791 ´ 106 + x3M 2 2 2 2 2 2 2 - x4, 2 AbsoluteTiming @solNE = NewtonExtended @F, V, X0D;D 80.1406250, Null< The solution is, solNE Last 9596 930., - 4.84785 ´ 106 , 4.08823 ´ 106 , 15.5181= NumberForm@%, 11D 9596929.65349 , -4.8478515526 ´ 106 , 4.0882267957 ´ 106 , 15.518050627 = The convergence is fast, 2 2 2 - x4, 2 2 2 2 2 2 2 - x4, - x4> 24 RangingGNSS_11.nb The convergence is fast, Take@solNE, 6D NumberForm@ð, 11D & 99596951.52753 , -4.852779571 ´ 106 , 4.0887586427 ´ 106 , 3510.4002371 =, 9596929.64082 , -4.8478519328 ´ 106 , 4.0882268026 ´ 106 , 16.063244573 =, 9596929.65349 , -4.8478515526 ´ 106 , 4.0882267957 ´ 106 , 15.518050621 =, 9596929.65349 , -4.8478515526 ´ 106 , 4.0882267957 ´ 106 , 15.518050634 =, 9596929.65349 , -4.8478515526 ´ 106 , 4.0882267957 ´ 106 , 15.518050632 =, 9596929.65349 , -4.8478515526 ´ 106 , 4.0882267957 ´ 106 , 15.518050625 == 11- 3- 6 Direct Least Square via Local Minimization We have solved the problem with global minimization, here we solve with a local method. Again we use the worst GaussJacobi subset solution as initial guess, Off@FindMinimum::"precw"D FindMinimum@SetPrecision @fn, 30D, 88x1, X@@10, 1DD<, 8x2, X@@10, 2DD<, 8x3, X@@10, 3DD<, 8x4, X@@10, 4DD<<, WorkingPrecision ® 30, Method ® "ConjugateGradient "D AbsoluteTiming 90.0625000, 936.1118812260659677734046725568 , 9x1 ® 596 929.653490602214749007150624 , x2 ® - 4.84785155260431963584465383855 ´ 106 , x3 ® 4.08822679566190133667228813841 ´ 106 , x4 ® 15.5180506268643920979254919837 === NumberForm@%, 11D 90.0625000, 936.111881226 , 9x1 ® 596929.65349 , x2 ® -4.8478515526 ´ 106 , x3 ® 4.0882267957 ´ 106 , x4 ® 15.518050627 === We needed high precision computation to reach acceptable solution, but even doing that the computation time is short. Conclusions For solving GPS ranging problem all of the methods introduced here are efficient. Concerning the implementation out of Mathematica perhaps the results of the Dixon and Groebner methods for 4- point problem, and Gauss- Jacobi as well as Extended Newton- Raphson method for N- point problem are mostly recommended.