Determine the position of a point in three-dimensional space, taking into account the distance to N points with known coordinates

I am trying to determine the coordinates (x, y, z) of a point p. I have distances to 4 different points m1, m2, m3, m4 with known coordinates.

In detail: I have the coordinates of 4 points (m1, m2, m3, m4), and they are not in the same plane:

m1: (x1,y1,z1),

m2: (x2,y2,z2),

m3: (x3,y3,z3),

m4: (x4,y4,z4)

and Euclidean distances form m1-> p, m2-> p, m3-> p and m4-> p, which

D1 = sqrt( (x-x1)^2 + (y-y1)^2 + (z-z1)^2);

D2 = sqrt( (x-x2)^2 + (y-y2)^2 + (z-z2)^2);

D3 = sqrt( (x-x3)^2 + (y-y3)^2 + (z-z3)^2);

D4 = sqrt( (x-x4)^2 + (y-y4)^2 + (z-z4)^2);

I am looking for (x, y, z). I tried to solve this non-linear system of 4 equations and 3 unknowns with the fsolve matrix, taking Euclidean distances, but could not cope.

There are two questions:

  • How to find the unknown coordinates of p: (x, y, z)
  • What is the minimum number of points m with known coordinates and the distance to p that I need to find (x, y, z)?

EDIT:

, :

, :

m1 = [ 370; 1810;  863];

m2 = [1586;  185; 1580];

m3 = [1284; 1948;  348];

m4 = [1732; 1674; 1974];

x = cat(2,m1,m2,m3,m4)';

p

d = [1387.5; 1532.5; 1104.7; 0855.6]

, , fsolve, : 1. 2. fsolve

function F = calculateED(p)

m1 = [ 370; 1810;  863];

m2 = [1586;  185; 1580];

m3 = [1284; 1948;  348];

m4 = [1732; 1674; 1974];

x = cat(2,m1,m2,m3,m4)';

d = [1387.5; 1532.5; 1104.7; 0855.6]

F = [d(1,1)^2 - (p(1)-x(1,1))^2 - (p(2)-x(1,2))^2 - (p(3)-x(1,3))^2;
 d(2,1)^2 - (p(1)-x(2,1))^2 - (p(2)-x(2,2))^2 - (p(3)-x(2,3))^2;
 d(3,1)^2 - (p(1)-x(3,1))^2 - (p(2)-x(3,2))^2 - (p(3)-x(3,3))^2;
 d(4,1)^2 - (p(1)-x(4,1))^2 - (p(2)-x(4,2))^2 - (p(3)-x(4,3))^2;];

fsolve:

p0 = [1500,1500,1189];  % initial guess
options = optimset('Algorithm',{'levenberg-marquardt',.001},'Display','iter','TolX',1e-1);                     
[p,Fval,exitflag] = fsolve(@calculateED,p0,options);

Matlab 2011b.

- ?

?

, m1, m2, m3, m4 d , , .

+4
3

numericall :

p = Table[ RandomReal[{-1, 1}, {3}], {3}]
r = RandomReal[{1, 2}, {3}]
Reduce[Simplify[ Table[Norm[{x, y, z} - p[[i]]] == r[[i]] , {i, 3}], 
      Assumptions -> {Element[x | y | z, Reals]}], {x, y, z}, Reals]

false, .

, .

      (*   (x == -0.218969 && y == -0.760452 &&  z == -0.136958) ||
           (x == 0.725312 && y == 0.466006 &&   z == -0.290347)  *)

. , , , - , , , .

Dmitys:

p = {{370, 1810, 863}, {1586, 185, 1580}, {1284, 1948, 348}, {1732, 
1674, 1974}};
r = {1387.5, 1532.5, 1104.7, 0855.6};
solution = {x, y, z} /. 
              Last@FindMinimum[ 
                     Sum[(Norm[{x, y, z} - p[[i]]] - r[[i]] )^2, {i, 1, 4}] , {x, y, z}]
Table[ Norm[ solution - p[[i]]], {i, 4}]

, .

(* solution point {1761.3, 1624.18, 1178.65} *)
(* solution radii: {1438.71, 1504.34, 1011.26, 797.446} *)
+2

. X. A X A, X A.

, , , ( , ).

, .

, .

GPS. . GPS , , , . , , "", .

question, .

+1

Take the first three equations and solve i for 3 equations and 3 variables in MATLAB. After solving the equation, you get two pairs of values ​​or we can say two sets of p coordinates. store each set in the 4th equation and you can find out that a set that satisfies the equation is the answer

0
source

All Articles