# Predicting the 2D path of a rotating rocket?

This topic is 2620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am working on a turn-based space combat game, where the player chooses the throttle and rotation for the next 5 seconds, and then submits the turn and it proceeds. Somewhat similar to Steambirds, but the (semi-newtonian) physics of space flight make it somewhat more complex. What I want to be able to do is draw the projected path the ship will take, and have it update as the player adjusts the throttle and rotation controls. Simulating the movement in-engine (Unity) would not work for this, but is my backup plan if I can't make it work.

The thing holding me back is finding an equation to describe the path of an object with the magnitude of the acceleration constant, but the direction of the acceleration rotating at a constant rate.

Known variables: starting velocity/position, initial acceleration magnitude/direction, rate at whiche the direction of acceleration is changing
target variable: position after X seconds.

The extent of my physics knowledge is on working with constant, or at least average acceleration, the latter of which I think may be the answer. Does anyone know how to find the average acceleration of a rotating rocket (or other object with constant magnitude of acceleration, and rotating direction of acceleration?) My current line of reasoning is that at rotation = 360 degrees, the average acceleration will be 0, but I'm stuck on where to go from there.

##### Share on other sites

a(t) = a * [ cos(r[sub]0[/sub]+wt) ; sin(r[sub]0[/sub]+wt) ]

for initial angle r[sub]0[/sub], constant rate of rotation w and time t with magnitude of accleration a

v(t) = integral(0->t) a(t) = v[sub]0[/sub] + a * [ (sin(r[sub]0[/sub]+wt)-sin(r[sub]0[/sub]))/w ; (cos(r[sub]0[/sub])-cos(r[sub]0[/sub]+wt))/w ]

for initial velocity v[sub]0[/sub]

x(t) = integral(0->t) v(t) = x[sub]0[/sub] + a * [ -(wt.sin(r[sub]0[/sub]) + cos(r[sub]0[/sub]+wt) - cos(r[sub]0[/sub]))/w^2 ; (wt.cos(r[sub]0[/sub]) - sin(r[sub]0[/sub]+wt) + sin(r[sub]0)[/sub])/w^2 ] + t*v[sub]0[/sub]

for initial position x[sub]0[/sub]
[sub]
[/sub]
[sub]since the acceleration only lasts for 5 seconds; all of these become piece-wise maps; defined as above for t = 0 -> 5, and then after t = 5, you'd go back to normal equations of motion with:

a(t>5) = [0 ; 0]
v(t>5) = v(5)
x(t>5) = x(5) + (t-5)*v(5)[/sub]

and in all cases your rotation follows:

r(t) = r[sub]0[/sub] + tw

1. 1
Rutin
28
2. 2
3. 3
4. 4
5. 5

• 13
• 11
• 10
• 13
• 20
• ### Forum Statistics

• Total Topics
632948
• Total Posts
3009406
• ### Who's Online (See full list)

There are no registered users currently online

×