Compute ship position change in time, given the current state.
Computation of the next state is based on the world state, the ship
internal and external state and time passed.
Currently, we approximate ship movement using the following model:
-
For forward motion, we model forward force that operates on the ship
by the engine, and a drag, which is quadratic in the ship's speed.
-
For turning, there is an rotational torque that is applied by the
rudder, and is proportional to the ship's speed, and to
sin(rudder-steering-angle), which is the projection of the rudder on
the lateral direction. There is also a rotational drag force, that is
quadratic in the ship's angular speed, (need to check about the
accuracy of this modelling).
-
Based on the above forces and the ship's mass, we compute the forward
and angular accelerations.
-
Then based on the average forward and angular speed in a given time
step, computed using the above accelerations, we infer the turn
radius, and based on that, compute the ship position at the end of
this time-step.
Approximations we make:
-
Although the angular acceleration depends on forward speed, which is
changing due to forward acceleration, we still assume constant
angular acceleration, based on the avg. speed in this step.
-
Forward acceleration computation does not take into account the
affects of turning which (might?) slow it down.
-
Forward acceleration depends on the drag, which is changing with
speed change, but we approximate the drag based on the initial speed
of a time step
|