I continued working with the ODE library, this time working on the Reaction Control System (RCS). The RCS in a ship is designed to control the orientation in non-atmospheric conditions. It is also used to do fine maneuvering. There are two modes: Linear for position changes in each of the three relative dimensions, and Rotational for performing orientation changes on any of the three axes.
The two main functions from ODE that manage the changes are dBodyAddRelForce() and dBodyAddRelTorque(). The ability to apply the force and torque in a way relative to the body’s coordinate system greatly simplifies things. This is particularly true with applying torque because once the ship is rotated it is necessary to apply the rotation in relation to the ship’s current orientation vector. This way the model handles the translation (which otherwise is a mathematical challenge). Each activation acts as an impulse (as opposed to a continuous force). This allows one to be able to actually stop rotation using an equal number of applications in a reverse direction.
Next up will be experimenting with the ODE collision detection system.
- Charlie's blog
- Log in to post comments