使用iBeacons在Android中进行三边测量 [英] Trilateration in Android using iBeacons

查看:120
本文介绍了使用iBeacons在Android中进行三边测量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想使用iBeacons实施某种室内位置确定. 这篇文章看起来真的很有趣,其中作者实现了Non -线性最小二乘三角剖分,使用Eigen C ++库和Levenberg Marquardt算法.由于Eigen是用C ++编写的,因此我尝试使用JNI和Android NDK来使用它,但是它抛出

We want to implement some kind of indoor position determination using iBeacons. This article seems really interesting, in which the author implemented the Non-linear Least Squares Triangulation, using the Eigen C++ library and the Levenberg Marquardt algorithm. Since Eigen is written in C++, I tried to use JNI and Android NDK in order to use it but it throws a lot of errors that I have no idea how to solve and I couldn´t find anything online. I also tried to use Jeigen, but it does not have all the functions that we need.

所以,我的问题是:

  1. 有人曾经使用 Android中的信标?

  1. Has someone ever implemented some kind of Trilateration using beacons in Android?

您认为使用Eigen + JNI + NDK是一个很好的解决方案吗?如是, 您是否曾经使用过Levenberg Marquardt 组合吗?

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

在Android应用程序中,有没有比Levenberg Marquardt算法更好的选项来计算三边测量?

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

推荐答案

看看这个库: https://github.com/lemmingapex/Trilateration

使用Apache Commons Math的Levenberg-Marquardt算法.

uses Levenberg-Marquardt algorithm from Apache Commons Math.

例如. 放入 TrilaterationTest.java

您可以看到:

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);

,但是如果您看到Objectivec示例 https://github.com/RGADigital/indoor_navigation_iBeacons/blob/show-work/ios/Group5iBeacons/Debug/Managers/Location/NonLinear/NonLinear.mm ,您会注意到准确度是用作评估参数,而不是距离.

but if you see the objectivec example https://github.com/RGADigital/indoor_navigation_iBeacons/blob/show-work/ios/Group5iBeacons/Debug/Managers/Location/NonLinear/NonLinear.mm you can note that the accuracy is used as an assessment parameter and not the distance.

这篇关于使用iBeacons在Android中进行三边测量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆