Trilateration with DWM1001

Hi all,
I used 3 anchors and 1 Tag based on DWM1001c module. for now, I have the range from the tag to each anchor and the know positions of the three anchors in a backend server with flask.
I would like to compute the estimated value of the tag. I found this in Wikipedia

I would like to know if it’is working well ? Does anymone test it before ?
what is the difference between this method and least square method ?

Both this method and least squares should give you the same answer. You have 3 measurements and 3 unknowns, assuming a sensible geometry and sensible measurements that should only give one solution (with an ambiguity as to which side of the plane defined by the 3 anchors you are on).

The advantage of least squares is that if you had 4 anchors then it would give you the best fit solution for all 4 measurements. This method would give you 4 different answers depending on which set of 3 anchors you used.

@AndyA thank you for your response.

Did you know any implementations of LSE with python ?

scipy.optimize includes a function called least_squares

My initial prototypes used this for position calculation. No complaints about the accuracy, it worked well for calculating locations using up to 10 anchors. I only moved away from it because it was too slow, moving to c gave me a >10x speed up on the same machine.