使用ibeacons时确定确切位置的工具 [英] Tools to determine exact location when using ibeacons

查看:84
本文介绍了使用ibeacons时确定确切位置的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在与零售客户合作,他们想知道在整个商店中使用多个iBeacon是否有助于跟踪客户在商店内时的确切位置(当然,当他们安装了客户的应用程序时).

We are working with a Retail client who would like to know if using multiple iBeacons throughout the store would help track a customer's exact location when they are inside the store (of course when they have the client's App installed).

我想知道已经有哪些软件工具可用于此目的?

I would like to know what software tools are already available for this purpose?

很明显,在基本级别上,可以根据设备与多个(至少2个)iBeacon的相对距离来确定设备的位置.如果是这样,难道没有工具可以帮助您吗?

What is clear is that at the basic level the location of a device can be determined based on it's relative distance from multiple (at least 2) iBeacons. If so, aren't there tools that help with this?

谢谢

推荐答案

很显然,由于RSSI值(蓝牙信号)不一致,这不太可能很好地工作.但是,这是您可能要采用的方向(根据大量的stackoverflow研究改编而成):

Obviously this is unlikely to work well due to the inconsistency of the RSSI value (bluetooth signal). However, this is the direction you may want to take it (adapted from lots of stackoverflow research):

过滤RSSI

每当信标范围变化时,我都会使用滚动过滤器,其kFilteringFactor为0.1:

I use a rolling filter with this whenever the beacons are ranged, using a kFilteringFactor of 0.1:

rollingRssi = (beacon.rssi * kFilteringFactor) + (rollingRssi * (1.0 - kFilteringFactor));

然后我用它来获得滚动精度值(以米为单位). (谢谢大卫!)

And I use this to get a rolling Accuracy value (in meters). (Thanks David!)

- (double)calculateAccuracyWithRSSI:(double)rssi {
    //formula adapted from David Young's Radius Networks Android iBeacon Code
    if (rssi == 0) {
        return -1.0; // if we cannot determine accuracy, return -1.
    }


    double txPower = -70;
    double ratio = rssi*1.0/txPower;
    if (ratio < 1.0) {
        return pow(ratio,10);
    }
    else {
        double accuracy =  (0.89976) * pow(ratio,7.7095) + 0.111;
        return accuracy;
    }
}

使用三边测量法计算XY(信标1、2和3是信标子类,其位置和距离的预设X和Y值如上所述计算).

Calculate XY with Trilateration (Beacons 1, 2, and 3 are Beacon subclasses with pre-set X and Y values for location and distance is calculated as above).

float xa = beacon1.locationX;
float ya = beacon1.locationY;
float xb = beacon2.locationX;
float yb = beacon2.locationY;
float xc = beacon3.locationX;
float yc = beacon3.locationY;
float ra = beacon1.filteredDistance;
float rb = beacon2.filteredDistance;
float rc = beacon3.filteredDistance;

float S = (pow(xc, 2.) - pow(xb, 2.) + pow(yc, 2.) - pow(yb, 2.) + pow(rb, 2.) - pow(rc, 2.)) / 2.0;
float T = (pow(xa, 2.) - pow(xb, 2.) + pow(ya, 2.) - pow(yb, 2.) + pow(rb, 2.) - pow(ra, 2.)) / 2.0;
float y = ((T * (xb - xc)) - (S * (xb - xa))) / (((ya - yb) * (xb - xc)) - ((yc - yb) * (xb - xa)));
float x = ((y * (ya - yb)) - T) / (xb - xa);

CGPoint point = CGPointMake(x, y);
return point;

这篇关于使用ibeacons时确定确切位置的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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