Class SubhingeSpringDamper#
Defined in File SubhingeSpringDamper.h
Inheritance Relationships#
Base Type#
public Karana::Models::KModel< SubhingeSpringDamper, SubhingeSpringDamperParams >(Template Class KModel)
Class Documentation#
-
class SubhingeSpringDamper : public Karana::Models::KModel<SubhingeSpringDamper, SubhingeSpringDamperParams>#
Adds a spring damper to the provided subhinge.
Public Functions
-
SubhingeSpringDamper(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PhysicalSubhinge> &sh)#
SubhingeSpringDamper constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance. The SubhingeSpringDamper model a spring damper force to a subhinge based on a given setpoint.
- Parameters:
name – The name of the model.
sp – The StatePropagator to register this model with.
sh – The subhinge to add the spring damper to.
-
~SubhingeSpringDamper()#
Destructor for SubhingeSpringDamper.
-
void preDeriv(const km::Ktime &t, const km::Vec &x)#
Calculate and apply the spring/damper force.
- Parameters:
t – Current time. Not used.
x – Current state. Not used.
-
virtual bool isFinalized() const final#
Ensure the model is finalized.
- Returns:
trueif the model is finalized, `false otherwise.
Public Static Functions
-
static kc::ks_ptr<SubhingeSpringDamper> create(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PhysicalSubhinge> &sh)#
Constructor. The SubhingeSpringDamper model a spring damper force to a subhinge based on a given setpoint.
- Parameters:
name – The name of the model.
sp – The StatePropagator to register this model with.
sh – The subhinge to add the spring damper to.
- Returns:
A ks_ptr to the newly created instance of the SubhingeSpringDamper model.
-
SubhingeSpringDamper(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PhysicalSubhinge> &sh)#