Marine systems simulation
CClock.h
1#ifndef CClock_H
2#define CClock_H
3
49#include "SimObject.h"
50
51#include <cmath>
52#include <string>
53#include <time.h>
54
55class CClock : public SimObject
56{
57 public:
59 CClock(std::string sSimObjectName, ISimObjectCreator* pCreator);
60
62 void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep){};
63
64 void FinalSetup(const double T, const double* const X, ISimObjectCreator* const creator);
65
66 const double* SimTime(const double T, const double* const X);
67 const double* ElapsedSimTime(const double T, const double* const X);
68
69 const double* WallTime(const double T, const double* const X);
70 const double* ElapsedWallTime(const double T, const double* const X);
71
72#ifdef FH_VISUALIZATION
74 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator) { }
75
77 virtual void RenderUpdate(const double T, const double* const X) { }
78#endif
79
80 protected:
82 double m_SimTime;
86 double m_WallTime[3];
89
90 double m_InitSimTime;
91 struct tm m_InitWallTime;
92};
93
94
95#endif
Definition: CClock.h:56
void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
Definition: CClock.h:62
double m_WallTime[3]
Definition: CClock.h:86
CClock(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.
double m_ElapsedSimTime
Definition: CClock.h:84
double m_SimTime
Definition: CClock.h:82
double m_ElapsedWallTime[3]
Definition: CClock.h:88