![]() |
VR-Forces 4.1.1 Class Documentation
|
VR-Forces includes a simple, kinematics-based model for motion of missiles.
Implemented in class: DtMissileManeuverActComponent
The model accepts the following control inputs:
Other factors taken into consideration:
The missile is maneuverable (respond to steering acceleration inputs) for the duration of the max-burn-time parameter, whereupon it will go into free fall. Missiles are typcially configured with high maximum speeds, making them sensitive to low frame rates.
The model must be ticked periodically. Each tick, the length of time of the previous tick, dT, is available as a parameter in the current tick. Below is an outline of what the model does each tick:
If the missile has been destroyed, it calls myMissileControlPortGroup->dataReceived() to release control of the port group, and returns.
If this is the first time the tick has been called, and the missile is not destroyed, it computes the maximum burn time for the missile, and saves it in the member variable myMaxBurnTime. The engine burns fuel for a duration defined by the missile's range divided by the maximum speed. After that point, the missile goes into free fall. Maneuver acceleration inputs are ignored, and the only acceleration affecting missile motion is that due to gravity.
If the current burn time has exceeded myMaxBurnTime, it sets an acceleration vector for the missile in local coordinates, for example:
Otherwise, it initializes the local acceleration from the inputs provided on the missile maneuver port:
It computes the local velocity vector due to the maneuver acceleration by scaling the acceleration by dT, the duration of the frame. The resulting vector is added to the missile's current velocity.
The local velocity is scaled to the maximum velocity of the missile.
The new local location of the missile is determined by adding the change in position over the duration of the frame dT, to the current position.
The orientation of the missile is computed from the missile’s velocity vector.
[<< Human Kinematics Model] [Home] [Top of Page] [Missiles Dynamics System >>]