Search code examples
ibeacon-androidaltbeacon

Where does the curve fitting formula come from?


I have been investigating quite a bit of formulas to estimate the distance based on RSSI and txPower and almost all of them are based on path loss models. Some of them are quite accurate and they seem to agree with the theory, but I didn't find any theory that relates to the curve fit formula and I don't understand how a formula like that can be so accurate if it isn't based on some physical property or path loss model?

So is the formula just something that you came up with or is there some theory to back it up?


Solution

  • It is very common in engineering to use a curve fitting technique to obtain a formula to predict data patterns that you don't fully understand. The general approach is to plot your data on a graph, see how it looks, then pick a few similar-looking curves and try do a curve fit to find a formula for predicting the data.

    This is exactly the approach used to describe the distance estimate formula described here: Understanding ibeacon distancing The fitted curve is a power curve. It is not based on any theory other than the fact you can often pick standard curves that can be used to fit many data series reasonably well.

    The advantage of a curve fit approach over a path loss formula suggested by theory is might account for a bunch of other factors that a path loss model might not be designed to cover -- for example errors in the RSSI sensor.