Indoor Positioning System based on Gyroscope and Accelerometer
Asked Answered
A

5

76

I am developing an Android App to track indoor position. My phone is an Google Nexus S using two sensors, the first being an Accelerometer and the second being a Gyroscope.

My idea is that from a starting reference point (a known GPS position), using the 2 sensors (accelerometer for motion and Gyro for directions) track the phone when moving. And display on a map when the user is going.

But the problem is that i have no idea how to combine both of these sensors to give me an actual position?

I have read some article on internet that talk about "kalman filter" and after some more research i found out that that filter is very very complex /too much for me) especially to code it in java for Android (cpu killer)

Does someone has some experience that he can share with me about indoor positioning system using Gyro and accelerometer?

Ametropia answered 21/9, 2011 at 12:45 Comment(2)
hay @Ametropia did you found any code that achieve that goal ?thanx in advanceNeuberger
Possible duplicate of Android accelerometer accuracy (Inertial navigation)Cutch
C
73

Gyros and accelerometers are not enough.

You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.

Here is an explanation by (Google Tech Talk) at 23:20. I highly recommend this video.

As for indoor positioning, I have found these useful:

I have no idea how these methods would perform in real-life applications or how to turn them into a nice Android app.

A similar question is Calculating distance within a building.

Cisterna answered 21/9, 2011 at 13:9 Comment(6)
yep I also found those documents, but they don't explained HOE they achieve to do such things most of those paper just nice result on a path track on a 2D map. But no code? no complete calculation?Ametropia
@ina Well, yes, a slightly updated answer is here.Cisterna
I just got this project started. We'll look onto it further. But thanks to the videoJointly
The 1 degree offset in gravity compentsation leading to 8.5m error in the first second seems intutively very wrong to me. If I set my selfmade drones to hover at 1 degree offset thrust vector they would not at all drift 8 meters in the first second. 10-50cm would seem more likely to me. Can anyone confirm the calculations in the video?Atmosphere
@Soren You are right, the error in the first second would be "only" 8.6 cm. We have a_error=[cos(1 degree)-1, sin(1 degree)]·9.8 m s^-2. Then calculate 0.5·a_error·t^2Petiole
@Petiole Indeed, it is ca. 8.5cm according to my own calculations too. The formulas are correct in the video, but they messed up the m vs. cm conversion somewhere. The guy says 8.5 meters when it is 8.5 centimeters in reality. Keep in mind though that this error is growing in a parabolic rate, so in 10 seconds it becomes ca. 8.5 meters. :(Cisterna
W
9

I think this is a great post answering your question. This kalman filter combine data from accelerometers and gyros. Hope it helps.

Willetta answered 18/12, 2012 at 3:36 Comment(2)
Chrome warns that the link hosts malware. Is the same content available elsewhere?Enunciation
Thanks for the remind. I update the link. As the post works well when I made the comment, could you cancel your down-vote? @EnunciationWilletta
L
2

For some other interesting reading on emerging indoor positioning technologies, check out this blog post from Qubulus. There are several startups and research projects trying to find a good replacement for GPS indoors. Attempts range from Dead Reckoning, to QR Codes, to light pulses, to radio fingerprinting. It looks like any viable solution will combine multiple technologies (similar to how most smartphones rely on A-GPS, where the satellite signal is assisted by cell tower multilateration).

Best of luck with your application!

Luann answered 22/9, 2011 at 1:28 Comment(0)
P
1

I think it is too late for answer this question, but now, there is a good solution called iBeacon technology.

You can scan iBeacon devices by your smartphone, and you can get the rssi from iBeacon. So, you can calculate your position by those rssi.

Pine answered 1/7, 2015 at 13:28 Comment(5)
Not really, iBeacons do indeed have the rssi information but it isn't so accurate, any object moving by can and will interfer with the signal, therefore not so trustable. Still, it is possible to use as range powers, as it's done natively (immediate, near, far and unknown).Lallage
@Samuel Cortez 3 With RSSI, you can get inaccurate position like "You are nearby bookstore". And if you need more accurate position, you can use three or more beacon to use triangulation. As you mentioned, rssi is inaccurate. So you need to use filter (eg. low pass) to get clear signal.Pine
iBeacon trilateration is a terrible idea and doesn't work in practice. However, you can use iBeacons as pretty key chains after failing to realize your trilateration dreams. Everything @Samuel said is right.Lauretta
@Lauretta Well, with extended kalman filter, it worked in practice. Believe me, I worked for the iBeacon manufacturing company. GPS in your phone is inaccurate too, but with extended kalman filter in GPS chip, it works. Only problem was people doesn't want that. And scanning bluetooth consumes too much battery.Pine
@StanleyKou Thanks, I looked it up, the extended kalman filter method really exists and there are papers which confirm that it works (trilateration doesn't work, but circle intersection method works)Lauretta
F
1

To track indoor position starting from some reference point, only gyro and accelerometer is not enough. With accelerometer you can calculate speed, with gyro you can get direction of the mobile device, but to calculate indoor position you also need to have direction of movement, so for this case you need to use magnetic sensor. Such approach is called Dead Reckoning method and it's quite complex to combine all 3 sensors to get appropriate indoor position. Kalman filters allow you to smooth your measurement and filter some noise, but it's not the method to calculate indoor position. If you want to get indoor position you can try iBeacon approach and Trilateration method, there are some libraries (like this one) that already has this functionality, so you can try to investigate this method from such libs.

Farriery answered 4/5, 2017 at 8:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.