Marine systems simulation
PropulsorActuator.h
1#ifndef PropulsorActuator_h__
2#define PropulsorActuator_h__
3
8#include "LocalConnection.h"
9namespace Ship
10{
12 public:
13 enum FailureModes{
14 failureModeRPMError = 0,
15 failureModeRPMLock,
16 failureModePitchLock,
17 failureModePitchMalfunction,
18 failureModeAzimuthLock,
19 failureModeAzimuthMalfunction,
20 failureModeFeedbackPitchFreeze,
21 failureModeFeedbackRPMFreeze,
22 failureModeFeedbackAzimuthFreeze,
23 failureModeFeedbackThrustFreeze,
24 failureModes
25 };
26
27 PropulsorActuator(const std::string& simObjectName,ISimObjectCreator* const creator);
28
29 virtual void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
30 //void InitialConditionSetup( const double T, const double *const X, ISimObjectCreator* const creator );
31 void InitialConditionSetup(const double T, const double *const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
32 const double * RPM(const double T, const double * const X);
33 const double * RPMMotor(const double T, const double * const X);
34 const double * Pitch(const double T, const double * const X);
35 const double * PD(const double T, const double * const X);
36 const double * ConsumedPower(const double T, const double * const X);
37
38 const double * RPM_FB(const double T, const double * const X);
39 const double * Thrust_FB(const double T, const double * const X);
40 const double * Pitch_FB(const double T, const double * const X);
41
42 const double * ForceBody2(const double T, const double * const X);
43 const double * TorqueBody2(const double T, const double * const X);
44
45 // over ridable for cycloidal actuator
46 virtual const double * Angle_FB(const double T, const double * const X);
47 virtual const double * Angle(const double T, const double * const X);
48
49 protected:
50 double m_torqueLimit;
51
52 bool m_oscMode;
53 ISignalPort *m_inRPMLimits;
54 ISignalPort *m_inPitchLimits;
55 ISignalPort *m_inAngleLimits;
56 ISignalPort *m_inShaftTorque;
57 ISignalPort *m_inAvailablePower;
58
59 double m_pitchMaxChangeRate;
60 double m_RPMMaxChangeRate;
61 double m_aziMaxChangeRate;
62
63 int m_indexMotorPitch;
64 int m_indexPropulsorRPM;
65
66 ISignalPort *m_inFailureMode;
67 ISignalPort *m_inCommendedRPM;
68 ISignalPort *m_inCommandedPitch;
69
70 bool m_isAzimuth;
71 double m_azimuthLoss[2];
72
73 bool m_failureModeRPMError;
74 bool m_failureModeRPMLock;
75 bool m_failureModePitchLock;
76 bool m_failureModePitchMalfunction;
77 bool m_failureModeAzimuthLock;
78 bool m_failureModeAzimuthMalfunction;
79 bool m_failureModeFeedbackPitchFreeze;
80 bool m_failureModeFeedbackRPMFreeze;
81 bool m_failureModeFeedbackAzimuthFreeze;
82 bool m_failureModeFeedbackThrustFreeze;
83
84 double m_maxAngle;
85 double m_minAngle;
86 double m_maxRPM;
87 double m_minRPM;
88 double m_maxPitch;
89 double m_minPitch;
90
91 double m_gearRatio;
92
93 double m_angularMotorMalfunctionRate;
94
95 double m_actualRPM;
96 double m_actualMotorRPM;
97 double m_actualPitch;
98 double m_actualPD;
99 double m_actualAngle;
100 double m_consumedPower;
101 double m_timeConstantPitch;
102 double m_timeConstantRPM;
103
104 double m_actualRPMFeedback;
105 double m_actualThrustFeedback;
106 double m_actualPitchFeedback;
107 double m_actualAngleFeedback;
108
109 double m_forceParentBody[3];
110 double m_torqueParentBody[3];
111 };
112}
113
114#endif // PropulsorActuator_h__
Definition: LocalConnection.h:66
Definition: PropulsorActuator.h:11
Simple waypoint object.
Definition: CableAttach.h:16