Class UniformGravity#

Inheritance Relationships#

Base Type#

Class Documentation#

class UniformGravity : public Karana::Models::KModel<UniformGravity, UniformGravityParams>#

Apply uniform gravitational acceleration to each body in the provided multibody.

Public Functions

UniformGravity(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::SubTree> &st)#

UniformGravity constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • st – The SubTree to apply uniform gravity to.

~UniformGravity()#

Destructor for UniformGravity.

void preDeriv(const km::Ktime &t, const km::Vec &x)#

Calculate and apply the aerodynamic force.

Parameters:
  • t – Current time. Not used.

  • x – Current state. Not used.

Public Static Functions

static kc::ks_ptr<UniformGravity> create(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::SubTree> &st)#

Constructor.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • st – The SubTree to apply uniform gravity to.

Returns:

A ks_ptr to the newly created instance of the UniformGravity model.