Question: I want to use the iPhones's accelerometer to detect motions while driving. I'm a bit confused what the accelerometer actually measures, especially when driving a curve.

![Car driving a curve](https://i.stack.imgur.com/ycPB8.png)

As you can see in the picture, a car driving a curve causes two forces. One is the centripetal force and one is the velocity. Imagine the iPhone is placed on the dashboard with +y-axis is pointing to the front, +x-axis to the right and +z-axis to the top.

My Question is now what acceleration will be measured when the car drives this curve. Will it measure g-force on the -x-axis or will the g-force appear on the +y axis?

Thanks for helping!

**UPDATE!**

For thoses interested, as one of the answers suggested it measures both. The accelerometer is effected by centrifugal force and velocity resulting in an acceleration vector that is a combination of these two.

![enter image description here](https://i.stack.imgur.com/tJakl.png)

Answer: 
Accelerometer measures acceleration of resultant force applied to it (velocity is not a force by the way). In this case force is `F = g + w + c` i.e. vector sum of gravity, centrifugal force (reaction to steering centripetal force, points from the center of the turn) and car acceleration force (a force changing absolute value of instantaneous velocity, points along the velocity vector). Providing `Z` axis of accelerometer always points along the gravity vector (which is rare case for actual car) values of `g`, `w` and `c` accelerations can be accessed in `Z`, `X` and `Y` coordinates respectively.
Unless you are in free fall **the g-force (gravity) is always measured.** If I understand your setup correctly, the g-force will appear on the z axis, the axis that is vertical in the Earth frame of reference. I cannot tell whether it will be +z or -z, it is partly convention so you will have to check it for yourself.

---

**UPDATE:** If the car is also going up/downhill then you have to take the **rotation** into account. In other words, there are two frames of reference: the iPhone's frame of reference and the Earth frame of reference. If you would like to deal with this situation, then please ask a new question.