lemmingapex / trilateration

Solves a formulation of n-D space trilateration problem using a nonlinear least squares optimizer
MIT License
398 stars 106 forks source link

Is "weighted" nonlinear least squares fitting possible? #27

Closed mayankcstech closed 5 years ago

mayankcstech commented 5 years ago

Hi,

The library is working pretty well and giving good consistent results for me, great work!

Although I wanted to inquire if I can provide weights depending on the distance of the node to be positioned from the static nodes. The logic being the farther the range the more error will be there in the distance measured, is this already being done or can you suggest a modification which could facilitate that.

Thanks

mayankcstech commented 5 years ago

Went through the code for NonLinearLeastSquaresSolver, looks like the weighing on basis of distances is already being performed, taking weights as 1/distance^2. Closing the issue.