Marine systems simulation
CRBCable.h
1#pragma once
65#include <SimObject.h>
66#ifdef FH_VISUALIZATION
67 #include "sfh/ogre/C3DLine.h"
68#endif
69
70
71namespace RbCable
72{
73 class CRBCable : public SimObject
74 {
75 public:
76 CRBCable(const string& simObjectName, ISimObjectCreator* const creator);
77 ~CRBCable();
78 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
79 void InitialConditionSetup(const double T, const double *const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
80
81 const double* const totalLength(const double T, const double* const X);
82 const double* forceB(const double T, const double* const X);
83 void calculations(const double T, const double* const X);
84
85#ifdef FH_VISUALIZATION
86 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
87 void RenderUpdate( const double T, const double* const X);
88#endif
89
90 protected:
91 int m_numElements;
92 int* m_pos;
93 int* m_vel;
94
95 double m_length;
96 double m_alpha;
97 double m_beta;
98 double m_epsilon;
99 double m_bendingStiffness;
100 double m_linearDamping;
101 int counter;
102
103 double m_totalLength;
104 double m_kineticEnergy;
105
106 ISignalPort* m_posA;
107 ISignalPort* m_posB;
108 ISignalPort* m_velA;
109 ISignalPort* m_velB;
110
111 ICommonComputation* m_calcDynamics;
112 double* m_lambda;
113 double* m_accel;
114
115 double m_forceB[3];
116
117#ifdef FH_VISUALIZATION
118 C3DLine* m_line;
119#endif
120 };
121}
Definition: CRBCable.h:74
CRBCable(const string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, output and intput ports.