0

我正在尝试借助 3 个或更多 iBeacon 获得准确的位置。有两个步骤

  1. 从 iBeacon 的 RSSI 获得准确的距离。
  2. 应用三边测量算法来计算位置。

现在我没有得到精确的距离。iOS“准确度”并不是真正的距离。我正在应用不同的公式来计算距离,但我无法找到精确的距离。到目前为止,我能够获得高达 10 米的精确距离,但我至少需要 20 米的距离。

(我使用 iBeacon 女巫的默认 txPower 为 -59 dbm,我测量了 C3 的功率并使用 300 毫秒的广播间隔。

任何帮助将不胜感激。谢谢!

4

2 回答 2

0

不幸的是,实际上不可能获得超过 10 米的非常准确的距离估计。问题在于,在该距离处信号变得相对较弱,并且噪声压倒了 RSSI 测量——至少对于快速响应而言。众所周知,信噪比是所有无线电应用中的普遍问题。对于蓝牙 LE 应用,您要么必须接受更远距离的不准确距离估计,要么在很长一段时间内平均 RSSI 样本以帮助滤除噪声。

于 2014-09-22T22:52:15.843 回答
0

一旦你得到你的距离,你可以使用下面的代码示例来找到三边点的坐标

 {
   //Declarations 
   //include the math.h header file

   double xa=0, ya=0;       //Co-ordinates of 1st ACCESS Point(preferably set as origin)
   double xb=10,yb=0;       //Co-ordinates of 2nd ACCESS Point
   double xc=5,yc=10;       //Co-ordinates of 3rd ACCESS Point
   double triPt[2]={0,0};   //Trilaterated point
   double p1[2]={xa,ya};
   double p2[2]={xb,yb};
   double p3[2]={xc,yc};
   double ex[2],ey[2],ez[2];
   double i=0,k=0,x=0,y=0;
   double distA=5*1.41;    //Distance from API 1 (Measured using RSSI values)  
   double distB=5*1.41;    //"""""             2
   double distC=5;         //"""""             3

   //Transforms to find circles around the three access points
   //Here it is assumed that all access points and the trilaterated point are in the same plane 

   for(int j=0;j<2;j++)
      {
       ex[j]=p2[j]-p1[j];
      }
   double d=sqrt(pow(ex[0],2)+pow(ex[1],2));
   for(int j=0;j<2;j++)
      {
       ex[j]=ex[j]/(sqrt(pow(ex[0],2)+pow(ex[1],2)));
      }
   for(int j=0;j<2;j++)
      {
       i=i+(p3[j]-p1[j])*ex[j];
      }
   for(int j=0;j<2;j++)
      {
       ey[j]=p3[j]-p1[j]-i*ex[j];
      }
   for(int j=0;j<2;j++)
      {
       ey[j]=ey[j]/(sqrt(pow(ey[0],2)+pow(ey[1],2)));
      }
   for(int j=0;j<2;j++)
      {
       k=k+(ey[j]*(p3[j]-p1[j]));
      }
   x=(pow(distA,2)-pow(distB,2)+pow(d,2))/(2*d);
   y=((pow(distA,2)-pow(distC,2)+pow(i,2)+pow(k,2))/(2*k))-((i/k)*x);

   //Calculating the co-ordinates of the point to be trilaterated

   for(int j=0;j<3;j++)
      {
       triPt[j]=p1[j]+x*ex[j]+y*ey[j];
      }

   //Print the values

    cout<<triPt[0]<<endl<<triPt[1];
    getch();
    return 0;
 }
于 2015-03-08T14:00:20.670 回答