From 58b4bc754bbb9f5197119cd0c124e49c05acff46 Mon Sep 17 00:00:00 2001 From: Dawsyn Schraiber <32221234+dawsynth@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:30:58 -0400 Subject: Where to begin…. (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +/- Reworked collection of altimeter related functions into altimeter class +/- Reworked bno055 class to be imu class with minimal functionality \- Removed external Kalman filter implementations in favor of own in house version \- Removed any/unused files \+ Added buffer logger for when sitting on pad for extended period of time in effort to prevent filling of flash chip \+ Added heartbeat LED for alive status --- src/actuationPlan.cpp | 60 --------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/actuationPlan.cpp (limited to 'src/actuationPlan.cpp') diff --git a/src/actuationPlan.cpp b/src/actuationPlan.cpp deleted file mode 100644 index a987478..0000000 --- a/src/actuationPlan.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "../include/actuationPlan.hpp" - -ActuationPlan::ActuationPlan() {} - -ActuationPlan::ActuationPlan(SurfaceFitModel sFitModel) : sFitModel(sFitModel) { - -} - - -void ActuationPlan::runPlan(Vehicle& rocket) { - - - if (rocket.imuReadFail || rocket.altiReadFail) { - rocket.deployment_angle = deploy_percentage_to_angle(0); // No fin deployment - } - - rocket.fail_time = time(nullptr); - - // 2024 Mission--------------------------------------------------------------------- - if (rocket.status == GLIDE) { - - // Fin deployment based on current drag coefficient value - try { - double cd = sFitModel.getFit(rocket.filtered_velocity, rocket.filtered_altitude); - cd = std::min(std::max(0.0, cd), 100.0); - rocket.deployment_angle = deploy_percentage_to_angle(cd); - } - - // Full deployment during coasting - catch (...) { - rocket.deployment_angle = deploy_percentage_to_angle(0); - - if ((time(nullptr) - rocket.deploy_time) > 2 && (time(nullptr) - rocket.deploy_time) < 7) { - rocket.deployment_angle = deploy_percentage_to_angle(100); - } - } - } - - else if (rocket.status == APOGEE) { - - rocket.deployment_angle = deploy_percentage_to_angle(50); - } - - else { - - rocket.deploy_time = time(nullptr); - } - // End 2024 Mission------------------------------------------------------------------ -} - - - - - - - - - - - -- cgit v1.2.3