calculate accurate distance of user using android accelerometer [duplicate] - android

I am just a beginner in the application development industry. I know the accelerometer can be used to return the current acceleration along three axis in meters per second squared (m/s2). But I have come to know that an accelerometer can also be use as speedometer.
I want to know how I can use accelerometer to determine distance traveled by Android device between points of interest. If it is possible, then how can I implement it? I have seen a similar question "how do I measure the distance traveled by an Iphone using accelerometer" How do I measure the distance traveled by an iPhone using the accelerometer?. But I didn't come to a point.
Thank You,
Arslan

You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.
Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.
Similar questions:
track small movements of iphone with no GPS
What is the real world accuracy of phone accelerometers when used for positioning?
how to calculate phone's movement in the vertical direction from rest?
iOS: Movement Precision in 3D Space

You can combine it with GPS positioning, and filter data with Kalman filter.
GPS give rough but stable position, while accelerometer give more accerate but drifting position.

Related

Track position Indoor (with smartphone) [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Indoor Positioning System based on Gyroscope and Accelerometer
Very simple question for you guys. Suppose I wanted to track my location accurately with no real reference points (gps). And what I mean by that the only thing i know is my location (0,0) on a 2-dimensional map, is it possible with use of a gyro and accelerometer to track my position as I walk away from that point?
I have read quit a lot of paper on that subject but no one is clearly telling how this could be realized. I especially had a look to that video http://www.youtube.com/watch?v=C7JQ7Rpwn2k (Google talk) It's about how to integrate all the sensors.. it's really nicely explained, but once again... After having watched that video I have still no idea (formulas? Technique? etc..) how to use those sensor to track my position
Can someone guide me too some good tutorial? About calculate the next position from the angle, velocity etc. ?
Thank you.
You need to understand that accelerometer measures acceleration - thus if you move with a constant walking speed, the accelerometer will not detect any movement. It will only detect if you start walking faster/slower. Distance can't be tracked with an accelerometer. You could only very very roughly estimate the position. Maybe also counting the steps with a sort of "pedometer" algorithm that would count your steps by measuring the cyclic vibrations while walking. You will still need the direction when you are going - which could be only roughly estimated with the accelerometer.

Indoor tracking (IMU + tags)

this is another question about indoor tracking using inertial (smartphone + aceel + gyro)
Firstly, I would like to say that I have read almost every post on stackoverflow talking about this subject.
And I know that to track a position We will have to integrate TWICE the accel and that is very useless in a real life application because of all the drift errors...
But it turned out that I don't need to build a plane or whatever And i don't need to develop an application that have to WORK to be sold or something. I just want to realize a simple Android App that use "theoretical" concept of an Indoor tracking-
What's the possibilities?
What do we need?
Basically my phone is resting on a desk screen facing UP at a known position (0,0) if a push my phone to 2 or 3 meters and then I rotate it and push it again for 2 or 3
meters I the to see after how many meters it becomes to inaccurate an so use a tag tu recalibrate the measurements <--- That's my main question
what do I need ?
- the angle ? (ok integrating the the gyro) (i don't wanna use the compass)
- the accel? (i have)
- the velocity ? (integrating the accel)
- and the position (double accel integration)
The thing that I would like to know is How can I put this number together? Is it the right way to do it? Is there another solution (to resolve my problem, not to track someone really accurately)?
I also looked at the theory of the DCM (If I understood correctly, it will give me the orientation of the phone in 6 axes right? But what's the difference about getting the angle from the Accel or the gyro (pitch, roll etc..) ?
Thank you
Your smartphone probably has a 3-axis gyro, a 3-axis magnetometer and a 3-axis accelerometer. This is enough for a good estimation of attitude. Each has its advantages and disadvantages:
The accelerometers can measure the gravity force, it gives you the attitude of your phone, but in a horizontal position, you can't know where it's pointing. And it's very sensitive to inertial noise.
The gyroscopes are fastest and the most accurate, but its problem is the drift.
The magnetometers don't have drift and they aren't sensitive to inertial forces, but are too slow.
The combination of the three give you all advantages and no disadvantages. You must read the gyro measure faster as you can (this minimizes the drift) and then use the slow and not as accurate measure of magnetometer and accelerometer to correct them.
I leave you some links that may interest you:
A Guide to using IMU: http://www.starlino.com/imu_guide.html
DCM tutorial: http://www.starlino.com/dcm_tutorial.html
I hope I've been helpful and sorry for my bad English.
With the sensors you have, not considering computational power at this point yet, I know of only one method of position / displacement estimation. This would either involve just optical flow with the onboard camera, or the above with addidional info from fused data from accels / gyros (eg. with a Kalman-Filter) to improve accuracy. I guess OpenCV has all you need (including support for Android), so I'd start there.
Start by implementing an attitude-estimator with just accels and gyros. This will drift in yaw-axis (ie. the axis perpendicular to the ground, or rather parallel to gravity vector). This can be done with a Kalman-Filter or other algorithms. This won't be any good for position estimation, as the estimated position will drift tenths of meters away in just a couple of seconds.
Then try implementing optical flow with your camera, which is computationally expensive. Actually this alone could be a solution, but with less accuracy than with additional data from an IMU.
Good luck.
EDIT: I recently found this - it may be helpful to you. If there is not a lot of noise (due to vibration), this would work (I'm on a quadrotor UAV and it unfortunately doesn't work for me).

Indoor Positioning System based on Gyroscope and Accelerometer

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?
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:
RSSI-Based Indoor Localization and Tracking Using Sigma-Point Kalman Smoothers
Pedestrian Tracking with Shoe-Mounted Inertial Sensors
Enhancing the Performance of Pedometers Using a Single Accelerometer
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.
I think this is a great post answering your question. This kalman filter combine data from accelerometers and gyros. Hope it helps.
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!
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.
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.

Android accelerometer detect height?

Is it possible to use the accelerometer to detect height? For instance, if I'm holding the phone on my hand and then detect the height after raising my arm?
Thanks
Assuming you mean you want to detect the height the phone was raised from its staring point, yes. The android accelerometer measures force, more info on how to use it can be found here. Keep in mind that the accelerometer isn't a perfect device, and so your results will be approximations of how much the phone was really moved.
The inaccuracy of the accelerometer will be insignificant when compared to the error caused by an unstable accelerometer. What I mean by this is the fact that as you move your phone you will not be able to keep the accelerometer orientated perfectly i.e. you will 'naturally' rotate it about its longitudinal,lateral and azimuth axes. This means that a vertical acceleration will partly be felt in all the above axes and result in an error if you were to just integrate twice the vertical acceleration measurement.
There are ways to eliminate this error which involve gyroscopes but that requires some complicated mathematics and gyros to be fitted in your phone as well.
In theory you can integrate an accelerometer's output but in a real-world device there are practical issues you must overcome.
You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.
Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.
Similar questions:
track small movements of iphone with no GPS
What is the real world accuracy of phone accelerometers when used for positioning?
how to calculate phone's movement in the vertical direction from rest?
iOS: Movement Precision in 3D Space
How to use Accelerometer to measure distance for Android Application Development
How can I find distance traveled with a gyroscope and accelerometer?
Distance moved by Accelerometer
Yes, bt you need to integrate the output twice and add in the two integration constants - initial velocity and displacement.
Rgds,
Martin
First of all you measure Linear acceleration and gravity together (also some noise)
So it means when you are using accelerometer you will get
Accelerometer Readings = Linear Acc. + Gravity + Noise
Here you just only need Linear Acc. but the Accelerometer reads all the values

How to use Accelerometer to measure distance for Android Application Development

I am just a beginner in the application development industry. I know the accelerometer can be used to return the current acceleration along three axis in meters per second squared (m/s2). But I have come to know that an accelerometer can also be use as speedometer.
I want to know how I can use accelerometer to determine distance traveled by Android device between points of interest. If it is possible, then how can I implement it? I have seen a similar question "how do I measure the distance traveled by an Iphone using accelerometer" How do I measure the distance traveled by an iPhone using the accelerometer?. But I didn't come to a point.
Thank You,
Arslan
You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.
Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.
Similar questions:
track small movements of iphone with no GPS
What is the real world accuracy of phone accelerometers when used for positioning?
how to calculate phone's movement in the vertical direction from rest?
iOS: Movement Precision in 3D Space
You can combine it with GPS positioning, and filter data with Kalman filter.
GPS give rough but stable position, while accelerometer give more accerate but drifting position.

Categories

Resources