From ef7de152bec1ebfbfa396e6577bf809e61526e7d Mon Sep 17 00:00:00 2001 From: Travis Hunter Date: Thu, 16 Feb 2023 19:04:06 -0700 Subject: [PATCH] WIP --- src/model/CMakeLists.txt | 2 ++ src/model/Motor.cpp | 1 + src/model/Motor.h | 39 +++++++++++++++++++++++++++++++++++++++ src/model/MotorCase.cpp | 1 + src/model/MotorCase.h | 23 +++++++++++++++++++++++ 5 files changed, 66 insertions(+) create mode 100644 src/model/Motor.cpp create mode 100644 src/model/Motor.h create mode 100644 src/model/MotorCase.cpp create mode 100644 src/model/MotorCase.h diff --git a/src/model/CMakeLists.txt b/src/model/CMakeLists.txt index d523a3e..24567a5 100644 --- a/src/model/CMakeLists.txt +++ b/src/model/CMakeLists.txt @@ -1,3 +1,5 @@ add_library(model + Motor.cpp + MotorCase.cpp Thrustcurve.cpp) diff --git a/src/model/Motor.cpp b/src/model/Motor.cpp new file mode 100644 index 0000000..176ddcb --- /dev/null +++ b/src/model/Motor.cpp @@ -0,0 +1 @@ +#include "Motor.h" \ No newline at end of file diff --git a/src/model/Motor.h b/src/model/Motor.h new file mode 100644 index 0000000..9bdc087 --- /dev/null +++ b/src/model/Motor.h @@ -0,0 +1,39 @@ +#ifndef MODEL_MOTOR_H +#define MODEL_MOTOR_H + +#include + +#include "Thrustcurve.h" +#include "MotorCase.h" + +class Motor +{ +public: + Motor(); + ~Motor(); +private: + + std::string manufacturer; + char impulseClass; + std::string propType; + bool sparky; + + // Thrust parameters + double totalImpulse; + double avgImpulse; + int delay; + double burnTime; + double isp; + MotorCase motorCase; + Thrustcurve thrust; + + // Physical dimensions + int diameter; + int length; + double totalWeight; + double propWeight; + + + +}; +#endif // MODEL_MOTOR_H \ No newline at end of file diff --git a/src/model/MotorCase.cpp b/src/model/MotorCase.cpp new file mode 100644 index 0000000..bb394dd --- /dev/null +++ b/src/model/MotorCase.cpp @@ -0,0 +1 @@ +#include "MotorCase.h" \ No newline at end of file diff --git a/src/model/MotorCase.h b/src/model/MotorCase.h new file mode 100644 index 0000000..887bd03 --- /dev/null +++ b/src/model/MotorCase.h @@ -0,0 +1,23 @@ +#ifndef MODEL_MOTORCASE_H +#define MODEL_MOTORCASE_H + +enum class MotorManufacturerEnum +{ + AEROTECH, + CESARONI, + LOKI, + AMW, + ESTES +}; + +class MotorCase +{ +public: + MotorCase(); + ~MotorCase(); + +private: + +}; + +#endif // MODEL_MOTORCASE_H \ No newline at end of file