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< Rocket > | rocket_
| Rocket model reference.
std::shared_ptr< ForcesModel > | forcesModel_
| 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

  rocket | Pointer to the rocket being simulated.
  forcesModel | Pointer 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

  state | Current flight state.
  netForce | Force vector acting on rocket [N].
  deltaTime | Time 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

  state | The flight state to update.
  deltaTime | Time 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:

- include/Integrator.h
- src/Integrator.cpp