4#include "BodyKinematics6Dof.h"
5#include "RigidBodyTerms.h"
7#include <fhsim/simobject/ISimObjectCreator.h>
10namespace environment::wake
12class BodyFlowInteraction;
57 double values[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
60 void Add(
const double wrench[6]);
88 HydroBody(ISimObjectCreator* creator,
const std::string& angularRateName,
double convergenceTime, rigid_body::MunkMoment munk);
95 void SetInertia(
const double rigid[6],
const double added[6]);
153 rigid_body::MunkMoment m_munk;
154 double m_rigidInertia[6] = {};
155 double m_addedMass[6] = {};
156 double m_massInverse[6][6] = {};
Definition BodyKinematics6Dof.h:37
Definition HydroBody.h:78
const double * AddedMass() const
The diagonal of the added mass.
Definition HydroBody.h:104
hydro_body::FlowFrame LocalFrame(const environment::wake::BodyFlowInteraction &flow, double t, const double *localX) const
LocalFrame(localX, waterVel_n) with the water velocity of flow at the body origin at time t.
void AddJacobian(const double *localX, const hydro_body::FlowFrame &frame, double dWrench[6][6], double *J, int nStates) const
HydroBody(ISimObjectCreator *creator, const std::string &angularRateName, double convergenceTime, rigid_body::MunkMoment munk)
hydro_body::FlowFrame LocalFrame(const double *localX, const double waterVel_n[3]) const
void Derivatives(const hydro_body::FlowFrame &frame, const hydro_body::Wrench &wrench, const double *X, double *XDot) const
const BodyKinematics6Dof & Kinematics() const
The kinematic states and their indices.
Definition HydroBody.h:98
hydro_body::FlowFrame Frame(const environment::wake::BodyFlowInteraction &flow, double t, const double *X) const
Frame(X, waterVel_n) with the water velocity of flow at the body origin at time t (BodyFlowInteractio...
hydro_body::FlowFrame Frame(const double *X, const double waterVel_n[3]) const
const double * RigidInertia() const
The diagonal of the rigid-body inertia.
Definition HydroBody.h:101
void SetInertia(const double rigid[6], const double added[6])
double InverseMass(int i) const
The entry i of the diagonal of M^-1.
Definition HydroBody.h:107
Definition HydroBody.h:41
const double * omega
The angular-rate state, body frame [rad/s].
Definition HydroBody.h:45
double waterVel_n[3]
The water velocity at the body origin, NED [m/s].
Definition HydroBody.h:49
const double * vel_d
The velocity state, body frame [m/s].
Definition HydroBody.h:44
const double * quater
The attitude quaternion state [q0, q1, q2, q3].
Definition HydroBody.h:43
double waterVel_d[3]
The water velocity at the body origin, body frame [m/s].
Definition HydroBody.h:50
double R[3][3]
The body-to-NED rotation matrix.
Definition HydroBody.h:47
double relVel_d[3]
The velocity of the body relative to the water, vel_d - waterVel_d, body frame [m/s].
Definition HydroBody.h:51
double vel_n[3]
The velocity of the body origin, NED [m/s].
Definition HydroBody.h:48
const double * pos_n
The position state, NED [m].
Definition HydroBody.h:42
The sum of the loads on a body: the force [0..2] and the moment about the origin [3....
Definition HydroBody.h:56
void Add(const double wrench[6])
Adds the body-frame wrench wrench.
void AddForceAt(const FlowFrame &frame, const double pos_d[3], const double force_n[3])