27 Stage(
const std::string& name);
38 void addMotor(std::unique_ptr<Motor> motor);
44 void setAirframe(std::unique_ptr<Airframe> airframe);
50 void setFinSet(std::unique_ptr<FinSet> finSet);
115 const std::string&
getName()
const;
Represents the structural body and aerodynamic shell of a rocket stage.
Definition Airframe.h:12
Models atmospheric and gravitational conditions for the flight simulation.
Definition Environment.h:10
Represents a set of aerodynamic fins attached to a rocket stage.
Definition FinSet.h:12
Represents the physical state of the rocket at a given simulation time.
Definition FlightState.h:12
Represents a rocket motor with thrust characteristics over time.
Definition Motor.h:14
Represents a recovery system for a rocket stage.
Definition RecoverySystem.h:12
double getTotalPropellantMass() const
Returns the current total propellant mass of all motors in the stage.
Definition Stage.cpp:45
void updateMassProperties()
Updates mass properties (e.g., after motor burn or separation).
Definition Stage.cpp:49
std::unique_ptr< Airframe > airframe_
Structural body and aerodynamic surfaces.
Definition Stage.h:132
std::unique_ptr< RecoverySystem > recoverySystem_
Recovery deployment system.
Definition Stage.h:134
std::unique_ptr< FinSet > finSet_
Fins for aerodynamic stability.
Definition Stage.h:133
bool checkSeparationEvent() const
Checks if the stage should separate (e.g., after burnout or trigger).
Definition Stage.cpp:82
void setRecoverySystem(std::unique_ptr< RecoverySystem > recovery)
Sets the recovery system for the stage.
Definition Stage.cpp:37
double calculateNormalForceCoefficient() const
Calculates the normal force coefficient contribution from the stage's fins.
Definition Stage.cpp:111
bool recoveryDeployed_
Flag indicating recovery system deployment.
Definition Stage.h:142
void setAirframe(std::unique_ptr< Airframe > airframe)
Sets the airframe for the stage.
Definition Stage.cpp:29
~Stage()=default
Default destructor.
std::vector< std::unique_ptr< Motor > > motors_
List of motors in this stage.
Definition Stage.h:131
const std::vector< std::unique_ptr< Motor > > & getMotorsForTesting() const
Definition Stage.h:124
bool checkRecoveryEvent() const
Checks if the recovery system should deploy (e.g., apogee, velocity triggers).
Definition Stage.cpp:91
bool separationTriggered_
Flag indicating stage separation event.
Definition Stage.h:141
double totalPropellantMass_
Remaining propellant [kg].
Definition Stage.h:138
void setFinSet(std::unique_ptr< FinSet > finSet)
Sets the fin set for the stage.
Definition Stage.cpp:33
std::array< double, 3 > getTotalThrust() const
Calculates the total thrust vector produced by all motors in this stage.
Definition Stage.cpp:118
void applyFlightState(const FlightState &state)
Updates the stage based on current flight conditions.
Definition Stage.cpp:77
void prepareForFlight(const Environment &env)
Prepares the stage for flight simulation (e.g., motor ignition sequencing).
Definition Stage.cpp:70
const std::string & getName() const
Gets the name of the stage.
Definition Stage.cpp:100
void addMotor(std::unique_ptr< Motor > motor)
Adds a motor to the stage.
Definition Stage.cpp:25
Stage(const std::string &name)
Constructs a new Stage with a given name.
Definition Stage.cpp:15
double totalMass_
Total mass [kg].
Definition Stage.h:137
std::string name_
Name of the stage.
Definition Stage.h:128
double getTotalMass() const
Returns the total mass of the stage (structure + motors + payload).
Definition Stage.cpp:41
double getAirframeLength() const
Gets the length of the airframe.
Definition Stage.cpp:104