Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a body located at $(x,y,z)$ at time $t_0$. I know the body is moving at a constant speed, $s$ (I don't know the direction he's moving only the magnitude of the velocity vector). The body's orientation is a known constant $= (h,p,r)$ (heading pitch and roll). I would like to calculate the location of the body after $t$ seconds as a function of $x,y,z,h,p,r$. How do I do this? Thank you.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

There is not much linear algebra involved. All you need is trigonometry to find the forward direction $d$ of your body. It is clear that roll does not affect the direction, and you can then figure out (following appropriate conventions) that:

$d_x = cos(p) . cos(y)$ , $d_y = cos(p) . sin(-y)$ , $d_z = cos(p)$

Then, you get the position vector $p$ at time $t$ using $p=p_0+d.s.t$, where $p_0$ is the initial position.

share|improve this answer

In vector notation the position is given by $$\vec r=x\, \vec i+y\, \vec j+z\, \vec k$$ The velocity vector $$\dot {\vec r}=\dot x\, \vec i+\dot y\, \vec j+\dot z\, \vec k$$ You are given the magnitude such as $$v=\sqrt{\dot x^2+\dot y^2+\dot z^2}$$ Note that the orientation (direction) is the unit vector of velocity vector and can be described as $$\vec u=\frac{\dot {\vec r}}{||\dot {\vec r}||}=\frac{\dot x}{\sqrt{\dot x^2+\dot y^2+\dot z^2}} \vec i+\frac{\dot y}{\sqrt{\dot x^2+\dot y^2+\dot z^2}} \vec j+\frac{\dot z}{\sqrt{\dot x^2+\dot y^2+\dot z^2}} \vec k$$ Since $\vec u$ and $v$ is known to you you can find the constant velocity vector as $$\dot {\vec r}=v \times \vec u$$ and the position after t seconds $$\vec r(t)=\vec r(0)+v \times \vec u$$

share|improve this answer

Your Answer


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.