REVERT: compute platform attitude by integration
@@ -320,12 +320,6 @@ def interp_1st_dim_matrix(A, vec, value):
# A[2, :, :] *= 2.
# interp_1st_dim_matrix(A, vec, 0.6)
-def integrate_one_step_nb(x, xdot, xdotdot, it, dt, newmark_damp):
-
- gamma = 0.5 + newmark_damp
- beta = 0.25*(gamma + 0.5)*(gamma + 0.5)
-
- x[it, :] = x[it - 1, :] + dt*xdot[it - 1, :] + (0.5- beta)*dt**2*xdotdot[it - 1, :] + beta*dt*xdotdot[it, :]
@generator_interface.generator
@@ -364,10 +358,6 @@ class FloatingForces(generator_interface.BaseGenerator):
settings_default['dt'] = None
settings_description['dt'] = 'Time step'
- settings_types['newmark_damp'] = 'float'
- settings_default['newmark_damp'] = 1e-4
- settings_description['newmark_damp'] = 'Damping of the Newmark-beta time integration scheme'
-
settings_types['water_density'] = 'float'
settings_default['water_density'] = 1025 # kg/m3
settings_description['water_density'] = 'Water density'
@@ -583,9 +573,9 @@ class FloatingForces(generator_interface.BaseGenerator):
self.q[it, 0:3] = (np.dot(cga, struct_tstep.pos[self.buoyancy_node, :]) +
struct_tstep.for_pos[0:3])
# ams: in my casethe angles are negative in the x and z components
- # self.q[it, 3:6] = (algebra.quat2euler(struct_tstep.quat)*
- # np.array([-1., 0., -1.]))
- # # np.array([1., 0., 1.]))
+ self.q[it, 3:6] = (algebra.quat2euler(struct_tstep.quat)*
+ np.array([-1., 0., -1.]))
+ # np.array([1., 0., 1.]))
self.qdot[it, 0:3] = np.dot(cga, struct_tstep.for_vel[0:3])
self.qdot[it, 3:6] = np.dot(cga, struct_tstep.for_vel[3:6])
@@ -593,9 +583,6 @@ class FloatingForces(generator_interface.BaseGenerator):
self.qdotdot[it, 0:3] = np.dot(cga, struct_tstep.for_acc[0:3])
self.qdotdot[it, 3:6] = np.dot(cga, struct_tstep.for_acc[3:6])
- integrate_one_step_nb(self.q[:, 3:6], self.qdot[:, 3:6], self.qdotdot[:, 3:6],
- it, self.settings['dt'], self.settings['newmark_damp'])
-
return
