Marine systems simulation
AdaptiveDirection.h
1
10
11#ifndef AdaptiveDirection_H
12#define AdaptiveDirection_H
13
20#include "SimObject.h"
21#include "sfh/constants.h"
22#include <memory>
23
24class AdaptiveDirection : public SimObject
25{
26public:
28 AdaptiveDirection(std::string sSimObjectName, ISimObjectCreator* pCreator);
30
32 void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep){}
33
34 const double * Output(const double T, const double * const X);
35
36 const double * OutputMag(const double T, const double * const X);
37
38#ifdef FH_VISUALIZATION
40 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator){}
41
43 virtual void RenderUpdate(const double T, const double* const X){}
44#endif
45protected:
46
47 double m_MaxRelDir;
48 std::unique_ptr<double[]> m_Directions;
49
50 ISignalPort *m_InRef;
51 ISignalPort *m_InDir;
52 ISignalPort *m_InRate;
53 double m_Output;
54
55 bool m_OutMag;
56 double m_OutputMag;
57 double m_MinMag;
58 ISignalPort *m_InRefMag;
59 ISignalPort *m_InAdaMag;
60};
61
62
63#endif
Definition: AdaptiveDirection.h:25
ISignalPort * m_InRef
Input directions.
Definition: AdaptiveDirection.h:50
std::unique_ptr< double[]> m_Directions
Maximum change to the reference direction.
Definition: AdaptiveDirection.h:48
AdaptiveDirection(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.
void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
Definition: AdaptiveDirection.h:32