So i've been working on a thruster control program and I need to determine the torque induced by a given thruster.
Now the standard way to calculate the magnitude of a torque input is to determine the length of the lever arm and then multiply by the applied force. Where the lever arm is the perpendicular distance from the axis of rotation to the line of action of the force.
To this end I wrote the following code...
where T is the torque vector F is force and pos is the thruster's reference point.
I know that this is wrong.
So how do I calculate torque lever arm in 3 dimensions?
Now the standard way to calculate the magnitude of a torque input is to determine the length of the lever arm and then multiply by the applied force. Where the lever arm is the perpendicular distance from the axis of rotation to the line of action of the force.
To this end I wrote the following code...
Code:
// Torque
output.T.x = output.pos.x * output.F.x;
output.T.y = output.pos.y * output.F.y;
output.T.z = output.pos.z * output.F.z;
where T is the torque vector F is force and pos is the thruster's reference point.
I know that this is wrong.
So how do I calculate torque lever arm in 3 dimensions?