Marine systems simulation
Propeller.h
1#ifndef CPropeller_h__
2#define CPropeller_h__
3
92#include <ISimObjectCreator.h>
93#include <CEnvironment.h>
94
95#ifdef FH_VISUALIZATION
96#include "sfh/ogre/CDynamicLines.h"
97#endif
98#include "./Ship/Actuators/IPropellerCalculator.h"
99
100namespace Ship{
101 class Propeller: public SimObject,ICurrentField
102 {
103 public:
104 Propeller(const string simObjectName, ISimObjectCreator* const creator);
105
106 void FinalSetup( const double T, const double *const X, ISimObjectCreator* const creator );
107 void GetCurrent(const double T, const double* const X, const double position[3], double* currentVelocity);
108 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
109
110 #ifdef FH_VISUALIZATION
111 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
112 void RenderUpdate( const double T, const double* const X);
113 #endif
114
116 const double* BladeTopNED(const double T, const double* const X);
118 const double* ForceNED(const double T, const double* const X);
120 const double* TorqueNED(const double T, const double* const X);
122 const double* Us(const double T, const double* const X);
124 const double* Rs(const double T, const double* const X);
125
126 private:
127
128 double Ct( double U, double F);
129
131 double m_Diameter;
134 bool m_DummyPropeller;
135
137 ISignalPort *m_InForceDirectionNED;
139 ISignalPort *m_InMyRPS;
141 ISignalPort *m_InMyPD;
143 ISignalPort *m_InVelocityNED;
145 ISignalPort *m_InPositionNED;
147 ISignalPort *m_InMyPropellerForce;
149 ISignalPort *m_InMyPropellerTorque;
150
151 std::vector<double> PDlist;
152 double m_BladeTop[3];
153 double m_Force[3];
154 double m_MyThrust[3];
155 double m_MyTorque[3];
156
157 double m_MyUs;
158 double m_MyRs;
159
160 double m_MyDiam;
161 double m_MyDiam4;
162 double m_MyDiam5;
163 IPropellerCalculator **m_PropellerCalculator;
164 CEnvironment *m_Environment;
165 int m_RotateAngle;
166
167 #ifdef FH_VISUALIZATION
168 std::string m_Material;
169 Ogre::SceneNode* m_RenderNode;
170 CDynamicLines* m_lines;
171 #endif
172 };
173}
174
175#endif // CRudder_h__
Definition: CEnvironment.h:10
Definition: ICurrentField.h:4
Definition: IPropellerCalculator.h:8
Definition: Propeller.h:102
const double * ForceNED(const double T, const double *const X)
const double * Us(const double T, const double *const X)
const double * BladeTopNED(const double T, const double *const X)
const double * Rs(const double T, const double *const X)
const double * TorqueNED(const double T, const double *const X)
Simple waypoint object.
Definition: CableAttach.h:16