Marine systems simulation
CLinearMapping.h
1#pragma once
2
72#include "SimObject.h"
73
74#include <Eigen/Eigen>
75
76#include <memory>
77#include <string>
78
79class CLinearMapping : public SimObject
80{
81 public:
82 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
83
85 CLinearMapping(std::string simObjectName, ISimObjectCreator* creator);
86
87 void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep) { }
88
90 const double* Output(const double T, const double* const X);
91 const double* DeMuxedOut(const double T, const double* const X, int i);
92
93#ifdef FH_VISUALIZATION
95 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator) { }
96
98 virtual void RenderUpdate(const double T, const double* const X) { }
99#endif
100 protected:
101 void SetOutputPortValues(const double T, const double* const X);
102 static Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> StringToEigenMatrix(const std::string& str);
103
104 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> Cu;
105 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> Cv;
106 ICommonComputation* m_SetOutputPortValues;
107 ISignalPort *m_InputU, *m_InputV;
108
109 std::unique_ptr<double[]> m_output;
110};
Definition: CLinearMapping.h:80
const double * Output(const double T, const double *const X)
The output of the system equation y=Cu*u+Cv*v.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CLinearMapping(std::string simObjectName, ISimObjectCreator *creator)
Constructor.