@name Angular Velocity Stabilisation
@inputs Thruster:wirelink Base:entity PitchInput YawInput RollInput
interval(20)
AngVel = Base:angVel()
CentreVector = (Base:pos() - Thruster:entity():pos()):normalized()
PitchVector = CentreVector:cross(Base:right())
YawVector = CentreVector:cross(Base:up())
RollVector = CentreVector:cross(Base:forward())
Thrust = PitchVector*(AngVel:pitch() + PitchInput)
Thrust += YawVector*(AngVel:yaw() + YawInput)
Thrust += RollVector*(AngVel:roll() + RollInput)
Thruster["Vector",vector] = Thrust
 Velocity Stabilisation (by fishface60)

#Description: The purpose of this expression is to allow thrusters placed anywhere on a 
#contraption to right the orientation. To make it work on your contraption you may need 
#to reassign the forward, right and up vectors dependant on which way you like up. Also, 
#some Values may need to be negated, and for it to run smoothly you may have to multiply 
#by some constants. To use, create an entity marker and link it to the prop you want to 
#use for the base, in my case a vehicle pod. Then spawn a vector thruster and use the 
#wirelink tool on it to create the wirelink output. After this just wire it up. Remember 
#that you need one of these gates per vector thruster, it doesn't have to be located near 
#the thruster though, it can be closer to the control circuits to make it easier to wire, 
#or it could be on a control board, which could be recommended to reduce lag. 