Marine systems simulation
CTrawlDoorAddedFoil.h
1
59#ifndef CTrawlDoorAddedFoil_H
60#define CTrawlDoorAddedFoil_H
61
62#include "CToTrawlDoor.h"
63
65{
66public:
68 CTrawlDoorAddedFoil(std::string sSimObjectName, ISimObjectCreator* pCreator);
69
71 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
72
73 void FinalSetup(const double dT, const double *const adX, ISimObjectCreator* const pCreator);
74
76 const double* OutFoilEnergyConsumed(const double dT, const double* const adX);
77
78
79
80#ifdef FH_VISUALIZATION
81 // Initial specification of the simObject geometry for rendering.
82 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator);
83
84 // Updating the simObject for rendering the next frame.
85 virtual void RenderUpdate(const double dT, const double* const adX);
86#endif
87
88protected:
89 virtual void AddExternalForces(double dT, const double* const adX);
90 void SetFoilRatio(const double dT, const double* const adX);
91
92 ISignalPort* m_pInFoilRelAoa;
93 ISignalPort* m_pInFoilExposedAreaRatio;
94 ISignalPort* m_pInFoilRelPosition;
95
96 double* m_foilHydro_Aoa;
97 double* m_foilHydro_CL;
98 double* m_foilHydro_CD;
99 double m_foilEnergyConsumed;
100 double m_foilCord;
101 double m_foilSpan;
102 int m_numFoilHydroPoints;
103 bool m_foilIsVertical;
104
105#ifdef FH_VISUALIZATION
106 Ogre::Vector3 ToFoilScale(double x, double y, double z);
107 void SetFoilPos(double x, double y, double z);
108 float m_foilRelRollAngle;
109 Ogre::ManualObject* m_foilManualObject;
110 Ogre::SceneNode* m_pFoilRenderNode;
111#endif
112};
113
114
115#endif
Definition: CToTrawlDoor.h:111
Definition: CTrawlDoorAddedFoil.h:65
CTrawlDoorAddedFoil(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
const double * OutFoilEnergyConsumed(const double dT, const double *const adX)
Output port returning the foil energy consumption.