Class PointMassGravity#
Defined in File PointMassGravity.h
Inheritance Relationships#
Base Type#
public Karana::Models::KModel< PointMassGravity, PointMassGravityParams >(Template Class KModel)
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> ¢ral_body)#
Constructor.
- Parameters:
name – The name of the model.
sp – The StatePropagator to register this model with.
st – The SubTree to apply gravity to.
mb – The multibody 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> ¢ral_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.
-
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> ¢ral_body)#