Marine systems simulation
ZeroDynamics.h
1#ifndef ZERO_DYNAMICS_H
2#define ZERO_DYNAMICS_H
3
4#include "KalmanObject.h"
5#include "SimObject.h"
6
7#include "sfh/constants.h"
8#include "sfh/math.h"
9#include "sfh/text.h"
10#include "sfh/util.h"
11
12#include <Eigen/Dense>
13
14#include <memory>
15
69class ZeroDynamics : public SimObject, public KalmanObject
70{
71 public:
72 ZeroDynamics(const std::string& simObjectName, ISimObjectCreator* const creator);
73
74 // SimObject functions
75 void OdeFcn(const double T, const double* const X, double* const XDot, const bool IsMajorTimeStep);
76 void InitialConditionSetup(const double T, const double* const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
77
78#ifdef FH_VISUALIZATION
79 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator){};
80 void RenderUpdate(const double T, const double* const X){};
81#endif
82
83 // KalmanObject functions
84 estimator::Matrix GetCovarianceP0();
85 estimator::Matrix GetProcessNoiseQ();
86 estimator::Matrix GetMeasurementNoiseR() { return estimator::Matrix(); }
87 estimator::Vector ExpectedMeasurementOutput(const double T, const double* const X) { return estimator::Vector(); }
88 estimator::Vector ActualMeasurementOutput(const double T, const double* const X) { return estimator::Vector(); }
89 unsigned int GetNumMeasurements() { return 0; }
90
91 protected:
92 void SetOutputPortValues(const double T, const double* const X);
93 const double* Output(const double T, const double* const X);
94
95 ICommonComputation* m_SetOutputPortValues;
96 int m_StateIndex, m_NoStates;
97 std::unique_ptr<double[]> m_State;
98 std::unique_ptr<double[]> m_P0, m_Q;
99};
100
101#endif
Definition: ZeroDynamics.h:70