Marine systems simulation
VirtualWave.h
1
10
11#ifndef VirtualWave_H
12#define VirtualWave_H
13
14#include "SimObject.h"
15#include <Eigen/Eigen>
16
17class VirtualWave : public SimObject
18{
19public:
21 VirtualWave(std::string sSimObjectName, ISimObjectCreator* pCreator);
23
25 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
26 void PreOdeFcn(const double T, const double *const X, IStateUpdater* updater);
27
28 void InitialConditionSetup(const double T, const double* const X, double* const XDot, ISimObjectCreator* pCreator);
29
30 const double* OutHs(const double T, const double * const X);
31 const double* OutTm(const double T, const double * const X);
32 const double* OutDir(const double T, const double * const X);
33 const double* OutDelta(const double T, const double * const X);
34
35#ifdef FH_VISUALIZATION
37 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator){}
38
40 virtual void RenderUpdate(const double T, const double* const X){}
41#endif
42protected:
43 int m_InNum;
44 ISignalPort** m_InSim;
45 ISignalPort** m_InMea;
46
47 ISignalPort* m_InHs;
48 ISignalPort* m_InTm;
49 ISignalPort* m_InDir;
50
51 double m_OutDt;
52 double m_OutTol;
53 bool m_RelTol;
54
55 double m_OutHs;
56 double m_OutTm;
57 double m_OutDir;
58
59 int m_OutCount;
60 double m_OutTime;
61 bool m_InTimeBool;
62 ISignalPort* m_InTime;
63
64 std::vector<double>* m_DispSim;
65
66 double m_Delta;
67
68 double m_InDt;
69 int m_InCount;
70
71 // PID ========================
72 /*int m_adPIDOut, m_adIntegral, m_adDerivate;
73 double m_Pp, m_Pd, m_Pi, m_IntegralSaturation, m_DerivativeTInv;
74 double m_HsMea;
75 double m_HsTol;*/
76 // PID ========================
77};
78#endif
Definition: VirtualWave.h:18
VirtualWave(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.
void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.