Marine systems simulation
CTrawlVessel.h
1
10
11#ifndef CTrawlVessel_H
12#define CTrawlVessel_H
13
14#include <stdio.h>
15#include <string>
16
17#include "SimObject.h"
18
19class CTrawlVessel : public SimObject
20{
21public:
22 CTrawlVessel(std::string sSimObjectName, ISimObjectCreator* pCreator);
24
25 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
26
27#ifdef FH_VISUALIZATION
28 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator);
29 virtual void RenderUpdate(const double dT, const double* const adX);
30#endif
31
32protected:
33
34
35 double m_dApSpeed;
36
38 const double* OutHeading(const double dT, const double* const adX);
39 const double* OutPos(const double dT, const double* const adX);
40 const double* OutVel(const double dT, const double* const adX);
41 const double* OutWarpPos(const double dT, const double* const adX, int iWarp);
42 const double* OutWarpVel(const double dT, const double* const adX, int iWarp);
43 void CalcOutput(const double dT, const double* const adX);
44 virtual void DoDerivedOutputUpdate(const double dT, const double* const adX){}
45
46 double m_adOut_Pos[3];
47 double m_adOut_Vel[3];
48 double* m_adOut_WarpPos;
49 double* m_adOut_WarpVel;
50 ICommonComputation* m_pCommonCalc;
51
52
53 int m_IStatePos;
54 int m_IStateHeading;
55 double m_Breadth;
56 double m_Draught;
57 double m_Length;
58 double m_WarpPosPrt[3];
59 double m_WarpPosStb[3];
60 double m_dPitch;
61 double ** m_aadWarpPos;
62 int m_iNumWarps;
63 double m_dDesiredSpeed;
64 double m_dDesiredHeading;
65
66#ifdef FH_VISUALIZATION
67 Ogre::Entity* m_RenderMass;
68 Ogre::SceneNode* m_RenderNode;
69 Ogre::Quaternion m_InitOrientation;
70 double m_LengthScale;
71 double m_BreadthScale;
72 double m_DepthScale;
73 double m_adDeltaRenderPos[3];
74 std::string m_MeshName;
75#endif
76
77};
78
79
80#endif
Class modelling a simple vessel used for the trawl optimization tool.
Definition: CTrawlVessel.h:20
double m_dApSpeed
The speed of the autopilot.
Definition: CTrawlVessel.h:35
ICommonComputation * m_pCommonCalc
Calculations necessary for more than one output port.
Definition: CTrawlVessel.h:50
const double * OutHeading(const double dT, const double *const adX)
Output ports.