Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

I'm developing an application using accelerometer sensor. I'm not good at physics so forgive me if the question is trivial. If I have 3 values of acceleration: $x$, $y$, $z$, I find acceleration magnitude by taking square root of $x^2+y^2+z^2$, but how do I find it's sign? Example reading:

x: -0.010020584

y: 0.010257386

z: -0.04910469

The magnitude will be around 0.05115, but how do I know if it is deceleration or acceleration?

share|improve this question
    
Related: physics.stackexchange.com/questions/12918/… –  Bernhard Mar 29 '13 at 10:53
add comment

2 Answers 2

If your question is: "How do I know if the acceleration is increasing or decreasing the speed?" the answer is:

Calculate $\mathbf{a}\cdot\mathbf{v}$, where $\mathbf{a}$ is the acceleration vector ($(x,y,z)$ in your notation) and $\mathbf{v}$ is the velocity vector, and check its sign. If it is positive the speed is increasing, otherwise it is decreasing.

In your example:

$$ \mathbf{a}=(-0.010020584,0.010257386,-0.04910469) $$

Let's say for simplicity that $\mathbf{v}=(1,1,1)$. We then have:

$$ \mathbf{a}\cdot\mathbf{v}=(-0.010020584)\cdot1+0.010257386\cdot1+(-0.04910469)\cdot1=-0.048867888 $$

The negative sign of the result means that the speed is decreasing.

share|improve this answer
    
the thing is I'm trying to find velocity by integrating acceleration. v=v0+at as far as I know, but v keeps increasing even if the object stops or decelrates, because square root always gives positive value. –  Nazerke Mar 29 '13 at 19:32
    
@Nazerke Why are you integrating the magnitude of the acceleration? That makes no sense unless the acceleration is always along the same direction. You should integrate the acceleration vector to get the velocity vector. Then you can calculate the magnitude of the velocity vector to get the speed if that is what you want to know. –  jkej Mar 30 '13 at 3:14
    
at that moment I didn't know if I need magnitude or not, I just wrote it to make the question clearer. if I have ax, I can find vx by integrating ax, that is vx = v0+ax * t, same way I can find vy = v0+ay*t and vz=v0+az*t. So the resultant velocity will be v= sqrt(vx^2+vy^2+vz^2) isn't it? Is that what you mean? –  Nazerke Mar 30 '13 at 3:19
    
@Nazerke Yes, that is what I meant. –  jkej Mar 30 '13 at 11:42
add comment

You measured acceleration in three dimensions, by having measured the x, y, and z components. You need always three parameter to describe it. If you have the magnitude of the acceleration, you need two angular coordinates to define the full vector.

Only in one dimension you can talk about sign, this pointing left or right. In three dimensions, you get more parameters.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.