# Rigid body dynamics question

Hi!
I have been working on a rigid body subject quite a long. But till now there is an unresolved question for me. When we calculating the torque acting on the rigid body we use the following definition of the torque: t = r X f, X - is a cross product. So if I calculate the torque in a body-fixed system I use r in the body-fixed system too, but for force f - I am not sure. In which coordinate system should it be expressed - in the body-fixed or in space-fixed. Are this forces different in both systems? Sorry, for probably stupid questions. Thanks

## Answers and Replies

Sorry, I've found - we really need to do all in the same coordinate system.

But now, I have some other question - probably, more interesting. The torque acting on the rigid body (expressed in the body-fixed frame) is given by: t = -0.5*S(q)*(dU/dq), gde U - potential, q - is a quaternion, ans S(q) - is a matrix such that: dq/dt = 0.5*S(q)w, where w - is a 4-dimensional angular velocity. Can anybody explain how to get that formula for the torque?