|
FhSim
3.1.0
Marine systems simulation
|
Inheritance diagram for rigidbody::CRigidBody:Public Member Functions | |
| virtual vec6 | GetInternalForces (const vec6 &dX, const vec3 &r, const quat &q, environment::EnvironmentProvider *environment, double time, const double *states)=0 |
| virtual mat64 | GetGravityForceDerivative (const quat &q)=0 |
| virtual mat6 | GetInertiaMatrix (const vec3 &r, double time, const double *states, environment::EnvironmentProvider *environment)=0 |
| vec13 | GetSecondDerivative (const vec3 &r, const quat &q, const vec3 &v, const vec3 w, const vec6 &externalForces, environment::EnvironmentProvider *environment, double time, const double *states) |
| mat13 | GetSecondDerivativeJacobian (const vec3 &r, const quat &q, const vec3 &v, const vec3 &w, const vec6 &externalForces, environment::EnvironmentProvider *environment, double time, const double *states) |
| void | WriteStateJacobian (const double *X, int positionIndex, int quaterIndex, int velocityIndex, int omegaIndex, const vec6 &externalForces, environment::EnvironmentProvider *environment, double time, double *J, int nStates) |
|
pure virtual |
d(gravity part of GetInternalForces)/dq, over (q.w, q.x, q.y, q.z).
q: global; return: bodylocal. The other internal forces (drag, soil) have no derivative here.
Implemented in rigidbody::CRigidCompositeBody, rigidbody::CRigidCylinder, and rigidbody::CRigidPolyplate.
| mat13 rigidbody::CRigidBody::GetSecondDerivativeJacobian | ( | const vec3 & | r, |
| const quat & | q, | ||
| const vec3 & | v, | ||
| const vec3 & | w, | ||
| const vec6 & | externalForces, | ||
| environment::EnvironmentProvider * | environment, | ||
| double | time, | ||
| const double * | states | ||
| ) |
Jacobian of GetSecondDerivative with respect to (r, q, v, w), in the order of its result.
Exact for the kinematics, the quaternion dynamics, the inertia and Coriolis terms, the rotation of externalForces and gravity, also where |q| != 1. It omits the derivatives of the other internal forces (hydrodynamic drag, soil) and of the inertia matrix (added mass through the water density at r): both are held fixed in the body frame. The result is therefore exact only out of the water.
| void rigidbody::CRigidBody::WriteStateJacobian | ( | const double * | X, |
| int | positionIndex, | ||
| int | quaterIndex, | ||
| int | velocityIndex, | ||
| int | omegaIndex, | ||
| const vec6 & | externalForces, | ||
| environment::EnvironmentProvider * | environment, | ||
| double | time, | ||
| double * | J, | ||
| int | nStates | ||
| ) |
Writes GetSecondDerivativeJacobian into the row-major Jacobian J of a SimObject whose state vector X holds r, q, v and w at the given indices (all local to X and J).