accelerometers uses- smartphone - accelerometer

It is known that the raw accelerometer data is combination of both linear acceleration and gravity. In order to isolate them w need to apply appropriate filters. I would like to know the real time applications where we would need only "gravity" or only "linear acceleration".

Gravity is used when you are trying to figure out the orientation of the phone. In other words, when you are trying to figure out how the user holds the phone. It is good for tilt games, for example you use the phone to drive a car, etc.
Linear acceleration is used when you are trying to figure out how the phone is shaken. It good for shaking games.
I highly recommend this video. In particular, between 4:15-6:10 and staring from 33:30 you see demos.

Related

iPhone4 iOS5 is there a physics engine to convert CMDeviceMotion events into displacement?

I'm running a CMDeviceMotion processing queue on iPhone 4, which gives me user-induced acceleration, along with the rotation rates. I can filter this data myself.
What I'm trying to understand is how to convert these discrete samples of acceleration, device attitude and rotational rate into a 3 dimensional displacement. This is possible with classical mechanics for straight lines, but I"m thinking of more advanced calculations - for example curves. This can be handled with GPS, but I'm looking for a much better resolution - lets say within 10 feet. GPS under clear sky has an average accuracy of about 30 feet.
Is there some sort of a physics engine or physics processor that can take a set of device motion or acceleration/turn rate events and give me a distance of how far the phone is from the original location?
I know that there are various pedometer and bike GPS trackers for iPhone. Are they based on GPS or do they actually do the acceleration integration like I'm describing?
Unfortunately, the acceleration integration you are describing won't work in itself.
However, you may improve the accuracy by fusing with the GPS signal and/or make domain specific assumptions. For details, see the above link.

iOS: Core Motion used to detect larger movements over distance?

I have a GPS app that I would like to detect if the user is standing still and not moving. Using Core Location works for this, but is sometimes not accurate because new updates move and gives the illusion of speed and motion.
So, I am wondering if in addition to that, I can also use Core Motion. Is this a good idea to detect motion such as someone walking, running, driving, etc, and know when they are no longer doing that motion? Or, is Core Motion only for small movements such as tilting the device or lifting it to your ear?
I wanted to tell others who visit this question what I've learned and what I think about this approach.
I have been doing some research of my own to know whether this is possible, and more importantly, even if it is what is the battery consumption and accuracy of the location change detected. For Android though, this question was asked quite sometime back. The answer provides links to this Google Tech Talk. At 23:20, the speaker talks about how difficult it is to achieve this and the accuracy you will achieve in the results.
Even though I have to come to realize the battery consumption from sensors on the iPhone is a little lesser than in most Android phones, I still think this is a costly affair in terms of accuracy and battery consumption.
you can use the GPS with the sensor readings to distinguish between walking, running, etc. if you combine the tilt angle frequency change and the GPS speed information (you need to do some work to get some of this info of course, but thats the way to do it).
You are talking about 4 different measurements from 4 different sensors (technically more than 4 but..) -
Latitude & Longitude - from CoreLocation. It uses a mix of GPS + cell tower triangulation.
Accelerometer - the current orientation of the device in 3D space.
Gyroscope - orientation of the device on its own axis.
Magnetometer - which tells you which direction a device is point w.r.t south,north,east,west
Of all these I think only Latitude & Longitude are of use to you. Basically what you do is to make the sensitivity (i.e. the update rate from the sensor) a bit more relaxed. With some tweaking around with this you should be able to tell with good accuracy if a person is standing or moving.

Detecting the user's spinning motion

I have been experimenting with the Core Motion framework to detect a user spinning around, say on a merry-go-round, holding an iphone in his hand.
There are ways to detect the device motion around its own axes, but what is a good way to detect the iPhone spinning in circles?
Thanks
You can use the gyroscope. Take a look here: Gyroscope example
You have to remind that it is only availble on iPhone4 and iPhone4S.
There is one degenerate case where you can run into trouble, only magnetometer (compass) can help in that particular case.
If you put the device (a) on the desk in stationary position then (b) on a perfectly horizontal turntable rotating slowly you will get the same qualitative sensor readings. Both the gyro and the accelerometer readings are constant in the two cases, although the readings quantitatively differ. The sad part is: gyro bias error can render case (a) to look like (b) and vice-versa. In this particular case you need a compass to cancel the gyro drift. Case (a) is typical for a phone.
Apart from this degenerate case, gyroscopes and accelerometers with sensor fusion are sufficient to track arbitrary rotations of the device.

Android/ iOS how to determine small changes in distance using sensors?

I have been doing a bit of research, but I cannot seem to find a way to determine small distances (centimeters and meters) using the sensors in Android or iOS devices.
Bluetooth appears too inaccurate and require more than one device, GPS only works over larger variations in distance, and small variations in rotation seem to make using the accelerometer nearly impossible.
Is there a method that I am unaware of that would allow me to do such a thing? I am familiar with Calculus, so using Integrals to determine distance based on changes in time and velocity/ acceleration is not a problem for me, I just do not know how to determine those things.
Thank you.
There's no sensor in these devices which is able to give you the desired accuracy without exterior help.
If your use case allows for a bit of external setup, here are some ideas:
You could use the camera and computer vision to calculate device movement. You could, for example, use ARToolkit to measure the distance to a visual tag fixed to a wall. In close distances you can get pretty high accuracy (mm) using this technique.
Another idea would be to measure the distance to a solid object, like a wall, by emitting a short audio signal using the speaker and measure the time until the echo arrives at the microphone. This would be more of a research project, though.
You CAN use the accelerometer to measure distance travelled
(if ONLY absolute displacement is involved).
Have the user hold the device flat and walk from pointA to pointB.
The user presses a "Start" button in ur app as he starts from A and
presses an "End" button in ur app as he reaches B.
Calculate the double-intergral of AccelX & AccelY seperately over time
between the 2 button presses. These will be distX & distY respectively.
Total displacement will be sqrt( (distXsquared) + (distY squared) ).
GoodLUCK!!
Regards
CVS#2600Hertz
Just as a thought experiment, you should be able to do this using a combination of the accelerometer and the compass on each device.
However, whether the accuracy of these sensors is enough for what you want to do...well I think you'd just have to try it.

Detecting movement with an iphone

Can the iphone detect its movement in terms of distance?
Would one be able to use a built in function on an iphone to determine the distance the phone has moved so that the speed of movement can be calculated?
Basically my question is
can an iphone detect its position and distance moved without using the gps?
thanks
You probably could with some clever math.
Basically, integrate over the accelerometer data.
For all the details, see http://www.freescale.com/files/sensors/doc/app_note/AN3397.pdf
No, the only sensor that the device has that can calculate "distance" is via the Location API, which will make use of the GPS. Accelerometer and gyros (in iPhone 4) can give precise measurements of changes in orientation, but not distance travelled.
Not easily, there are a couple of ways you can do this but they have severe limitations and you'll have to write all the code yourself.
One way is to use the accelerometer and try and calculate the distance from the forces on the phone, this is never going to be very reliable.
Another way is to use wifi, essentially looking at the signal strength to determine distance from the router (I think this is only possible using private APIs and requires several routers to be at all accurate). Or listen from a router to find out how far away the iPhone is.