3

How to measure time the vehicle takes to accelerate from 0 to 100 km/h (0-60 mph) in 400meters (a quarter mile) using iPhone accelerometer?

I have situation where i need to calculate the time the vehicle takes to accelerate from 0 to 100km/h in a 400 meters(quarter mile),i need to implement this using iPhone accelerometer.

Sankar Chandra Bose
  • 377
  • 1
  • 12
  • 27
  • sorry but did not understand your question at all. Can you be more specific about your requirements. Thanks – Robin Jan 11 '11 at 06:52
  • robin i have edited the question is it clear for u now..Thanks for ur response – Sankar Chandra Bose Jan 11 '11 at 07:51
  • 1
    WHy are you assuming a vehicle accelerates to 100 km/h in 400 meters? Many older cars can't (at all), and many sports cars accelerate to 100 km/h in less than 400 meters. – MSalters Jan 11 '11 at 10:04

2 Answers2

4

You can use the acceleration values from the accelerometer to measure the velocity. There is really good paper (Implementing Positioning Algorithms Using Accelerometers) which explains the errors you get from the accelerometer and the techniques to get the velocity and position from the acceleration values. To get the time the vehicle takes to accelerate from 0 to 100 km/h you have to measure the time until you reached a certain velocity.

The main steps you have to take to get the velocity from the acceleration values are

  • get the acceleration values
  • integrate over the values to get the velocity

Some hint: velocity[i] = (acceleration[i] + acceleration[i-1])/2 * interval + velocity[i-1]

interval is the time between acceleration[i] and acceleration[i-1] which is related to the update frequency of the accelerometer.

To increase accuracy you have to filter the acceleration values in the forehand.

PS: I've implemented such an algorithm on an iPhone 3GS and it worked pretty good. The accelerometer let's you measure distances of 30 cm with an error of approximately 1 cm. I didn't tested longer distances yet.

brutella
  • 1,597
  • 13
  • 26
  • Thanks brutella i will follow ur instructions and let u know whether i succeeded or not.Thanks a lot for ur response – Sankar Chandra Bose Jan 11 '11 at 09:58
  • Let me know if you have problems! – brutella Jan 11 '11 at 10:09
  • 3% deviation sounds excellent. Is this your result in average or best value ever reached? If you have different signal patterns, i.e. low but continuous acceleration vs. a strongly accelerated motion, do you reach same results? What about swinging back a little bit (like Jayshree looks for)? At the bottom line:-) Is it worth to spend more time in investigating? I tried to get an algorithm working a few months ago, but never got reliable results. – Kay Feb 26 '11 at 10:24
-1

the accelerometer can only be used to measure G-forces.. not speeds.. You will need GPS to measure when you've reached 100km/u speeds..

stackr
  • 2,742
  • 27
  • 44
  • Not true, you can calculate the speed from acceleration values. – brutella Jan 11 '11 at 09:50
  • But when you are accelerating you will never know when you reach 100 with the accelerometer.. Atleast i cannot think of a way to do so.. – stackr Jan 11 '11 at 09:54
  • just add up acceleration values, really, assuming you start at 0 km/h (which was stated in the question) – MSalters Jan 11 '11 at 10:05
  • Why not? Velocity depends on acceleration. If you know the acceleration you know the velocity and therefore also the distance at a point of time. – brutella Jan 11 '11 at 10:11
  • http://www.physics247.com/physics-homework-help/speed-velocity-acceleration.php Yep.. You guys are right.. It's possible.. :) – stackr Jan 11 '11 at 10:16