Marine systems simulation
Foil.h
1#ifndef _CFOIL_H_
2#define _CFOIL_H_
3
41#include <Eigen/Eigen>
42
43#include <ISimObjectCreator.h>
44#include <string>
45#include <CEnvironment.h>
46
47#ifdef FH_VISUALIZATION
48#pragma warning(push)
49#pragma warning( disable : 4251 )
50 #include <Ogre.h>
51#pragma warning(pop)
52 #include "sfh/ogre/C3DArrow.h"
53#endif
54
55namespace Ship{
56 class Foil:public SimObject
57 {
58 public:
59
60 Foil( const string simObjectName, ISimObjectCreator* const creator);
61 ~Foil();
62
63 void FinalSetup( const double T, const double *const X, ISimObjectCreator* const creator );
64 virtual void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
65
66 #ifdef FH_VISUALIZATION
67 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
68 virtual void RenderUpdate( const double T, const double* const X );
69 #endif
70
71 public:
72
74 const double* ForceNED(const double T, const double* const X);
76 const double* ForceBody(const double T, const double* const X);
78 const double* TorqueBody(const double T, const double* const X);
80 const double* AlfaBody(const double T, const double* const X);
82 const double* ClBody(const double T, const double* const X);
84 const double* CdBody(const double T, const double* const X);
86 const double* CpBody(const double T, const double* const X);
88 const double* InWater(const double T, const double* const X);
90 const double* FluidVelocity(const double T, const double* const X);
91
92 void Compute(const double T, const double* const X);
93
94 private:
95
97 double m_Chord;
99 double m_Bredth;
101 double* m_Alfa;
103 double* m_Cd;
105 double* m_Cl;
107 double* m_Cp;
108
109 double m_AccelerateFlow;
110
112 ISignalPort* m_IPositionNED;
114 ISignalPort* m_IVelocityNED;
116 ISignalPort* m_IQuaternionNED;
117
118 double m_FluidVelcoity[3];
119 double m_ForceNED[3];
120 double m_ForceBody[3];
121 double m_ToruqeBody[3];
122 double m_CurrentAlfa;
123 double m_CurrentCl;
124 double m_CurrentCd;
125 double m_CurrentCp;
126 double m_InWater;
127
128 ICommonComputation *m_Compute;
129
130 unsigned int m_DatasetSize;
131 CEnvironment* m_environment;
132
133
134 Eigen::Vector3d dir_drag_ned;
135 Eigen::Vector3d dir_lift_ned;
136 Eigen::Vector3d dir_force_ned;
137
138 #ifdef FH_VISUALIZATION
139 Ogre::SceneNode* m_RenderNode;
140 C3DArrow *Arrow_inc;
141 C3DArrow *Arrow_norm;
142 C3DArrow *Arrow_force;
143 #endif
144
145 };
146}
147
148#endif
Definition: CEnvironment.h:10
Definition: Foil.h:57
const double * ClBody(const double T, const double *const X)
const double * CpBody(const double T, const double *const X)
const double * CdBody(const double T, const double *const X)
const double * InWater(const double T, const double *const X)
const double * AlfaBody(const double T, const double *const X)
const double * ForceBody(const double T, const double *const X)
const double * FluidVelocity(const double T, const double *const X)
const double * TorqueBody(const double T, const double *const X)
const double * ForceNED(const double T, const double *const X)
Simple waypoint object.
Definition: CableAttach.h:16