How to track position of an Android device in a bu

2019-01-28 03:45发布

问题:

I want to develop an application in which I need to know the position of my device within a building (the room in which the device currently is). GPS is not working in the building. Is there any way to find the position of the device in building? If yes how? Can i use position or motion sensors or combination of these for this purpose?

回答1:

There is no general solution. In case you can place WiFi hotspots/repeaters in the building (preferably in every room), you can triangulate the position from the WiFi signal strengths. But that's also not straightforward, because of different signal losses through the walls and floors. You'll need to survey the building and make a signal strength map in advance and then, based on the signals you receive, look up your location on the map.

Motion sensors are also not precise enough and compass, if you are inside a steel construction, is inaccurate, too.



回答2:

You can try using the Network to locate the user. If the signal is strong enough, it should return a decent location fix, though not as accurate as GPS



回答3:

Unfortunately there is no easy solution. Network location is out of the question, since it is not precise enough to show buildings, not even mentioning rooms. The only way I could think of for this to work is to use external sensors in building and somehow connect them with the device.