82#include <fhsim/simobject/SimObject.h>
83#include <fhsim_environment/EnvironmentProvider.h>
84#include "PropulsorWakeField.h"
87#include "Ship/AzimuthCurve.h"
89#ifdef FH_VISUALIZATION
90 #include "sfh/ogre/CDynamicLines.h"
97 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
98 Eigen::Quaterniond orientationNED = Eigen::Quaterniond::Identity();
99 Eigen::Vector3d positionNED = Eigen::Vector3d::Zero();
100 Eigen::Vector3d velocityNED = Eigen::Vector3d::Zero();
101 double flowStateHigh = 0;
112 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
126 std::unique_ptr<AzimuthCurve<double> > Ct;
127 std::unique_ptr<AzimuthCurve<double> > Cq;
130 Propeller4Q(
const std::string simObjectName, ISimObjectCreator*
const creator);
133 void FinalSetup(
const double T,
const double *
const X, ISimObjectCreator*
const creator );
134 void OdeFcn(
const double T,
const double*
const X,
double*
const XDot)
const;
139#ifdef FH_VISUALIZATION
140 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
141 void RenderUpdate(
const double T,
const double*
const X);
145 const double*
Us(
const double T,
const double*
const X);
147 const double*
Rs(
const double T,
const double*
const X);
149 const double*
BetaT(
const double T,
const double*
const X);
152 const double*
BetaQ(
const double T,
const double*
const X);
155 const double*
Ct(
const double T,
const double*
const X);
158 const double*
Cq(
const double T,
const double*
const X);
161 const double*
ForceNED(
const double T,
const double*
const X);
164 const double*
TorqueNED(
const double T,
const double*
const X);
167 const double*
ForceBody(
const double T,
const double*
const X);
170 const double*
TorqueBody(
const double T,
const double*
const X);
173 const double*
BetaH(
const double T,
const double*
const X);
176 const double*
PDCurrent(
const double T,
const double*
const X);
199 const double*
ShaftPower(
const double T,
const double*
const X);
202 void Compute(
const double T,
const double*
const X)
const;
205 ICommonComputation *m_compute;
306 int m_IndexRotationalFlowState1;
309 int m_IndexRotationalFlowState2;
344 bool m_azimuthinMainLoss;
346#ifdef FH_VISUALIZATION
348 int m_IndexPropellerRotationSatet;
351 bool m_reverseRotationDirection;
354 CDynamicLines * m_lines;
357 Ogre::SceneNode* m_RenderNode;
360 Ogre::SceneNode* m_RenderNodePropeller;
Definition Propeller4Q.h:110
ISignalPort * m_InPositionNED
Definition Propeller4Q.h:279
Eigen::Vector3d m_ForceCorrectedNED
Definition Propeller4Q.h:218
const double * ForceBody(const double T, const double *const X)
double m_shaftPowerScaling
Definition Propeller4Q.h:241
double m_shaftPower
Definition Propeller4Q.h:235
Eigen::Vector3d m_TorqueCorrectedBody
Definition Propeller4Q.h:225
PropellerType m_PropellerType
Definition Propeller4Q.h:288
const double * TorqueCorrectedBody(const double T, const double *const X)
const double * TorqueNED(const double T, const double *const X)
const double * Cq(const double T, const double *const X)
VentilationTheory m_VentilationTheory
Definition Propeller4Q.h:291
double m_shaftPowerCorrected
Definition Propeller4Q.h:238
ISignalPort * m_InOrientationNED
Definition Propeller4Q.h:267
double m_shaftTorqueCorrected
Definition Propeller4Q.h:232
ISignalPort * m_InMyPD
Definition Propeller4Q.h:273
double m_betaT
Definition Propeller4Q.h:255
Eigen::Vector3d m_ForceBody
Definition Propeller4Q.h:210
int m_IndexVentialtionStateT
Definition Propeller4Q.h:297
const double * Rs(const double T, const double *const X)
double m_U
Definition Propeller4Q.h:336
double m_beta_h
Definition Propeller4Q.h:261
std::shared_ptr< Propeller4QCurrentField > m_currentField
Definition Propeller4Q.h:285
int m_numPD
Definition Propeller4Q.h:315
int m_IndexVentialtionStateQ
Definition Propeller4Q.h:294
const double * PDCurrent(const double T, const double *const X)
Eigen::Vector3d m_TorqueBody
Definition Propeller4Q.h:215
const double * ForceNED(const double T, const double *const X)
const double * Ct(const double T, const double *const X)
Eigen::Vector3d m_TorqueNED
Definition Propeller4Q.h:213
double m_deltaBetaPlus
Definition Propeller4Q.h:330
int m_IndexAxialFlowStateLow
Definition Propeller4Q.h:300
double m_ThrustDeduction
Definition Propeller4Q.h:342
environment::EnvironmentProvider * m_environment
Definition Propeller4Q.h:282
double m_Ct
Definition Propeller4Q.h:327
std::vector< Curve4Q > m_curve
Definition Propeller4Q.h:321
double m_WakeFraction
Definition Propeller4Q.h:339
void AcceptedStep(double T, const double *X) override
Copies the wake state of the accepted state into the jet field (G4).
double m_D
Definition Propeller4Q.h:312
const double * BetaH(const double T, const double *const X)
ISignalPort * m_InVelocityNED
Definition Propeller4Q.h:276
const double * ShaftPowerCorrected(const double T, const double *const X)
double m_Rs
Definition Propeller4Q.h:252
Eigen::Vector3d m_TorqueCorrectedNED
Definition Propeller4Q.h:223
const double * BetaQ(const double T, const double *const X)
const double * ShaftPower(const double T, const double *const X)
const double * ForceCorrectedNED(const double T, const double *const X)
const double * ForceCorrectedBody(const double T, const double *const X)
double m_PDcur
Definition Propeller4Q.h:264
double m_shaftTorque
Definition Propeller4Q.h:229
const double * ShaftTorqueCorrectedBody(const double T, const double *const X)
const double * ShaftTorqueBody(const double T, const double *const X)
Eigen::Vector3d m_ForceNED
Definition Propeller4Q.h:208
double m_deltaBetaMinus
Definition Propeller4Q.h:333
double m_Cq
Definition Propeller4Q.h:324
std::vector< double > m_PD
Definition Propeller4Q.h:318
VentilationTheory
Definition Propeller4Q.h:115
Eigen::Vector3d m_ForceCorrectedBody
Definition Propeller4Q.h:220
const double * TorqueBody(const double T, const double *const X)
ISignalPort * m_InMyRPM
Definition Propeller4Q.h:270
double m_propellerThrustScaling
Definition Propeller4Q.h:244
int m_IndexAxialFlowStateHigh
Definition Propeller4Q.h:303
const double * Us(const double T, const double *const X)
const double * BetaT(const double T, const double *const X)
const double * TorqueCorrectedNED(const double T, const double *const X)
PropellerType
Definition Propeller4Q.h:120
double m_Us
Definition Propeller4Q.h:249
double m_betaQ
Definition Propeller4Q.h:258
Definition PropulsorWakeField.h:25
Status
Definition marenv.h:44
Simple waypoint object.
Definition CableAttach.h:58
marenv::Status Propeller4QJet(const Propeller4QWakeState &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 four-quadrant propeller jet needs, copied after each accepted step (zero jet by default...
Definition Propeller4Q.h:96
Definition Propeller4Q.h:125