Reputation: 677
I am trying to write an application on Android which requires to detect whether the android is currently in a car or not, using only accelerometers. Basically the app is suppose to detect if the person holding it is walking or in a car. For walking I just detected spikes in the accelerometer readings but I am not able to find any characteristic of the car. How exactly should I approach this problem?
Upvotes: 4
Views: 3431
Reputation: 8968
Well obviously, the typical largest differences are acceleration and speed (and perhaps sustained speed). My suggestion, build a profiling application and go have some fun on various types of transportation.
Upvotes: 1
Reputation: 8895
First of all, the problem as posed is unsolvable - a phone sitting perfectly still in a parked car (or, for that matter, one running at constant velocity) is completely indistinguishable from one sitting on a desk if you restrict yourself to acceleremoter readings.
For heuristics, I'd just go and record samples, then hone detection algorithms on them. I assume characteristics for (city) traffic would be bouts of near-constant acceleration over a few seconds totalling up to around 10-20 m/s and somehwat more abrupt decelerations of about the same total velocity. I don't think you'd be able to integrate accelerometer readings well enough to accurately track something like a car smoothly accelerating to cruise speed, staying there for an hour and then rolling to a standstill over a long stretch, though.
What are you trying to achieve?
Upvotes: 3