QtRocket
 
Loading...
Searching...
No Matches
ForcesModel Class Reference

Computes aerodynamic, thrust, and gravitational forces acting on the rocket. More...

#include <ForcesModel.h>

Public Member Functions

 ForcesModel (std::shared_ptr< Rocket > rocket, std::shared_ptr< Environment > environment)
 Constructs a new ForcesModel.
 
 ~ForcesModel ()=default
 Default destructor.
 
std::array< double, 3 > computeNetForce (const FlightState &state) const
 Computes the net external force vector acting on the rocket.
 
std::array< double, 3 > computeNetMoment (const FlightState &state) const
 Computes the net external moment vector acting on the rocket.
 

Private Member Functions

std::array< double, 3 > computeAerodynamicDrag (const FlightState &state) const
 Computes aerodynamic drag force based on velocity and rocket configuration.
 
std::array< double, 3 > computeThrust (const FlightState &state) const
 Computes thrust force based on motor outputs.
 
std::array< double, 3 > computeGravity (const FlightState &state) const
 Computes gravitational force based on altitude and mass.
 

Private Attributes

std::shared_ptr< Rocketrocket_
 Rocket model reference.
 
std::shared_ptr< Environmentenvironment_
 Atmospheric and gravity conditions.
 

Detailed Description

Computes aerodynamic, thrust, and gravitational forces acting on the rocket.

The ForcesModel provides force and moment outputs based on the current rocket state, environmental conditions, and rocket configuration.

Constructor & Destructor Documentation

◆ ForcesModel()

ForcesModel::ForcesModel ( std::shared_ptr< Rocket > rocket,
std::shared_ptr< Environment > environment )

Constructs a new ForcesModel.

Parameters
rocketPointer to the rocket configuration.
environmentPointer to the simulation environment.

◆ ~ForcesModel()

ForcesModel::~ForcesModel ( )
default

Default destructor.

Member Function Documentation

◆ computeAerodynamicDrag()

std::array< double, 3 > ForcesModel::computeAerodynamicDrag ( const FlightState & state) const
private

Computes aerodynamic drag force based on velocity and rocket configuration.

Parameters
stateCurrent flight state.
Returns
Drag force vector (Newton).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeGravity()

std::array< double, 3 > ForcesModel::computeGravity ( const FlightState & state) const
private

Computes gravitational force based on altitude and mass.

Parameters
stateCurrent flight state.
Returns
Gravity force vector (Newton).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeNetForce()

std::array< double, 3 > ForcesModel::computeNetForce ( const FlightState & state) const

Computes the net external force vector acting on the rocket.

Parameters
stateCurrent flight state.
Returns
Force vector (Fx, Fy, Fz) in Newtons.
Here is the call graph for this function:

◆ computeNetMoment()

std::array< double, 3 > ForcesModel::computeNetMoment ( const FlightState & state) const

Computes the net external moment vector acting on the rocket.

Initially returns zero (for 3-DoF), but structured for 6-DoF extension.

Parameters
stateCurrent flight state.
Returns
Moment vector (Mx, My, Mz) in Newton-meters.

◆ computeThrust()

std::array< double, 3 > ForcesModel::computeThrust ( const FlightState & state) const
private

Computes thrust force based on motor outputs.

Parameters
stateCurrent flight state.
Returns
Thrust force vector (Newton).
Here is the caller graph for this function:

Member Data Documentation

◆ environment_

std::shared_ptr<Environment> ForcesModel::environment_
private

Atmospheric and gravity conditions.

◆ rocket_

std::shared_ptr<Rocket> ForcesModel::rocket_
private

Rocket model reference.


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