Can';t使用iOS Estimote室内SDK手动创建位置
无法手动创建正确的位置-它总是显示错误的位置。有人能告诉我如何做正确的,并显示我的代码中哪里有错误的值吗?谢谢Can';t使用iOS Estimote室内SDK手动创建位置,ios,ibeacon,estimote,indoor-positioning-system,Ios,Ibeacon,Estimote,Indoor Positioning System,无法手动创建正确的位置-它总是显示错误的位置。有人能告诉我如何做正确的,并显示我的代码中哪里有错误的值吗?谢谢 ESTLocationBuilder *locationBuilder = [ESTLocationBuilder new]; [locationBuilder setLocationBoundaryPoints:@[ [ESTPoint pointWithX:0 y:0
ESTLocationBuilder *locationBuilder = [ESTLocationBuilder new];
[locationBuilder setLocationBoundaryPoints:@[
[ESTPoint pointWithX:0 y:0],
[ESTPoint pointWithX:0 y:7.46],
[ESTPoint pointWithX:7.6 y:7.46],
[ESTPoint pointWithX:7.6 y:0]
]];
[locationBuilder setLocationOrientation:275];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac1
atBoundarySegmentIndex:0
inDistance:0
fromSide:ESTLocationBuilderLeftSide];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac2
atBoundarySegmentIndex:1
inDistance:0
fromSide:ESTLocationBuilderLeftSide];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac3
atBoundarySegmentIndex:2
inDistance:0
fromSide:ESTLocationBuilderRightSide];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac4
atBoundarySegmentIndex:3
inDistance:0
fromSide:ESTLocationBuilderRightSide];
self.location = [locationBuilder build];
设置点和方向的方式看起来不错 唯一需要改变的是:
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac1
atBoundarySegmentIndex:0
inDistance:0
fromSide:ESTLocationBuilderLeftSide];
该代码如下:
我在第一面墙上放置了一个带有MAC地址的信标(kBeaconMac1
),距离墙左侧0米(fromSide:ESTLocationBuilderLeftSide
)
“左”或“右”被理解为“我在房间的中间,直接面向墙,左边是左边,右边是右边”。
“第一道墙”被理解为您在setLocationBoundaryPoints
中定义的前两点之间的墙。“第二道墙”位于第二点和第三点之间,“第三道墙”位于第三点和第四点之间,最后一道“第四道墙”——第四道和第一道
看图片,你实际上有你的信标在墙的中间,所以你想把<代码>远程< <代码>参数设置为<代码> WiththFooth/2 ,即在“第一墙”的情况下,<代码> 7.46 / 2=3.73 < /代码>。在这个特定场景中,“左”或“右”并不重要
以下是与图片匹配的代码:[locationBuilder addBeaconIdentifiedByMac:kBeaconMac1
atBoundarySegmentIndex:0
inDistance:3.73
fromSide:ESTLocationBuilderLeftSide];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac2
atBoundarySegmentIndex:1
inDistance:3.8
fromSide:ESTLocationBuilderLeftSide];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac3
atBoundarySegmentIndex:2
inDistance:3.73
fromSide:ESTLocationBuilderRightSide];
[locationBuilder addBeaconIdentifiedByMac:kBeaconMac4
atBoundarySegmentIndex:3
inDistance:3.8
fromSide:ESTLocationBuilderRightSide];
这不是数学解决方案网站:谢谢!这正是我需要的!(另外,我不明白他们为什么不提供关于这些事情的清晰文档)