“Be kind, for everyone you meet is fighting a hard battle” - Often attributed to Plato but likely from Ian McLaren (pseudonym of Reverend John Watson)

Sunday, August 02, 2009

Playing with an iPhone

I dumped my forever locking up Samsung Omnia for an iPhone 3Gs. As most will know, one of the major selling points of the iPhone (and a good one at that, though some stridently disagree) is the availability of an ever-growing "app store." I've installed six apps so far, but this post is about the Wavefront Labs Accelerator Data Pro and Cross-Discipline Technology, LLC Gforce apps. These apps take the data from the three axis accelerometer in the iPhone and display it or log it. I thought it would be interesting to document exactly how slowly I accelerate, though I already had a pretty good idea from logging speed vs. time in five second intervals as mentioned in this post.



I've used the Gforce app more frequently because, well, I'm driving and the display is much more intuitive to understand at a glance (click on the photo for an enlarged view). It's capable of holding the peak in longitudinal and transverse axes for a user-set amount of time and of sounding an alarm when user-set limits are exceeded in either axis. The Acceleration Data Pro is capable of saving data to a file and exporting for subsequent analysis. I intend to so use it but have not done so yet.



As readers of this blog might imagine, my positive acceleration numbers are quite small, rarely exceeding 0.1 g (0.98 meters/sec^2), though the first movement from a stop is typically about 0.15 g. I estimate that the average acceleration up to speed is about 0.055 g. To get a feel for this, that means I'm gaining about 1.2 miles/hour in speed with each second. Using that acceleration, I get to 55 miles/hour in about 45.6 seconds. This is somewhat faster than the results I got from timing, referred to above. I don't know if I'm getting more rambunctious in my application of throttle (doubtful, judging from the reactions of those with whom I share the road) or I'm "guesstimating" the average acceleration from the iPhone inaccurately.



Probably of more interest, there's a curved ramp from the 605 freeway northbound to the 91 freeway eastbound that I take at a speed, v, of about 50 miles/hour (22.35 meters/second). The Gforce shows a centripetal acceleration, a, of about 0.38 g, or 3.724 meters/second^2. Now, since a=v^2/r, where r is the radius of the path described by my vehicle (for a very nice lesson on this topic, see Rhett Alain's Dot Physics entry), I can estimate that the radius of the ramp is about 134 meters. How can you not love the ability of the iPhone to measure the radius of curvature of a freeway on-ramp?



The ramp has a recommended maximum speed of 35 miles/hour (I maintain 50 m.p.h. because I don't want to apply brakes). Working backwards, this means that CalTrans has designed the ramp for a recommended centripetal acceleration of about 0.19 g. They should put that on the sign!



Starting early in my first high school physics class and reemphasized ever since, when looking at any physical situation, when in doubt, F=m*a. That is, force equals mass times acceleration, Newton's second law (well, sort of - Newton actually framed it as net force equals rate of change of momentum but it's the same thing). Let's apply it here. The mass of my Land Rover LR3 HSE is about 2,676 kilograms, and I take that curve at about 0.38 g or 3.72 meters/second^2. This means F is about 9966 Newtons, or about 2,240 pounds. Note that this is over 10 times the force required to move the LR3 down the road at 55 m.p.h. and it's applied by the road to the vehicle through the tires. No wonder they wear out!



Update: To really see what can be done with the iPhone and its acclerometer and GPS, see Michael Koppelman's exploits with an iPhone in a model rocket.



Update 2: I haven't done any programming since about 1989, and that was meager. My last (semi) serious bout with programming was in 1980. I wonder how hard it would be to write and install a program for the iPhone that would provide average acceleration in each axis from a start to a stop time, or average over user set intervals, say, every second?

2 comments:

rallain said...

Excellent. So, I have a question. Can you save the acceleration data with both of these apps? And can that data be exported for further analysis?

King of the Road said...

Hi Rhett,

With the http://www.wavefrontlabs.com/Wavefront_Labs/Portfolio.html Accelerator Data Pro, you can. It's exported as a CSV file. I haven't done it yet, but I see the selections available on the app. I intend to do that this week, I'll provide an update.