|
FhSim
3.1.0
Marine systems simulation
|
The sum of the loads on a body: the force [0..2] and the moment about the origin [3..5], body frame.
#include <HydroBody.h>
Public Member Functions | |
| 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]) |
| void | AddWeightAndBuoyancy (const FlowFrame &frame, double mass, const double cog_d[3], const double buoyancy_n[3]) |
Public Attributes | |
| double | values [6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0} |
| void hydro_body::Wrench::AddForceAt | ( | const FlowFrame & | frame, |
| const double | pos_d[3], | ||
| const double | force_n[3] | ||
| ) |
Adds the NED force force_n acting at the body-frame point pos_d, and its moment.
| [in] | frame | The frame that rotates the force into the body frame. |
| [in] | pos_d | The point of attack, body frame [m]. |
| [in] | force_n | The force, NED [N]. |
| void hydro_body::Wrench::AddWeightAndBuoyancy | ( | const FlowFrame & | frame, |
| double | mass, | ||
| const double | cog_d[3], | ||
| const double | buoyancy_n[3] | ||
| ) |
Adds the weight mass * marenv::gravity at the body-frame point cog_d and the NED force buoyancy_n at the origin.
The weight is rotated into the body frame, its moment about the origin taken at cog_d, the buoyancy rotated and added into the same local wrench, and that wrench added once. This is not two AddForceAt calls: those add the weight and the buoyancy to the sum one by one, (w + g) + b, where this adds w + (g + b).
| [in] | frame | The frame that rotates the forces into the body frame. |
| [in] | mass | The mass of the body [kg]. |
| [in] | cog_d | The centre of gravity, body frame [m]. |
| [in] | buoyancy_n | The buoyancy force, NED [N], acting at the origin (so with no moment). |