Marine systems simulation
WinchableCable.h
1#pragma once
2
45#include "LineStructure.h"
46#include "SupergridCable.h"
47#include "SupergridWinchCable.h"
48#include "ConstraintSolver.h"
49#include "SimObject.h"
50
51class WinchableCable : public SimObject{
52public:
53 WinchableCable(const string& simObjectName, ISimObjectCreator* const creator);
55 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
56
57 void setWinchOrientation(const double T);
58
59 void InitialConditionSetup(const double T, const double *const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
60 void FinalSetup(const double T, const double *const X, ISimObjectCreator* const creator);
61
62#ifdef FH_VISUALIZATION
63 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
64 void RenderUpdate( const double T, const double* const X);
65#endif
66
67protected:
68 double m_Beta;
70
71 struct cable_segment {double weight; double length; double diameter; double EA; double EI; double length_position;};
72 std::vector<cable_segment> m_cable_spec;
73
75
76 const double* EndForce(const double T, const double* const X );
77 double m_EndForce[6];
78
79 double m_winch_P[3];
80 double m_winch_Q[4];
81 double m_winch_V[3];
82 double m_winch_W[3];
83
84
86 public:
87 virtual CoRiBoDynamics::vec3 Current(double T, const double* X, const double* Position)
88 {
89 return CoRiBoDynamics::vec3(0,1.5,0);
90 }
91
92 virtual double OceanSurfaceElevation(double T, const double* X, const double* Position)
93 {
94 return 0;
95 }
96
97 virtual double SeaDepth(const double* Position)
98 {
99 return 500;
100 }
101
102 virtual void CurrentQuery(double T, const double* X, const CoRiBoDynamics::vec3& Position, CoRiBoDynamics::vec3& current, double& surface_elevation, double& density){
103 current = CoRiBoDynamics::vec3(0,1.5,0);
104 surface_elevation = 0;
105 density = 1025 * (Position.z()>0);
106 }
107
108 };
109 EnvironmentWrapper m_environment;
110};
Definition: ConstraintSolver.h:31
Definition: SupergridLineStructure.h:15
Definition: SupergridWinchCable.h:27
Definition: WinchableCable.h:85
Definition: WinchableCable.h:51
Definition: WinchableCable.h:71