Loading...
Searching...
No Matches
RecoverySystem.h
Go to the documentation of this file.
#ifndef RECOVERYSYSTEM_H
#define RECOVERYSYSTEM_H
#include <string>
class RecoverySystem {
public:
enum class DeploymentType {
Apogee,
Altitude,
Timer
};
RecoverySystem(const std::string& name,
DeploymentType deploymentType,
double triggerValue,
double dragCoefficient,
double referenceArea);
~RecoverySystem() = default;
bool checkDeploymentCondition(double altitude, double velocity, double time, bool atApogee) const;
void deploy();
bool isDeployed() const;
double getDragCoefficient() const;
double getReferenceArea() const;
const std::string& getName() const;
private:
std::string name_;
DeploymentType deploymentType_;
double triggerValue_;
double dragCoefficient_;
double referenceArea_;
bool deployed_;
};
#endif // RECOVERYSYSTEM_H
RecoverySystem::DeploymentType
DeploymentType
Deployment trigger types.
Definition RecoverySystem.h:17
RecoverySystem::DeploymentType::Apogee
@ Apogee
Definition RecoverySystem.h:18
RecoverySystem::DeploymentType::Altitude
@ Altitude
Definition RecoverySystem.h:19
RecoverySystem::DeploymentType::Timer
@ Timer
Definition RecoverySystem.h:20
RecoverySystem::getName
const std::string & getName() const
Gets the name of the recovery system.
Definition RecoverySystem.cpp:60
RecoverySystem::deploy
void deploy()
Marks the recovery system as deployed.
Definition RecoverySystem.cpp:44
RecoverySystem::checkDeploymentCondition
bool checkDeploymentCondition(double altitude, double velocity, double time, bool atApogee) const
Checks if deployment conditions are met based on flight state.
Definition RecoverySystem.cpp:21
RecoverySystem::~RecoverySystem
~RecoverySystem()=default
Default destructor.
RecoverySystem::name_
std::string name_
Name of the recovery system.
Definition RecoverySystem.h:82
RecoverySystem::deployed_
bool deployed_
Whether the recovery system has been deployed.
Definition RecoverySystem.h:90
RecoverySystem::getDragCoefficient
double getDragCoefficient() const
Gets the drag coefficient.
Definition RecoverySystem.cpp:52
RecoverySystem::dragCoefficient_
double dragCoefficient_
Drag coefficient after deployment.
Definition RecoverySystem.h:87
RecoverySystem::referenceArea_
double referenceArea_
Reference area [m2].
Definition RecoverySystem.h:88
RecoverySystem::RecoverySystem
RecoverySystem(const std::string &name, DeploymentType deploymentType, double triggerValue, double dragCoefficient, double referenceArea)
Constructs a new RecoverySystem.
Definition RecoverySystem.cpp:6
RecoverySystem::getReferenceArea
double getReferenceArea() const
Gets the reference area.
Definition RecoverySystem.cpp:56
RecoverySystem::isDeployed
bool isDeployed() const
Returns whether the recovery system has been deployed.
Definition RecoverySystem.cpp:48
RecoverySystem::deploymentType_
DeploymentType deploymentType_
Deployment trigger type.
Definition RecoverySystem.h:84
RecoverySystem::triggerValue_
double triggerValue_
Trigger value (meters for altitude, seconds for timer).
Definition RecoverySystem.h:85