97#include <fhsim/simobject/ISimObjectCreator.h>
98#include <fhsim_environment/EnvironmentProvider.h>
100#ifdef FH_VISUALIZATION
101#include "sfh/ogre/CDynamicLines.h"
103#include "./Ship/Actuators/IPropellerCalculator.h"
104#include "./Ship/Actuators/OpenWaterPropeller.h"
105#include "./Ship/Actuators/TableLookup.h"
106#include "PropulsorWakeField.h"
114 double position[3] = {0,0,0};
115 double axis[3] = {1,0,0};
128 Propeller(
const std::string simObjectName, ISimObjectCreator*
const creator);
129 void FinalSetup(
const double T,
const double *
const X, ISimObjectCreator*
const creator );
130 void OdeFcn(
const double T,
const double*
const X,
double*
const XDot)
const;
134 #ifdef FH_VISUALIZATION
135 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
136 void RenderUpdate(
const double T,
const double*
const X);
142 const double*
ForceNED(
const double T,
const double*
const X);
144 const double*
TorqueNED(
const double T,
const double*
const X);
146 const double*
Us(
const double T,
const double*
const X);
148 const double*
Rs(
const double T,
const double*
const X);
153 void ComputeThrust(
const double T,
const double*
const X)
const;
155 double Ct(
double U,
double F);
159 double Coefficient(
double pitchRatio,
double J,
bool torque)
const;
165 bool m_DummyPropeller;
168 ISignalPort *m_InForceDirectionNED =
nullptr;
170 ISignalPort *m_InMyRPS =
nullptr;
172 ISignalPort *m_InMyPD =
nullptr;
174 ISignalPort *m_InVelocityNED =
nullptr;
176 ISignalPort *m_InPositionNED =
nullptr;
178 ISignalPort *m_InMyPropellerForce =
nullptr;
180 ISignalPort *m_InMyPropellerTorque =
nullptr;
182 std::vector<double> PDlist;
183 double m_BladeTop[3] = {0,0,0};
184 double m_Force[3] = {0,0,0};
185 mutable double m_MyThrust[3] = {0,0,0};
186 ICommonComputation *m_computeThrust =
nullptr;
187 double m_MyTorque[3] = {0,0,0};
194 std::vector<std::unique_ptr<OpenWaterPropeller> > m_PropellerCalculator;
196 mutable WarnOnce m_tableWarning;
197 environment::EnvironmentProvider *m_Environment =
nullptr;
198 std::shared_ptr<PropellerCurrentField> m_currentField = std::make_shared<PropellerCurrentField>(
PropellerJet);
200 int m_RotateAngle = -1;
202 #ifdef FH_VISUALIZATION
203 std::string m_Material;
204 Ogre::SceneNode* m_RenderNode;
205 CDynamicLines* m_lines;
Definition Propeller.h:126
const double * ForceNED(const double T, const double *const X)
void AcceptedStep(double T, const double *X) override
Copies the wake state of the accepted state into the jet field (G4).
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)
Definition PropulsorWakeField.h:25
Status
Definition marenv.h:44
Superclass of control algorithms for the control system.
Definition CableAttach.h:58
marenv::Status PropellerJet(const PropellerWakeState &state, double T, const double position[3], double currentVelocity[3])
The jet behind the propeller (G4: reads only the copy of the state).
The state the propeller jet needs, copied after each accepted step (zero jet by default: Us = Rs = 0)...
Definition Propeller.h:113