I have a space ship moving in XYZ space in a random direction. That ship is facing a different random direction. Given both the ships velocity and direction I am trying to calculate braking power for each of the ships thrusters, 1 in each direction of the ship (forward, backward, left, right, up, down or x+, x-, y+, y-, z+, z-). Further complicating the problem, the ship may be using thrusters on any of it's axis.
I am trying to find three velocities that I can apply along the ships axis to stop it's motion along any of those axis.
As an example the ship is moving with a velocity of (1,0,0) and facing (0,0,1), I need an equation that will bring the X velocity to 0 so the ship does not continue to slide along the X axis. This is just a simple example however as the equation needs to be able to work on any vector.
Does anyone know how I could solve this problem?
I am trying to write this for a computer simulation, and my current solution of just dividing the current velocity and then adding thrust doesn't work very well.
Once again, I know the: Ships Velocity, Ships Direction and Current Thrust.