Working out position and velocity vectors at time t from constant rotation and acceleration

trigonometry

I'm trying to figure out a forumula to get position and velocity at any point in time for an object with constant accelearation but vector of which is rotating.

I'm struggling to break down the problem into smaller pieces, it seems that its just a trig problem.

Lets say the object sits at 0,0 has an acceleration vector of 0,1 m/s (so up). and rotation of 1 rpm clockwise. The acceleration vector is rotated clockwise at 1 rpm.

As time goes by, it should trace a semi-circle, as acceleration vector turns clockwise, and starts to contribute to velocity to the right. When it completes 1 revolution, it should come to a dead stop, but be some distance to the right.

The acceleration and rotation somehow both govern how far and how fast the object will go.

The "real world" thing I'm modelling is a simplistic 2d space ship physics. Simplistic because only the following forces are present:

The ship has constant clockwise or counter-clockwise rotation, and constant thrust vector, which rotates with it.

Given a starting velocity vector perpendicular to the thrust vector, its possible for the ship to create an "artificial orbit" around a fixed point in space. That shape will be a circle. As long as the thrust vector always points at the centre of the orbit, and all the variables are balanced (thrust, rotation, and initial velocity), the orbit will be perfectly circular.

If they are not ballanced, the ship will simply tumble in space, not gaining any overall velocity, just temporarily moving around a shape that looks like if you drew a circle, but translated the centre to the right by x (if the rotation is counter clockwise, the translation would be to the left). I can't find the name of such spiral.

I'm pretty sure the thrust vector is (cos(at), sin(at)), because at bearing 0, x component is 1, y component is 0, and it carries on around the circle as it rotates. That vector multiplied by thrust factor, seems to be correct.

The velocity integral (sin(at)/a,-cos(at)/a) doesn't seem right. At t=0 both x and y components should be 0, since we haven't spent any time "under the curve", yet -cos(0*0)/1 is -1. (smaller values of a, for slower rotation give larger negative y values, which doesn't sound right)

This seems to graph the correct position:
https://www.desmos.com/calculator/iycc3jodph

Its weird that I have to use different formulas for negative rotations

Best Answer

Take an initial acceleration $$ a(0)= \begin{bmatrix} a_1 \\ a_2 \end{bmatrix} $$ an initial velocity $$ v(0)= \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} $$ and initial position $$ p(0)= \begin{bmatrix} p_1 \\ p_2 \end{bmatrix} $$ Your acceleration vector is given by the initial acceleration rotating at $\omega$ radians per second, so multiply $a(0)$ by that rotation matrix: $$ a(t)= \begin{bmatrix} \cos(\omega t) & -\sin(\omega t) \\ \sin(\omega t) & \cos(\omega t) \end{bmatrix} a(0). $$ Velocity is given integrating once \begin{align} v(t) &= v(0)+\int_0^t \begin{bmatrix} \cos(\omega u) & -\sin(\omega u) \\ \sin(\omega u) & \cos(\omega u) \end{bmatrix} a(0)\,du \\ &= v(0)+\frac{1}{\omega} \begin{bmatrix} \sin(\omega t) & \cos(\omega t)-1 \\ -\cos(\omega t)+1 & \sin(\omega t) \end{bmatrix} a(0) \\ &= v(0) + \frac{1}{\omega} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} a(0) +\frac{1}{\omega} \begin{bmatrix} \sin(\omega t) & \cos(\omega t) \\ -\cos(\omega t) & \sin(\omega t) \end{bmatrix} a(0). \end{align} And integrate again for position \begin{align} p(t) &= p(0) + \int_0^t v(u)\,du \\ &= p(0) + t \left(v(0) + \frac{1}{\omega} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} a(0) \right) +\frac{1}{\omega^2} \begin{bmatrix} -\cos(\omega t)+1 & \sin(\omega t) \\ -\sin(\omega t) & -\cos(\omega t)+1 \end{bmatrix} a(0) \\ &= p(0) + \frac{1}{\omega^2}a(0) + t \left(v(0) + \frac{1}{\omega} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} a(0) \right) -\frac{1}{\omega^2} \begin{bmatrix} \cos(\omega t) & -\sin(\omega t) \\ \sin(\omega t) & \cos(\omega t) \end{bmatrix} a(0) \\ &= \begin{bmatrix} p_1 + \frac{1}{\omega^2}a_1 \\ p_2 + \frac{1}{\omega^2}a_2 \end{bmatrix} + t \begin{bmatrix} v_1 - \frac{1}{\omega} a_2 \\ v_2 + \frac{1}{\omega} a_1 \end{bmatrix} - \frac{1}{\omega^2} \begin{bmatrix} \cos(\omega t) & -\sin(\omega t) \\ \sin(\omega t) & \cos(\omega t) \end{bmatrix} \begin{bmatrix} a_1 \\ a_2 \end{bmatrix} \end{align} For $a(0)=(0,1)$, $v(0)=(-1,0)$, $p(0)=(0,0)$ and $\omega=-2\pi/60$ (1 revolution per minute counterclockwise) you get this.

trajectory

With $v(0)=(0,0)$ you get nice arcs. With $v(0)=\frac{1}{\omega}(a_2,-a_1)$, you get a perfect circular orbit. Here is the Desmos link.

Related Question