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

Advances the rocket's flight state using numerical integration. More...

#include <Integrator.h>

Public Member Functions

 Integrator (std::shared_ptr< Rocket > rocket, std::shared_ptr< ForcesModel > forcesModel)
 Constructs a new Integrator.
 
 ~Integrator ()=default
 Default destructor.
 
void step (FlightState &state, const std::array< double, 3 > &netForce, double deltaTime)
 Advances the flight state forward by one time step.
 

Private Member Functions

void eulerIntegration (FlightState &state, const std::array< double, 3 > &netForce, double deltaTime)
 Performs simple Euler integration for translational motion.
 

Private Attributes

std::shared_ptr< Rocketrocket_
 Rocket model reference.
 
std::shared_ptr< ForcesModelforcesModel_
 Forces model reference.
 

Detailed Description

Advances the rocket's flight state using numerical integration.

The Integrator uses simple time-stepping methods (e.g., Euler, RK4) to update position, velocity, and optionally orientation and angular velocity.

Constructor & Destructor Documentation

◆ Integrator()

Integrator::Integrator ( std::shared_ptr< Rocket > rocket,
std::shared_ptr< ForcesModel > forcesModel )

Constructs a new Integrator.

Parameters
rocketPointer to the rocket being simulated.
forcesModelPointer to the forces model.

◆ ~Integrator()

Integrator::~Integrator ( )
default

Default destructor.

Member Function Documentation

◆ eulerIntegration()

void Integrator::eulerIntegration ( FlightState & state,
const std::array< double, 3 > & netForce,
double deltaTime )
private

Performs simple Euler integration for translational motion.

Parameters
stateCurrent flight state.
netForceForce vector acting on rocket [N].
deltaTimeTime step size (seconds).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ step()

void Integrator::step ( FlightState & state,
const std::array< double, 3 > & netForce,
double deltaTime )

Advances the flight state forward by one time step.

Parameters
stateThe flight state to update.
deltaTimeTime step size (seconds).
Here is the call graph for this function:

Member Data Documentation

◆ forcesModel_

std::shared_ptr<ForcesModel> Integrator::forcesModel_
private

Forces model reference.

◆ rocket_

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

Rocket model reference.


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