81 lines
2.1 KiB
C++
81 lines
2.1 KiB
C++
#ifndef AIRFRAME_H
|
|
#define AIRFRAME_H
|
|
|
|
#include <string>
|
|
|
|
/**
|
|
* @brief Represents the structural body and aerodynamic shell of a rocket stage.
|
|
*
|
|
* The Airframe class manages geometric dimensions, mass properties,
|
|
* and aerodynamic characteristics needed for simulation.
|
|
*/
|
|
class Airframe {
|
|
public:
|
|
/**
|
|
* @brief Constructs a new Airframe.
|
|
* @param name Name of the airframe component.
|
|
* @param length Total length of the airframe (meters).
|
|
* @param diameter Maximum body diameter (meters).
|
|
* @param dryMass Dry mass of the airframe structure (kilograms).
|
|
* @param dragCoefficient Estimated drag coefficient (unitless).
|
|
*/
|
|
Airframe(const std::string& name,
|
|
double length,
|
|
double diameter,
|
|
double dryMass,
|
|
double dragCoefficient);
|
|
|
|
/**
|
|
* @brief Default destructor.
|
|
*/
|
|
~Airframe() = default;
|
|
|
|
/**
|
|
* @brief Gets the total length of the airframe.
|
|
* @return Length in meters.
|
|
*/
|
|
double getLength() const;
|
|
|
|
/**
|
|
* @brief Gets the maximum diameter of the airframe.
|
|
* @return Diameter in meters.
|
|
*/
|
|
double getDiameter() const;
|
|
|
|
/**
|
|
* @brief Gets the dry mass of the airframe.
|
|
* @return Mass in kilograms.
|
|
*/
|
|
double getDryMass() const;
|
|
|
|
/**
|
|
* @brief Gets the aerodynamic drag coefficient.
|
|
* @return Drag coefficient (dimensionless).
|
|
*/
|
|
double getDragCoefficient() const;
|
|
|
|
/**
|
|
* @brief Calculates the reference area for drag computation.
|
|
*
|
|
* Reference area = Pi * (diameter / 2)^2
|
|
*
|
|
* @return Cross-sectional area in square meters.
|
|
*/
|
|
double getReferenceArea() const;
|
|
|
|
/**
|
|
* @brief Gets the name of the airframe.
|
|
* @return Name as a constant reference.
|
|
*/
|
|
const std::string& getName() const;
|
|
|
|
private:
|
|
std::string name_; ///< Name of the airframe.
|
|
|
|
double length_; ///< Total length [m].
|
|
double diameter_; ///< Maximum diameter [m].
|
|
double dryMass_; ///< Structural dry mass [kg].
|
|
double dragCoefficient_; ///< Drag coefficient (Cd).
|
|
};
|
|
|
|
#endif // AIRFRAME_H
|