QtRocket
 
Loading...
Searching...
No Matches
Integrator.h
Go to the documentation of this file.
1#ifndef INTEGRATOR_H
2#define INTEGRATOR_H
3
4#include <memory>
5#include <array>
6
7class Rocket;
8class Environment;
9class ForcesModel;
10class FlightState;
11
19public:
25 Integrator(std::shared_ptr<Rocket> rocket,
26 std::shared_ptr<ForcesModel> forcesModel);
27
31 ~Integrator() = default;
32
38 void step(FlightState& state, const std::array<double, 3>& netForce, double deltaTime);
39
40private:
41 std::shared_ptr<Rocket> rocket_;
42 std::shared_ptr<ForcesModel> forcesModel_;
43
50 void eulerIntegration(FlightState& state,
51 const std::array<double, 3>& netForce,
52 double deltaTime);
53};
54
55#endif // INTEGRATOR_H
Models atmospheric and gravitational conditions for the flight simulation.
Definition Environment.h:10
Represents the physical state of the rocket at a given simulation time.
Definition FlightState.h:12
Computes aerodynamic, thrust, and gravitational forces acting on the rocket.
Definition ForcesModel.h:17
Integrator(std::shared_ptr< Rocket > rocket, std::shared_ptr< ForcesModel > forcesModel)
Constructs a new Integrator.
Definition Integrator.cpp:11
std::shared_ptr< Rocket > rocket_
Rocket model reference.
Definition Integrator.h:41
std::shared_ptr< ForcesModel > forcesModel_
Forces model reference.
Definition Integrator.h:42
void eulerIntegration(FlightState &state, const std::array< double, 3 > &netForce, double deltaTime)
Performs simple Euler integration for translational motion.
Definition Integrator.cpp:27
~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.
Definition Integrator.cpp:19
Represents a complete rocket vehicle composed of stages, motors, and recovery systems.
Definition Rocket.h:20