FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
ToTrawlDoor.h
1#pragma once
2
122#include "TrawlDoorBase.h"
123#include <string>
124
125#include <fhsim_environment/EnvironmentProvider.h>
126#include <fhsim_environment/SeafloorForcesInterface.h>
127
129{
130public:
132 ToTrawlDoor(std::string simObjectName, ISimObjectCreator* creator);
133
135 const double* OutRoll(const double dT, const double* const adX);
136
137 // Output port returning the pitch angle of the trawl door.
138 const double* OutPitch(const double dT, const double* const adX);
139
140 // Output port returning the angle of attack of the trawl door.
141 const double* OutAngleOfAttack(const double dT, const double* const adX);
142
144 const double* OutHydroLoad(const double dT, const double* const adX);
145
147 const double* OutSeabedLoad(const double dT, const double* const adX);
148
149#ifdef FH_VISUALIZATION
151 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
152
154 virtual void RenderUpdate(const double dT, const double* const adX);
155#endif
156
157protected:
159 void FinalSetup(const double dT, const double* const adX, ISimObjectCreator* const creator);
160
162 void AddBottomForces(const hydro_body::FlowFrame& frame, hydro_body::Wrench& wrench) const override;
163
165 environment::seabed::ContactLoad<double> SeabedLoadOf(const hydro_body::FlowFrame& frame) const;
166
169 bool HasJacobians() const override { return false; }
170
176 ISimObjectCreator* m_creator = nullptr;
177 environment::SeafloorForcesInterface* m_seafloorForces = nullptr;
178 double m_shoeWidth;
179 double m_outHydroLoad[6] = {0, 0, 0, 0, 0, 0};
180 double m_outSeabedLoad[6] = {0, 0, 0, 0, 0, 0};
181 double m_roll;
182 double m_pitch;
183};
Definition ToTrawlDoor.h:129
environment::SeafloorForcesInterface * m_seafloorForces
The shared "SeafloorForces", from FinalSetup.
Definition ToTrawlDoor.h:177
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:179
bool HasJacobians() const override
Definition ToTrawlDoor.h:169
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:178
double m_outSeabedLoad[6]
Output port SeabedLoad.
Definition ToTrawlDoor.h:180
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:176
Definition TrawlDoorBase.h:191
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