In general, the condition is: I perform the parsing of one site from three geolocations (with known locations), in response json sends me from each such geo-location the distance to the object in kilometers / meters.

Actually the problem: It is necessary to calculate the geographical coordinates of the source object, albeit with small errors (for later display on the map).

In short, there is a point (X; Y) and a radius.
For example:
Measurement from the 1st position (x1, y1) to the object: 1.2 km
Measurement from the 2nd position (x2, y2) to the object: 3 km
Measurement from the 3rd position (x3, y4) to the object: 100 m
The object is the same, according to the intersection to be! (albeit with errors)

Help formulate a mathematical function (including the calculation of the error) or immediately an algorithm in C # :)

  • Add in the header that the трёх окружностей - vp_arth
  • 2
    Three circles may not have an intersection point. You need some kind of least squares optimization. Formulate your optimality criterion. - VladD
  • one
    In real data, it will not be exactly. Therefore, it is necessary to look for the intersection of flat figures formed by circles rd and r + d. - vp_arth
  • @vp_arth: So the whole area will turn out - VladD
  • Namely, the estimated location of the object. - vp_arth

1 answer 1

Your task is equivalent to what the GPS (GLONAS) satellite receiver solves.

Given the unknown coordinate of the object (in your flat case x and y) and the distance Ri to objects (satellites) with known coordinates (xi, yi) (all with errors). The problem is solved by minimizing the criterion of the total quadratic error Min{ Sum[(Xi-X)^2+(Yi-Y)^2-Ri^2]^2 } . To obtain equations, we need to take partial derivatives with respect to x and y from this criterion and equate them to zero.

As a result, you get a system of two cubic equations of relative two unknowns x and y.

How to solve such a system is the next question :)

  • But after all, if the measurement is three, then the system will be obtained from three equations, do I understand you correctly? - Aleksey S
  • Wrong :). The equations will be two, the terms in the original criterion are three. And the more measurements from different points of view, the more accurate the calculation will be, but there will still be only two equations. You differentiate the criterion for x and y, equate the result to zero and everything will immediately become clear. - Alexander Muksimov
  • There it is. I will try to solve. Thank you very much! - Aleksey S
  • If the answer helped you, then please vote for it, if you certainly want to be helped further - Alexander Muksimov
  • I would be glad, but not enough rating. How will appear - I will immediately note!) - Aleksey S