template <class T>
class vtb::core::Ship_motion_equation

System of ordinary differential equations of translational and angular ship motion.

  • Uses Earth-fixed coordinate system.
  • Uses quaternions instead of Euler angles to alleviate Gimbal lock problems.
  • Uses centre of floatation as a point around which the ship rotates.
  • Every term in the equation is divided by ship mass.
  • Uses the formulae adapted from [1]. Here is ship position, is ship orientation in quaternion form, is linear velocity, is angular velocity, is a vector of external forces, is a vector of external force moments, is angular velocity, is angular acceleration, is the vector from centre of gravity to centre of floatation, is ship hull inertia matrix computed with respect to centre of gravity in body-fixed coordinate system, is the same matrix in Earth-fixed coordinate system, is translation matrix computed for centre of floatation, is rotation matrix for quaternion . Formulae for auxiliary physical quantities:
  • Froude—Krylov, gravity and wind force moments are computed with respect to centre of floatation (see [11]).

Types
  • using matrix_type = vtb::geometry::Matrix< T, 3 >
  • using quaternion_type = typename Ship< T >::quaternion_type
  • using rotation_matrix_type = typename Ship< T >::rotation_matrix_type
  • using variables_type = typename Ship< T >::variables_type
  • using state_vector_type = typename Ship< T >::state_vector_type
  • using scalar_type = T
Methods
  • clear() -> void
  • calc_forces_and_torques(const Ship< T > & ship, Vector< T, 3 > buoyancy_force, Vector< T, 3 > wind_force) -> void
  • delta() const -> const Vector< T, 3 > &
  • delta(const Vector< T, 3 > & rhs) -> void
  • total_torque() const -> const Vector< T, 3 > &
  • total_force() const -> const Vector< T, 3 > &
  • angular_damping() const -> const Vector< T, 3 > &
  • angular_damping(const Vector< T, 3 > & rhs) -> void
  • linear_damping() const -> const Vector< T, 3 > &
  • linear_damping(const Vector< T, 3 > & rhs) -> void
  • total_torque(const Vector< T, 3 > & rhs) -> void
  • total_force(const Vector< T, 3 > & rhs) -> void
  • gravity_force(const Vector< T, 3 > & rhs) -> void
  • translation_matrix(const matrix_type & rhs) -> void
  • translation_matrix() const -> const matrix_type &
  • inertia_matrix(const rotation_matrix_type & rhs) -> void
  • inertia_matrix() const -> const rotation_matrix_type &
  • operator()(T t, const state_vector_type & vars) -> state_vector_type
  • operator()(T t, const variables_type & vars) -> variables_type
  • solve(T t, const state_vector_type & v, state_vector_type & dv) -> void
  • Ship_motion_equation(const rotation_matrix_type & inertia_matrix)explicit
  • Ship_motion_equation()