FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
ToTrawlDoor.h
1#pragma once
2
118#include "TrawlDoorBase.h"
119#include <string>
120
121#include <fhsim_environment/EnvironmentProvider.h>
122#include <fhsim_environment/SeafloorForcesInterface.h>
123
125{
126public:
128 ToTrawlDoor(std::string simObjectName, ISimObjectCreator* creator);
129
131 const double* OutRoll(const double dT, const double* const adX);
132
133 // Output port returning the pitch angle of the trawl door.
134 const double* OutPitch(const double dT, const double* const adX);
135
136 // Output port returning the angle of attack of the trawl door.
137 const double* OutAngleOfAttack(const double dT, const double* const adX);
138
140 const double* OutHydroLoad(const double dT, const double* const adX);
141
143 const double* OutSeabedLoad(const double dT, const double* const adX);
144
145#ifdef FH_VISUALIZATION
147 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
148
150 virtual void RenderUpdate(const double dT, const double* const adX);
151#endif
152
153protected:
155 void FinalSetup(const double dT, const double* const adX, ISimObjectCreator* const creator);
156
158 void AddBottomForces(const hydro_body::FlowFrame& frame, hydro_body::Wrench& wrench) const override;
159
161 environment::seabed::ContactLoad<double> SeabedLoadOf(const hydro_body::FlowFrame& frame) const;
162
165 bool HasJacobians() const override { return false; }
166
172 ISimObjectCreator* m_creator = nullptr;
173 environment::SeafloorForcesInterface* m_seafloorForces = nullptr;
174 double m_shoeWidth;
175 double m_outHydroLoad[6] = {0, 0, 0, 0, 0, 0};
176 double m_outSeabedLoad[6] = {0, 0, 0, 0, 0, 0};
177 double m_roll;
178 double m_pitch;
179};
Definition ToTrawlDoor.h:125
environment::SeafloorForcesInterface * m_seafloorForces
The shared "SeafloorForces", from FinalSetup.
Definition ToTrawlDoor.h:173
void AddBottomForces(const hydro_body::FlowFrame &frame, hydro_body::Wrench &wrench) const override
Adds the seabed load of the evaluator to the trawl door, in the body frame.
const double * OutSeabedLoad(const double dT, const double *const adX)
Output port returning the seabed load on the door: NED force then NED moment about the door origin.
double m_outHydroLoad[6]
Output port HydroLoad.
Definition ToTrawlDoor.h:175
bool HasJacobians() const override
Definition ToTrawlDoor.h:165
const double * OutRoll(const double dT, const double *const adX)
Output port returning the roll angle of the trawl door.
double m_shoeWidth
Width of the shoe [m], from ShoeWidth.
Definition ToTrawlDoor.h:174
double m_outSeabedLoad[6]
Output port SeabedLoad.
Definition ToTrawlDoor.h:176
const double * OutHydroLoad(const double dT, const double *const adX)
Output port returning the hydrodynamic load on the door: NED force then NED moment about the door ori...
ToTrawlDoor(std::string simObjectName, ISimObjectCreator *creator)
The constructor sets the pointer to the output object and the parser object.
environment::seabed::ContactLoad< double > SeabedLoadOf(const hydro_body::FlowFrame &frame) const
The seabed load of the door in the pose and with the velocity of frame: NED, moment about the door or...
void FinalSetup(const double dT, const double *const adX, ISimObjectCreator *const creator)
Resolves the SeafloorForces resource after the base class has resolved the environment.
ISimObjectCreator * m_creator
Definition ToTrawlDoor.h:172
Definition TrawlDoorBase.h:190
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:57