Marine systems simulation
WpHeadingController.h
1#pragma once
2
10#include <Eigen/Eigen>
11using namespace Eigen;
12
13#include "ControlAlgorithm.h"
14
15
16namespace Ship{
18 {
19 public:
20 WpHeadingController(const string& simObjectName, ISimObjectCreator* const creator);
21 const double* TorqueBODY(const double T, const double* const X);
22 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
23 const double* RudderAngle(const double T,const double* const X);
24 const double* HeadingError(const double T,const double* const X);
25
26
27 #ifdef FH_VISUALIZATION
29 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator){}
30
32 virtual void RenderUpdate(const double T, const double* const X){}
33 #endif
34
35 private:
36 double Kp_yaw;
37 double Ki_yaw;
38 double Kd_yaw;
39 double Kdelta;
40 double m_dM;
41 double m_dD;
42 double m_dOmega_b;
43 double m_dRelative_damping;
44 double zeta;
45
46 double m_adTorqueBODY[3];
47 double heading_error;
48 double m_dRudderangle;
49 double directionparameter;
50
51 int m_headingErrorIntegralIndex;
52
53 ISignalPort* adStateRotation;
54 ISignalPort* adStateOmega;
55 ISignalPort* crossTrackErrorPort;
56 ISignalPort* desiredHeadingPort;
57
58
59 #ifdef FH_VISUALIZATION
60 Ogre::SceneNode* m_RenderNode;
61 double m_Radius;
62 string m_Material;
63 double m_Color[3];
64 #endif
65
66 };
67}
Definition: ControlAlgorithm.h:22
Definition: WpHeadingController.h:18
void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
returns object derivatives as a function of time, states and input ports
WpHeadingController(const string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, input/output ports and shared resources
Simple waypoint object.
Definition: CableAttach.h:16