When formulated correctly, the problem of multilateration is a problem of optimization.
Most scientific examples, such as wikipedia , engage in exactly three circles and suggest accurate information. These circumstances can greatly simplify the formulation of tasks with accurate answers and are usually not suitable for practical situations such as those that you describe.
A problem in R 2 or R 3 is Euclidean space with distances that contain a measurement error, a region of interest (ellipse) or volume (ellipsoid) of a point. If a point estimate is needed instead of an area, you must use the area centroid or volume centroid. R 2 requires at least 3 non-degenerate points and distances to obtain a single region; and thus, the space R 3 requires at least 4 non-degenerate points and distances to obtain a single domain.
Here is an open source Java library that will easily meet your needs: https://github.com/lemmingapex/Trilateration

It uses the popular nonlinear least squares optimizer, the Levenberg-Marquardt algorithm, from Apache Commons Math.
double[][] positions = new double[][] { { 5.0, -6.0 }, { 13.0, -15.0 }, { 21.0, -3.0 }, { 12.42, -21.2 } }; double[] distances = new double[] { 8.06, 13.97, 23.32, 15.31 }; NonLinearLeastSquaresSolver solver = new NonLinearLeastSquaresSolver(new TrilaterationFunction(positions, distances), new LevenbergMarquardtOptimizer()); Optimum optimum = solver.solve();
source share