Trilateration on Android with iBeacons

We want to implement some kind of definition of the internal situation using iBeacons. This article seems really interesting in which the author implemented Non-Linear Least Square Triangulation using the Eigen C ++ library and Levenberg Marquardt algorithm. Since Eigen is written in C ++, I tried to use JNI and Android NDK to use it, but it chose the number of errors that I don’t know how to solve and I couldn’t find anything on the Internet. I also tried using Jeigen, but it does not have all the features we need.

So my questions are:

  • Has anyone ever implemented any use of Trilateration beacons in Android?

  • Do you think using Eigen + JNI + NDK is a good solution? If so, have you ever implemented Levenberg Marquardt using a combination?

  • Are there any better options than the Levenberg Marquardt algorithm for calculating trilateration in an Android application?

+7
android ibeacon eigen altbeacon levenberg-marquardt
source share
1 answer

Take a look at this library: https://github.com/lemmingapex/Trilateration

uses the Levenberg-Marquardt algorithm from Apache Commons Math.

For example .. in TrilaterationTest.java

You can see:

double[][] positions = new double[][] { { 1.0, 1.0 }, { 2.0, 1.0 } }; double[] distances = new double[] { 0.0, 1.0 }; TrilaterationFunction trilaterationFunction = new TrilaterationFunction(positions, distances); NonLinearLeastSquaresSolver solver = new NonLinearLeastSquaresSolver(trilaterationFunction, new LevenbergMarquardtOptimizer()); double[] expectedPosition = new double[] { 1.0, 1.0 }; Optimum optimum = solver.solve(); testResults(expectedPosition, 0.0001, optimum); 

but if you see an example objectivec https://github.com/RGADigital/indoor_navigation_iBeacons/blob/show-work/ios/Group5iBeacons/Debug/Managers/Location/NonLinear/NonLinear.mm , you can notice that the accuracy is used as an evaluation parameter rather than distance.

+2
source share

All Articles