Loading...
Searching...
No Matches
Integrator.h
Go to the documentation of this file.
#ifndef INTEGRATOR_H
#define INTEGRATOR_H
#include <memory>
#include <array>
class Rocket;
class Environment;
class ForcesModel;
class FlightState;
class Integrator {
public:
Integrator(std::shared_ptr<Rocket> rocket,
std::shared_ptr<ForcesModel> forcesModel);
~Integrator() = default;
void step(FlightState& state, const std::array<double, 3>& netForce, double deltaTime);
private:
std::shared_ptr<Rocket> rocket_;
std::shared_ptr<ForcesModel> forcesModel_;
void eulerIntegration(FlightState& state,
const std::array<double, 3>& netForce,
double deltaTime);
};
#endif // INTEGRATOR_H
Environment
Models atmospheric and gravitational conditions for the flight simulation.
Definition Environment.h:10
FlightState
Represents the physical state of the rocket at a given simulation time.
Definition FlightState.h:12
ForcesModel
Computes aerodynamic, thrust, and gravitational forces acting on the rocket.
Definition ForcesModel.h:17
Integrator::Integrator
Integrator(std::shared_ptr< Rocket > rocket, std::shared_ptr< ForcesModel > forcesModel)
Constructs a new Integrator.
Definition Integrator.cpp:11
Integrator::rocket_
std::shared_ptr< Rocket > rocket_
Rocket model reference.
Definition Integrator.h:41
Integrator::forcesModel_
std::shared_ptr< ForcesModel > forcesModel_
Forces model reference.
Definition Integrator.h:42
Integrator::eulerIntegration
void eulerIntegration(FlightState &state, const std::array< double, 3 > &netForce, double deltaTime)
Performs simple Euler integration for translational motion.
Definition Integrator.cpp:27
Integrator::~Integrator
~Integrator()=default
Default destructor.
Integrator::step
void step(FlightState &state, const std::array< double, 3 > &netForce, double deltaTime)
Advances the flight state forward by one time step.
Definition Integrator.cpp:19
Rocket
Represents a complete rocket vehicle composed of stages, motors, and recovery systems.
Definition Rocket.h:20