Space ship angular deceleration

AI Thread Summary
The discussion focuses on programming an addon for Kerbal Space Program that involves calculating the timing for a spaceship's angular deceleration during rotation. The user seeks a mathematical method to determine when to stop accelerating rotation to face a specific direction, given the ship's current angular velocity and maximum angular acceleration. Key equations are provided, including the relationship between torque, angular acceleration, and angular velocity. The user emphasizes the need for a solution that accounts for non-zero initial angular velocities and aims for the fastest reorientation without relying on calculus. The conversation highlights the importance of accurately timing the transition from acceleration to deceleration for effective attitude control in the simulation.
GWilde
Messages
3
Reaction score
0
I am programming an addon for a space game/simulation (Kerbal Space Program) and I am looking for some help with a bit of physics.

The part I need a little help with is related to attitude control. If the ship is rotating, is there a mathematical way to calculate when it needs to begin to decelerate rotation to stop facing a certain point? Say I know its current angular velocity and its max angular acceleration?

Ex.
For example ships starts facing direction 1. It begins accelerating its rotation towards directions 2. Then, at the specific calculated point it stops accelerating and begins decelerating so that it stops at direction 2.

In the code I was thinking that I would repeatedly check if at its current angular velocity, if it began decelerating would it stop in time.

Thanks for any help.
 
Physics news on Phys.org
For real space objects, generally a short and throttled pulse is used to initiate the rotation, and another short and throttled pulse is used to stop the rotation. A computer with gyro type inputs could do this, but humans were also able to do a good job of this during early space docking test missions. For satellites, internal torques applied to gyro's can be use to reorient them.
 
Thanks, that's cool and all but its not really my question.

I want to do the rotation as fast as possible, so the ship would go directly from accelerating rotation to decelerating rotation. What I need help with is the maths for figuring out when to decelerate rotation.
 
I'm not familiar with doing all the symbolic maths in a post, so I'll have a go with ancient methods.
If you know the ships rotational inertia (I) about the axis if rotation, then you can use T=I*alpha, where T=applied torque (the thruster or whatever), and alpha is the angular acceleration.
Use this with omega = alpha*t, where t is time, omega is angular velocity, and with omega = omega0 + alpha*t where omega0 is initial angular velocity and in this case omega is final angular velocity.
Hence, if you know initial omega0, and I, then calculate a torque T to be applied over time t to make omega zero.
Hope that helps.

Cheers,
Terry
 
For the fastest reorientation, a torque is applied until rotated 1/2 of the way to the new orientation, then an opposing torque of the same magnituded is applied for the second half of the reorientation.
 
How do I factor in that I need the angular velocity to equal zero when the ship will be at the final direction?

Edit: Accelerating for half the time and decelerating for half the time would work for the example of starting from zero rotational velocity, but when implemented the ship might not start from zero rotational velocity so that isn't how I want to do it.
 
Last edited:
It's simialr to linear math. You have an initial angular orientation and initial angular velocity. You want to end up with a final angular orientaion and angular velocity of zero. Assume that the magnitude of the torque is constant and that only the direction changes (if it changes at all, in some cases the solution only required deceleration of the ship). This should only require algebra, not calculus, to solve.
 
GWilde said:
If the ship is rotating, is there a mathematical way to calculate when it needs to begin to decelerate rotation to stop facing a certain point? Say I know its current angular velocity and its max angular acceleration?
time = current angular velocity / angular acceleration
 
Back
Top