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. | |
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.
| Integrator::Integrator | ( | std::shared_ptr< Rocket > | rocket, |
| std::shared_ptr< ForcesModel > | forcesModel ) |
Constructs a new Integrator.
| rocket | Pointer to the rocket being simulated. |
| forcesModel | Pointer to the forces model. |
|
default |
Default destructor.
|
private |
Performs simple Euler integration for translational motion.
| state | Current flight state. |
| netForce | Force vector acting on rocket [N]. |
| deltaTime | Time step size (seconds). |


| void Integrator::step | ( | FlightState & | state, |
| const std::array< double, 3 > & | netForce, | ||
| double | deltaTime ) |
Advances the flight state forward by one time step.
| state | The flight state to update. |
| deltaTime | Time step size (seconds). |

|
private |
Forces model reference.