Class PointMassGravity#

Inheritance Relationships#

Base Type#

Class Documentation#

class PointMassGravity : public Karana::Models::KModel<PointMassGravity, PointMassGravityParams>#

Model to compute and apply uniform gravity accelearation from a point mass central body to all the bodies in the multibody system.

Public Functions

PointMassGravity(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::SubTree> &st, const kc::ks_ptr<kf::Frame> &central_body)#

PointMassGravity 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 gravity to.

  • central_body – The point mass central body applying the gravitational force

~PointMassGravity()#

Destructor for PointMassGravity.

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.

std::vector<kc::id_t> getObjIds()#

Get node IDs for DataStruct.

This method retrieves the IDs of the multibody and central body. This is designed primarily for use with the PointMassGravityDS DataStruct.

Returns:

mbody and central body IDs.

Public Static Functions

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

Constructor.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • st – The SubTree to apply gravity to.

  • central_body – The point mass central body applying the gravitational force

Returns:

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