Triangulate wifi hotspot




















The coordinate system is as follows: One corner of the square area is 0,0,0 , and the diagonally furthest corner will have coordinates 1,1,1. All position determination is to be done relative to this coordinate system alone for simplicity, I don't want global xyz coordinates. Within this, I have three Wi-Fi hotspots at x1,y1,z1 , x2,y2,z2 , x3,y3,z3.

We have a person with a device capable of receiving Wi-Fi signals and calculating the strength of the signal at position x,y,z. The device could be a phone, a tablet, etc. The problem: Calculate position x,y,z of the person dynamically, as they move around when you now have the following inputs:. First Question: How do I calculate position from the above inputs? I assume signal strength is directly proportional to the distance from the router, but what's the exact relation? How does Skyhook do this so accurately?

Second Question: I believe the above inputs are sufficient. Is there anything else required? To find your location, you need three points, but just focus on two points for a second. By using two points, you can create a triangle with yourself, and find your location based on your signal strength between two points. This will find out where you are in between two routers. For instance, if you're in between routers 3 and 4, and your signal strength in comparison to 3 is and your signal strength to 4 is , you know that you're closer to 3 than you are to 4.

If you do an approximation of distance vs signal strength, you can come up with a pretty accurate read of where you are in between routers 3 and 4. The problem left over then, is determining which side you're on in between 3 and 4, since you could have the same signal strength values , either above or below the routers look at diagram.

Then just find another router, and notice your signal strength. You should be able to determine which side you're on pretty easily just by taking a look at signal strength relationships between 5 and 6 routers in the diagram. To do all of the above, you really only need an approximation of distance vs signal strength, and the distances between the routers.

From my testing I wrote my own Wi-Fi triangulation code , the signal strength is pretty uniform across mobile devices, so one device should have the same results as the device next to it. Skyhook does this I think either through GPS positioning it might be hard coded in , or basically the same principle as this. Skyhook is the only service that is Apple approved for this, so Apple basically did this same thing and then made sure other apps couldn't use it any iPhone app that uses the restricted You need to do some simple approximations.

These approximations will not be all the same depending on your environment, so feet 27 m might mean you're 15 feet 4. No matter what you do, this isn't going to be percent accurate, but that's okay, because you can get within 5 feet 1. So what you do is you find a bunch of points where you get a reading from from router 3, and you jot down what your distance was.

Then, you take an average, and you use this average to put down in your database which says when you're from router 3, you're 15 feet 4. You then do this for other values, like or whatever, and you jot down your values and find an average. Now, if means you're 15 feet 4. This would be cumbersome for tons of values, but you'll have to experiment to see how accurate you can be with as few data points as you can get.

You can approximate between two signal strength averages by realizing that signal strength is logarithmic, so you can estimate that since is 15 feet 4. I have the code somewhere, but it was a couple years ago so I'd have to dig through a lot of stuff to find it. I think conceptually, it should be easy to replicate without code. It took me about 50 lines of Java code for the android devices I was testing. Essentially I took an android phone and created an application that allows me to at any moment display the current ID of the connected Wi-Fi device, its signal strength, other nearby Wi-Fi ID's and their signal strength, and then GPS location.

This is all accessible through Android's API. I think you need an Android device on API 4 or higher or something. This was like three or four years ago, so I'm just throwing this out from what I remember. The GPS location part was to make the mapping between physical and Wi-Fi strength easier, rather than having to create a blueprint map of my facility in some other way, I could just have google maps do it for me at the same time since I can overlay their map and the GPS coordinates essentially, while creating the distance map.

You'd still need a depth map to map floor levels though, which we can do by hand pretty easily by finding if you're in the middle of two routers. We know that signal strength is strongest to Wi-Fi hubs on the same floor, and then can double check by making sure you have weaker signals to Wi-Fi hubs on different floors.

This depth map is essentially a list of Wi-Fi hubs, and their respective floors. We do not need their positions, since we can best fit the signal strength to the GPS locations we grabbed when walking around the facility and grabbing the signal strength to certain hubs.

This is some simple math. So for 2D plane position, looking down from the top, we have a bunch objects like such:. Then we can easily best fit our ClientPosition to the 2D map that we created with the above two objects.

Ideally, you'd want to try and hit a couple different devices that encompass a couple different wireless techs some a devices, some b devices, n, g etc just to get more accurate results. What I found though, was that accuracy isn't that big of a deal, and you'll be within 5 feet 1. That was accurate enough for my needs. The variability is so small, and if you don't need crazy accuracy, it won't matter.

Well, it's a signal, so its intensity will fall off by the square of the distance. See Inverse-square law. Android is going to give you signal strength in dBm. I'm unfamiliar with that unit, but if it is anything like audio decibels, it isn't a linear scale. You'll want to factor that in. In a perfect world, the fields will be uniform enough for pure measurements to give you distance, but if you're doing this through any metal whatsoever things might get ugly. Additionally, the internal configuration of your device's Wi-Fi radio may make it more sensitive in certain directions.

I'm not an engineer or anything, so I don't know to what degree these things will affect the final result. It may be inconsequential. Finally, for getting a three-dimensional location, I believe you need four reference points. If all the Wi-Fi hotspots are at the same height, you can still find your horizontal position. If they are not, you will be finding your position on the plane they are on, which may not be exact enough for you depending on how steep that plane is.

Radio signals travel at the speed of light almost save for some attenuation due to environmental factors. So, if you can "ping" the device you can get a general idea of its distance. Initial thoughts were using output from something like the WiSpy spectrum analyzer. I like the idea of using a directional antenna. Looks like some research may be underway.

Instead of trilateration you could use bilinear interpolation. This is said to be better for non-linear distance vs. Using signal strength to judge distance could easily be thrown off by differences in materials blocking line-of-sight to each of the sampling points. It would probably be better to do the sampling with a directional antenna, and from each sampling point, find the bearing that maximizes signal strength to each device you want to locate. With this technique, you can use only two or three sampling locations, depending on the accuracy with which you can estimate the bearings.

This technology is built into every iPhone and iPad. Actually I think you should try using an algorithm like the GPS one wikipedia.. Naturally the bcasters should be as much similar as possible in response.. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Wifi Triangulation Ask Question. Asked 12 years, 7 months ago. Active 11 years ago. Viewed 35k times. Some keywords: wi-fi site survey, visualization, coverage, location, positioning Thinking about using kismet to gather the data and then process it. Loki Loki Will update accordingly. WTF, there seems to be a patent on that: patentgenius. Since this is wi-fi, I assume you are interested in indoors as opposed to outdoors where you can just use GPS positioning.

What are your accuracy requirements? Wi-fi indoors positioning based on signal strength measurement can tell you which room are you in, but otherwise is very fragile to such things as number of people in the room. Add a comment. Active Oldest Votes. Martin Beckett Martin Beckett 92k 25 25 gold badges silver badges bronze badges. RickMeasham RickMeasham 1, 2 2 gold badges 13 13 silver badges 24 24 bronze badges.



0コメント

  • 1000 / 1000