Marine systems simulation
MooringCable.h
1#pragma once
11#include "ITrawlCable.h"
12#include "SimObject.h"
13
14
15#ifdef FH_VISUALIZATION
16 #include "sfh/ogre/C3DLine.h"
17#endif
18
19
20class MooringCable : public SimObject{
21public:
22 MooringCable(const string& simObjectName, ISimObjectCreator* const creator);
24 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
25 void InitialConditionSetup(const double T, const double *const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
26 void FinalSetup(const double T, const double *const X, ISimObjectCreator* const creator);
27
28 const double* posBuoy(const double T, const double* const X);
29
30#ifdef FH_VISUALIZATION
31 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
32 void RenderUpdate( const double T, const double* const X);
33#endif
34
35protected:
36 struct element{int p; int q; int v; int w; int n;};
37 vector<element> m_CableElements;
38
39 void DistributeCatenary(CoRiBoDynamics::vec3 P1, CoRiBoDynamics::vec3 P2, /*vector<element> elements, double L,*/ double* states, /*int i1, int i2,*/ ISimObjectCreator* creator);
40
41
42 ICommonComputation* m_MainCalculations;
43 void MainCalculations(const double T, const double* const X);
44
45 const double* ForceA(const double T, const double* const X);
46 const double* ForceB(const double T, const double* const X);
47 double m_ForceA[3];
48 double m_ForceB[3];
49 int m_cIndexA;
50 int m_cIndexB;
51
52 int m_bouyElement;
53 double m_bouyElementDistance;
54
56
57 ISignalPort* m_PosA;
58 ISignalPort* m_PosB;
59 ISignalPort* m_VelA;
60 ISignalPort* m_VelB;
61
62 double m_TotalLength;
63 double m_ElementLength;
64
65 int m_Num;
66 int m_TopChainNum;
67 int m_MidRopeNum;
68 int m_BottomChainNum;
69
70 double m_frequencyCoefficient;
71 double m_TopChainDiameter;
72 double m_MidRopeDiameter;
73 double m_BottomChainDiameter;
74
75
76 ITrawlCable* m_TrawlCable;
78
79#ifdef FH_VISUALIZATION
80 bool m_HQ_Render;
81 Ogre::SceneNode** m_CableNodes;
82 Ogre::SceneNode *m_SafetyZoneNode;
83 C3DLine* m_CableLine;
84 C3DLine* m_TopCableLine;
85 C3DLine* m_BottomCableLine;
86#endif
87};
Definition: TrawlCableConstraintSets.h:70
Definition: TrawlCableConstraintSets.h:10
Definition: ITrawlCable.h:17
Definition: MooringCable.h:20
Definition: MooringCable.h:36