发现信标两地缘位置之间点 [英] Finding point between two geo locations of beacons

查看:225
本文介绍了发现信标两地缘位置之间点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我们有两个放置在道路两侧。我们知道他们的纬度经度在那里他们被定位(我们把它们作为一个位置)。我们也知道在米这两个信标之间的距离 (采用半正矢公式measered)。我们的设备是这两个points.Is间(内范围这些信标)移动有任何功能,将帮助我们计算基于两个信标或基于从设备到一个灯塔的距离之间的距离,我们目前的位置? 我如何才能找到根据这些数据我有设备的位置,或者是有什么事情,将有利于实现我想要什么?

Suppose we have two beacons placed in both sides of the road. We know their latitude and longitude where they are positioned (we treat them as a location). We also know the distance in meters between these two beacons (measered using Haversine Formula). Our device is moving between(inside range of these beacons) these two points.Is there out any function that will help us calculate our current position based on the distance between two beacons or based on the distance from device to a single beacon? How can i find the location of the device based on these data i have, or is there any thing that will be useful to achieve what i want?

不久:我想知道用户位于两个信标不使用GPS系统,但数据我有信标(在这种情况下:确切信号灯的位置,从用户到信标和两个信标之间的确切距离)

SHORTLY: I want to know where the user is located between two BEACONS without using GPS System but the data i have from the beacon (in this case: Exact Beacons locations, exact distance from user to the beacon and the exact distance between two beacons)

作为一个例子: (填充黑色圆点 BEACONS 与假想范围红点有一些用户未知的位置绿线是在已知的距离;我们也知道经纬度黑点),根据这些数据我想找到的用户位置(单红点)

As an illustration: (Filled Black dots are BEACONS with an imaginary Range, Red dots are some user unknown positions and Green Lines are the Known Distances ; we also know the latitude and longitude of Black Dots) Based on these data i want to find the position of user (Single Red Dot)

注意:的我检查了这个<一href="http://stackoverflow.com/questions/7676845/how-to-find-a-geographic-point-between-two-other-points">question但我不明白,为什么位置会返回一个 INT 为什么时间 T 包含在那里。

note: I checked out this question however i didnt understand why the location is returned as an int and why time t is included there.

推荐答案

要专注于你的问题,没有就没有一次性配方做的一切,但也有一些,使这个过程更容易。你将不得不环顾一大堆数学库中找到他们,虽然。

To focus on your question, no there is no one-shot formula to do everything but there are some to make the process easier. You will have to look around in a whole bunch of math libraries to find them though.

这是它背后的理论。

好了,所以我们要求的纬度和点的经度3.我要解释一下它背后的理论为code是太过分了,我做的事情。

Okay so we require the latitude and longitude of point 3. I'm going to explain the theory behind it as the code is just too much for me to do right now.

为此,我们将充分利用轴承的从一个地方到另一个地方。您可以使用此链接以获得该公式:轴承式

For this we will make use of the bearing from one point to another. You can use this link to get that formula: Bearing formula

我假设我们知道设备和每个独立的信标,否则这是不可能的,除非你想使用一种雷达的方式来确定这之间的距离。我真的不能帮助这一点。如果我们知道这一点,我们可以利用它们的距离,以该设备作为其半径构建虚圈围绕着这两个信标。

I am assuming we know the distance between the device and each of the separate beacons otherwise this is impossible unless you want to use a sort of radar approach to identify this. I can't really help with that. If we do know this we can construct imaginary circles around the two beacons using the distance from them to the device as their radii.

例如。从设备到信标一个是500米。从设备到信标2是200M。周围画信标之一的假想圆的500M一个RADUIS并围绕灯塔两个假想圆200米的半径。

E.g. From device to beacon one is 500 meters. From device to beacon 2 is 200M. Draw an imaginary circle around beacon one with a raduis of 500M and a imaginary circle around beacon two with a radius of 200M.

显然,我们不能兴建这些圈子编程那就太繁琐。因此,我们将用一个圆的方程:(X-H)^ 2 +(Y - K)^ 2 = R ^ 2

obviously we can't construct these circles programatically it would be too tedious. So we will use the equation of a circle: (x -h)^2 + (y - k)^2 =r^2.

快速高中的修订表明, h和k是x和圆形,从笛卡尔平原偏移的中心的y坐标。我们将围绕我们想象的直角纯一点一点的。现在,我们将锻炼的轴承点二的使用距离由点到建设我们的笛卡尔平面(点1)从0,0线指向2。使用我们的轴承的棕褐色,我们得到了线的斜率。现在我们将使用COS和我们的轴承的正弦和使用我们的斜边的距离,以获得信标2相对的y和x位置设置信标1对我们的笛卡尔平面。现在,我们将这些子值回我们的圈子公式:

Quick high school revision reveals that h and k are the x and y coordinates of the center of the circle, an offset from the Cartesian plain. we will center our imaginary Cartesian plain at point one. Now we will workout the bearing to point two an use the distance from point to to construct a line from 0,0 on our Cartesian plane(Point 1) to point 2. Using tan of our bearing we get the gradient of the line. Now we will use cos and sine of our bearing and using the distance of our hypotenuse to obtain the y and x position of beacon 2 relative to beacon 1 on our Cartesian plane. Now we will sub these values back into our circle equations:

你的第一个等式永远是: (X -0)^ 2 +(Y - 0)^ 2 = R ^ 2。其中,r是在本实施例500M的半径。 第二个公式是 (X -h)^ 2 +(Y - K)^ 2 = R ^ 2.Where r是在本实施例200M的半径。除了现在h会高于你计算出x值和y将上面的计算y值。

your first equation will always be: (x -0)^2 + (y - 0)^2 =r^2. Where r is the radius in this example 500M. second equation is (x -h)^2 + (y - k)^2 =r^2.Where r is the radius in this example 200M. Except now h will be your calculated x value above and y will be the calculated y value above.

现在的棘手的党。我们需要找到这些圆圈相交。从我们的伙伴在数学堆叠交换我得到了公式。<一href="http://math.stackexchange.com/questions/256100/how-can-i-find-the-points-at-which-two-circles-intersect">Points路口的

Now for the tricky party. We need to find where these circle intersect. From our buddies at math stack exchange i got the formula.Points of intersection

现在你的圈子可能为零1或两个交点,基于设备的位置。如果你得到两个结果,你将不得不再次运行整个事情在设备移动,看看我们是否从圆的中心移动更近或更远。从这一点,我们可以得出结论:哪一方是正确的点与我们的DRAM直线信标1我们笛卡尔平原,得到直线的斜率,将其转换成轴承不受信标1,然后反向工程的半正矢和轴承式来获得坐标

Now your circles might have zero 1 or two point of intersection based on the devices position. If you get two results you will have to run the entire thing again while the device is moving to see whether we are moving closer or further away from the centers of the circles. From that we can conclude which side is the correct point and the we can dram a straight line to beacon 1 on our Cartesian plain, obtain the gradient of the line, convert it into a bearing from beacon 1 and then reverse engineer the haversine and bearing formula to get the co-ordinates.

这不是pretty的或容易的,但你会得到有最终。 这是最有可能不是唯一的解决方案,这样随意去寻找其他的。 祝您好运。

It's not pretty or easy but you'll get there eventually. This is most likely not the only solution so feel free to go searching for other ones. Best of luck.

这篇关于发现信标两地缘位置之间点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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