C# 仅使用 wifi 信号确定您的位置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/524351/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
determining your location using ONLY wifi signals?
提问by LDomagala
i will be working on a project that tries to determine your position using the wifi signal strength from a few access points. i was wondering if anyone knew of any similiar projects or any articles on that topic
我将从事一个项目,该项目尝试使用来自几个接入点的 wifi 信号强度来确定您的位置。我想知道是否有人知道任何类似的项目或有关该主题的任何文章
if anyone cares: its a research project in at my university. the app is written is used as a playing ground to develop new wifi antenna that are better suited for this type of usage. i only work on the coding part of the project though. oh and its written using c# which is not optional
如果有人关心:这是我大学的一个研究项目。该应用程序被用作开发新的 wifi 天线的游乐场,这些天线更适合这种类型的使用。我只在项目的编码部分工作。哦,它是用 c# 编写的,它不是可选的
clarification: its ONLY wifi. no GPS goodnes for us becaus its supposed to work indoors the software is supposed to determine your location by using the known locations of the access points and their signal strenghts to tell you where you are. its currently at around 4-5 meters of accuracy aside from that i already have a working prototype and was just wondering if anything similiar has been done before or if anyone has any tips or ideas for/about the project
澄清:它唯一的无线网络。GPS 对我们来说没有好处,因为它应该在室内工作,软件应该通过使用接入点的已知位置及其信号强度来确定您的位置,以告诉您您的位置。目前它的精度约为 4-5 米,除此之外我已经有了一个工作原型,只是想知道之前是否做过类似的事情,或者是否有人对/关于该项目有任何提示或想法
采纳答案by balexandre
Discarding the first 2 answers, where they need to use GPS and A-GPS in the first and a known WiFi network in the second, my answer is:
丢弃前两个答案,他们需要在第一个中使用 GPS 和 A-GPS,在第二个中使用已知的 WiFi 网络,我的答案是:
it sounds easy, but you need to do some homework first, a Survey.
听起来很简单,但您需要先做一些功课,即调查。
- you will need to measure up and create a oval shape (in a paper) with points and percentages of all wifi routers in the camp.
- when, lets imagine that you compile 2 routers information, you are ready to go.
- get the current wifi points and signal strengths from the user laptop/device and query the database using those values.
- give the user their current location.
- 您需要测量并创建一个椭圆形(在纸上),其中包含营地中所有 wifi 路由器的点数和百分比。
- 什么时候,让我们想象一下你编译了 2 个路由器信息,你就可以开始了。
- 从用户笔记本电脑/设备获取当前的 wifi 点和信号强度,并使用这些值查询数据库。
- 给用户他们当前的位置。
Example:
例子:
- in the campus bar you measured that to be in that place you need to have around 55% strength of the signal provided from WiFi Router 1 and 25% of the WiFi Router 2.
- 在校园酒吧中,您测量到要在那个地方,您需要具有大约 55% 的 WiFi 路由器 1 提供的信号强度和 25% 的 WiFi 路由器 2 信号强度。
To use all this in C#, you should start in this Code Project articleto get the signal strengths. Then is just use those returned values with your data that you measured before when doing the first survey.
要在 C# 中使用所有这些,您应该从这篇代码项目文章开始获取信号强度。然后只需将这些返回值与您之前在进行第一次调查时测量的数据一起使用。
Hope it helps :) At least, that was what I would do in order to approach this problem.
希望它有所帮助:) 至少,这是我为了解决这个问题而要做的。
回答by stuartd
回答by Jon Skeet
You might like to look at the Google Gears Geolocation API. I don't know how easy it is to use from C#, but it may be useful/relevant.
您可能想查看Google Gears Geolocation API。我不知道从 C# 使用它有多容易,但它可能有用/相关。
(Disclaimer: I work for Google, but haven't had anything to do with the Geolocation API.)
(免责声明:我为 Google 工作,但与 Geolocation API 没有任何关系。)
回答by Paul Johnson
I wouldn't have thought that signal strength would work well: too many things interfere with it (like walls). But you might try measuring ping times, especially if you threw a hundred pings at the AP and took the average. Most of the time will be the AP digesting the ping and generating the pong, but there will also be a time-of-flight component for the signals. If the AP response time is consistent then you should be able to subtract it and hence compute the distance to the AP. By well-known hyperbolic maths you can then find your position from 3 or 4 APs.
我不会认为信号强度会很好地工作:太多东西会干扰它(比如墙壁)。但是您可以尝试测量 ping 时间,尤其是当您向 AP 发送一百个 ping 并取平均值时。大部分时间是 AP 消化 ping 并生成 pong,但也会有信号的飞行时间分量。如果 AP 响应时间一致,那么您应该能够减去它,从而计算到 AP 的距离。通过众所周知的双曲线数学,您可以从 3 或 4 个 AP 中找到您的位置。
Paul.
保罗。
回答by Brandon
We did this on a project already determining distance from Access Points, but without the signal triangulation (already covered on other answers here).
我们在一个已经确定与接入点的距离的项目上做了这个,但没有信号三角测量(已经在其他答案中介绍过)。
I do have a recommendation from the "man, I wish I didn't have to go back and do this" department - it would be to spend extra time on 2 areas:
我确实收到了“伙计,我希望我不必回去做这个”部门的建议——这将是在两个方面花费额外的时间:
- An easy and repeatable method of calibration using Multiple Data Points. For example, the dropoff from being "very close" to "kinda close" will be a lot more than "really far away" to "really really far" away. It's not going to be a linear slope.
- Data Smoothing. As you move, the signal strength will vary unproportionally to your movement (due to obstacles in the path). It will make your results much more accurate if you take a rolling average of the last 5-10 samples of the signal strength rather than just taking the last sample.
- 一种使用多个数据点的简单且可重复的校准方法。例如,从“非常接近”到“有点接近”的下降将远远超过“非常远”到“非常非常远”的距离。它不会是线性斜率。
- 数据平滑。当您移动时,信号强度将与您的移动不成比例地变化(由于路径中的障碍物)。如果您对信号强度的最后 5-10 个样本进行滚动平均,而不是仅采用最后一个样本,那么您的结果将更加准确。
回答by Chaitu
Goto Wifi in positioning System(WPS), where we use multiple Wifi AP to track a location.. this is implemented by many systems like Google, horizon etc by providing extra security 4 privacy.. I too without knowing this tried on immplimenting this sort of technique.. All d best, we can simplify its complexity by various methods there-by achieving INNOVATIVE to existing infrastructure. I recommend u to go to the wifi router add-in management & usage before pursing this.
在定位系统(WPS)中转到 Wifi,我们使用多个 Wifi AP 来跟踪位置.. 这是由许多系统(如 Google、地平线等)通过提供额外的安全性 4 隐私来实现的.. 我也不知道这尝试实现这种类型技术.. 最好,我们可以通过各种方法简化其复杂性,从而实现对现有基础设施的创新。我建议你在追求这个之前去 wifi 路由器插件管理和使用。
回答by PinoyDev
you can try FIND3 project, here's a documentation https://www.internalpositioning.com/doc/, it's API can be used for that purpose and use learning algorithm to constantly learn your position with accuracy. They also have mobile apps (for android only). I'm looking to do something of the same nature.
您可以尝试 FIND3 项目,这里有一个文档https://www.internalpositioning.com/doc/,它的 API 可用于此目的,并使用学习算法不断准确地了解您的位置。他们也有移动应用程序(仅适用于安卓)。我正在寻找做一些相同性质的事情。