Determining Indoor Position using iBeacon
iBeacon provides a convenient solution for indoor proximity detection. Integrated within Apple’s Core Location framework, it supports the following modes:
- Monitoring – detects if the user is inside predefined region, covered by one or multiple beacons with the same identifier.
- Ranging – determines how far the user is from a beacon, providing output such as proximity (e.g. near, immediate, far), accuracy (measured in meters from the beacon) and RSSI (received signal strength of the beacon, measured in decibels).
As mentioned in the previous article 7 things you probably didn’t know about iBeacons, determining exact user location as Cartesian coordinates in the coverage region is not supported out of the box; however, we tested various methods to solve for the user location. Two of these methods are described below.
Trilateration is a method for determining location of points by measuring distances. This technique is used widely in GPS receivers.
If we have the predefined positions of the three beacons, as well as our distance from each of them, we can draw range circles around beacons’ known locations. The user’s location can be found where the three circles overlap.
In our tests, Trilateration didn’t provide satisfying results. We believe that since Bluetooth low-energy radio signals are degraded by walls, doors, and other physical objects. In future tests we will include a noise reduction filter to address these limitations.
The source code for this test can be found here: https://github.com/jtubert/Group5_iBeacons/blob/show-work/ios/Group5iBeacons/Debug/Managers/Location/Trilateration/Trilateration.m.
In the previous experiment we observed that the degrading Bluetooth low-energy radio signal reduces distance accuracy. Therefore, a practical solution would be to apply some sort of weighting measurement.
Non-Linear Least Squares is a method to fit a parameterized function to a set of observations by minimizing the sum of the squared residuals, where the residual is the difference between an observed value and the fitted value. For that purpose we used Eigen, a C++ library of template headers for algebra, matrix, and vector operations, etc. and, more specifically Levenberg Marquardt algorithm.
This method lead to more accurate results. Depending on the size of coverage area, accuracy of calculated positions was within a 2m proximity square. We also noted that the accuracy increases with additional beacons. We recommend 4 or more beacons when attempting this method.
The source code for this test can be found here: https://github.com/jtubert/Group5_iBeacons/blob/show-work/ios/Group5iBeacons/Debug/Managers/Location/NonLinear/NonLinear.mm
Beacon technology shows a lot of promise but as with all new technologies it may take a little trial and error to get it to work for your needs. Hopefully this article helps get you started with some advanced techniques.

