Marine systems simulation
CPidController.h
1#pragma once
2
69#include <stdio.h>
70#include <string>
71
72#include "SimObject.h"
73#include "sfh/filters/FIR.h"
74#include "sfh/timers/StopWatch.h"
75#include "sfh/filters/PID.h"
76class CPidController : public SimObject
77{
78public:
79 CPidController(std::string sSimObjectName, ISimObjectCreator* pCreator);
80
82
83 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
84
85#ifdef FH_VISUALIZATION
86 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator){};
87 virtual void RenderUpdate(const double dT, const double* const adX){};
88#endif
89protected:
90 const double* Out(const double dT, const double* const adX);
91
92 ISignalPort* m_pInMeasurement;
93 ISignalPort* m_pInReference;
94 //double m_outMax;
95 //double m_outMin;
96
97 //double m_ProportionalGain;
98 //double m_IntegratorTime;
99 //double m_DerivativeTime;
100
101 //double m_IntegratorEffectMax;
102 //double m_DerivativeEffectMax;
103
104 //sfh::filters::FIR m_derivativeFilter;
105 //sfh::timers::StopWatch m_stopWatch_timestep;
106 //sfh::timers::StopWatch m_stopWatch_errorDiff;
107 sfh::filters::PID m_PID;
108 double m_output;
109};
Definition: CPidController.h:77
ISignalPort * m_pInReference
The desired value.
Definition: CPidController.h:93
ISignalPort * m_pInMeasurement
The measured value.
Definition: CPidController.h:92