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

Possibility to use relative distances #32

Open tonny1983 opened 2 years ago

tonny1983 commented 2 years ago

I wanted to inquire if I can use relative distances instead of real distances with the solution.

The case is mainly related to RSSI which is a relative value to indicate the distance between two targets (points). For example, if I have three base station A(0,0), B(10,10), C(5,5), and a device may say the RSSI-A is -60, RSSI-B is -70 and RSSI-C is -80. Thus, I just know the proportions of the distance which is D(A):D(B):D(C)=6:7:8 in the example but the real distances.

lemmingapex commented 2 years ago

This library does not support a linear system of distances as you described.

I'm not sure how you would do what you describe with this library without first converting an RSSI to a distance, or distances to RSSI. My experience and research has shown that the RSSI for most antennas does not correlate strongly to distance in practice. I'm sure you have read literature that discusses all of these topics as well. I would look at other papers and projects that deal with RSSI and examine what success and failures they have seen. https://www.google.com/search?q=rssi+to+distance
https://www.google.com/search?q=rssi+to+distance+accuracy

It certainly may be possible. Let me know what you find. Good luck!

tonny1983 commented 2 years ago

Actually, there is a formula to calculate distance from RSSI (10^(REF-RSSI)/10N). However, some of the parameters are empirical and inconstant, and they may be changed according to the electric power, space shape and even weather condition. Therefore, instead of using the real distance which is calculated by the same formula in the same environment condition, I try to find if the proportions of RSSI can be used ( because of the log(distance) has linear relationship with RSSI).