Marine systems simulation
WindForce.h
1#ifndef CWindForce_h__
2#define CWindForce_h__
3
8#include <Eigen/Eigen>
9#include <SimObject.h>
10#include <CEnvironment.h>
11
12#include "./Ship/Forces/Wind/WindCurve.h"
13
14namespace Ship{
15 class WindForce: public SimObject
16 {
17 public:
18 EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
19 WindForce(const string simObjectName, ISimObjectCreator* const creator);
20
21 void FinalSetup( const double T, const double *const X, ISimObjectCreator* const creator );
22
24 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
25
26 #ifdef FH_VISUALIZATION
27
29 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
30
32 void RenderUpdate( const double T, const double* const X);
33 #endif
34
35 const double* Force (const double T, const double* const X);
36
37 void Compute( const double T, const double* const _X );
38
39 const double* Torque (const double T, const double* const X);
40
41 const double* Angle(const double T, const double* const X);
42 const double* Coefficient(const double T, const double* const X);
43
44 private:
45 Eigen::Vector3d f,m;
46 double m_apparentAngle;
47
48 double m_AreaFront;
49 double m_Length;
50 double m_xA0;
51 double *m_xB;
52 double * m_xA;
53 int m_xDataLength;
54 int m_yDataLength;
55 double *m_yA;
56 double *m_yB;
57 double m_yA0;
58 int m_nDataLength;
59 double* m_nA;
60 double* m_nB;
61 double m_nA0;
62
63 double X;
64 double Y;
65 double N;
66
67 bool m_360degData;
68 double m_dragCoefficient[3];
69 double m_Force[3];
70 double m_Torque[3];
71 double m_AreaLateral;
72 double m_Cp;
73 double m_Rho;
74
75 ISignalPort *m_InDirection;
76 ISignalPort *m_InVesselSpeed;
77 ISignalPort *m_InWindSpeed;
78 ICommonComputation *m_Compute;
79 WindCurve *MyWindCurve;
80 CEnvironment *Environment;
81
82 #ifdef FH_VISUALIZATION
83 Ogre::SceneNode* m_RenderNode;
84 #endif
85
86 };
87}
88#endif // CWindForce_h__
Definition: CEnvironment.h:10
Definition: WindCurve.h:8
Definition: WindForce.h:16
void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Method for calculating the derivative of the object states, which must be implemented in the individu...
Simple waypoint object.
Definition: CableAttach.h:16