Marine systems simulation
CLinearSpring Class Reference

A linear spring in 3 degrees of freedom. More...

#include <CLinearSpring.h>

+ Inheritance diagram for CLinearSpring:
+ Collaboration diagram for CLinearSpring:

Public Member Functions

 CLinearSpring (std::string sSimObjectName, ISimObjectCreator *pCreator)
 The constructor sets the pointer to the output object and the parser object.
 
 ~CLinearSpring ()
 The destructor cleans up dynamically allocated memory.
 
void OdeFcn (const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
 Does nothing, as the object contains no states.
 
const double * ForceA (const double dT, const double *const adX)
 Calculates the end force A.
 
const double * ForceB (const double dT, const double *const adX)
 Calculates the end force B.
 
 CLinearSpring (std::string sSimObjectName, ISimObjectCreator *pCreator)
 The constructor sets the pointer to the output object and the parser object.
 
 ~CLinearSpring ()
 The destructor cleans up dynamically allocated memory.
 
void OdeFcn (const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
 Does nothing, as the object contains no states.
 
const double * ForceA (const double dT, const double *const adX)
 Calculates the end force A.
 
const double * ForceB (const double dT, const double *const adX)
 Calculates the end force A.
 

Protected Member Functions

void CalcOutput (const double dT, const double *const adX)
 < Sets the parameters of the spring.
 
void CalcOutput (const double dT, const double *const adX)
 < Sets the parameters of the spring.
 

Protected Attributes

double m_dStiffness
 The linear stiffness of the spring.
 
double m_dRelaxedLength
 the relaxed length of the spring.
 
ISignalPort * m_pInPosA
 Input for position A.
 
ISignalPort * m_pInPosB
 Input for position B.
 
double m_adOutForceA [3]
 Force vector on point A.
 
double m_adOutForceB [3]
 Force vector on point B.
 
sfh::timers::Timer m_OutputTimer
 Output timer.
 
ICommonComputation * m_CalcOutputs
 Common computation for outputs.
 

Detailed Description

Author
Karl-Johan Reite
Examples
CLinearSpring.h.

The documentation for this class was generated from the following files: