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/rocketUtils.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/rocketUtils.cpp (limited to 'src/rocketUtils.cpp') diff --git a/src/rocketUtils.cpp b/src/rocketUtils.cpp deleted file mode 100644 index 45fcfc3..0000000 --- a/src/rocketUtils.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "../include/rocketUtils.hpp" - -double deploy_percentage_to_angle(double percentage) { - - return (MAX_ANGLE - MIN_ANGLE) / 100.0 * percentage + MIN_ANGLE; -} - - -std::string format_data(std::string prefix, double data, int precision) { - - std::stringstream stream; - stream << std::fixed << std::setprecision(precision) << data; - std::string s = stream.str(); - return prefix + s; -} - -bool led_out(Vehicle *vehicle) { - - std::ofstream file; - file.open(LED_FILENAME); - if (!file.is_open()) { - return false; - } - - file << std::to_string(vehicle->led_brightness); - file.close(); - - vehicle->led_time = time(nullptr); - vehicle->led_brightness = (vehicle->led_brightness + 1) % 2; - - return true; -} - -std::string state_for_log[5] = {"ON_PAD", "BOOST", "GLIDE", "APOGEE", "DONE"}; - \ No newline at end of file -- cgit v1.2.3