summaryrefslogtreecommitdiff
path: root/include/unused/rocketUtils.hpp
diff options
context:
space:
mode:
authorDawsyn Schraiber <[email protected]>2024-06-13 14:30:58 -0400
committerGitHub <[email protected]>2024-06-13 14:30:58 -0400
commit58b4bc754bbb9f5197119cd0c124e49c05acff46 (patch)
tree8a65e23756374626e2c9cb997af9d8ed6f892390 /include/unused/rocketUtils.hpp
parent8fbd08fe29bbc2246a78b481b219c241f62ff420 (diff)
downloadactive-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.tar.gz
active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.tar.bz2
active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.zip
Where to begin…. (#13)
+/- 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
Diffstat (limited to 'include/unused/rocketUtils.hpp')
-rw-r--r--include/unused/rocketUtils.hpp121
1 files changed, 0 insertions, 121 deletions
diff --git a/include/unused/rocketUtils.hpp b/include/unused/rocketUtils.hpp
deleted file mode 100644
index 65b9cea..0000000
--- a/include/unused/rocketUtils.hpp
+++ /dev/null
@@ -1,121 +0,0 @@
-#pragma once
-#include <iostream>
-#include <vector>
-#include <ctime>
-#include <vector>
-#include <iomanip>
-#include <sstream>
-#include <fstream>
-
-// Deployment angle limits
-#define MAX_ANGLE 100
-#define MIN_ANGLE 120
-
-// Altimeter initialization count limit
-#define COUNT_LIMIT 50
-
-// Constants
-#define G_0 9.8066
-
-// Threshold limits
-#define BOOST_ACCEL_THRESH 3
-#define BOOST_HEIGHT_THRESH 20
-#define GLIDE_ACCEL_THRESH 0.5
-
-#define ALTI_DEPL_THRESHOLD 0.5
-#define RATE_ALTI_DEPL 1/50
-#define FSM_DONE_SURFACE_ALTITUDE 200
-#define APOGEE_FSM_CHANGE 3
-
-#define INIT_DEPLOYMENT 0
-
-#define TIME_BO 8
-#define TIME_APO 25
-#define TIME_END 120
-
-#define PAD_PRESSURE 102250
-
-#define DUTY_MAX 14.5
-#define DUTY_MIN 3
-
-#define LAUNCH_DATE "4-15-2023"
-#define LOG_FILENAME "DataLog_" LAUNCH_DATE ".txt"
-
-#define LED_GAP_TIME 0.5
-#define LED_ONE_PATH "/sys/class/leds/beaglebone:green:usr1"
-#define LED_BRIGHTNESS_FILE "brightness"
-#define LED_FILENAME LED_ONE_PATH LED_BRIGHTNESS_FILE
-
-#define TEST_MODE false
-
-
-enum VehicleState {ON_PAD, BOOST, GLIDE, APOGEE, DONE};
-extern std::string state_for_log[5];
-
-struct Vehicle {
-
- int status;
-
- std::vector<double> acceleration;
- std::vector<double> linear_acceleration;
-
- double apogee_altitude;
- double previous_altitude;
- double current_altitude;
- double filtered_altitude;
-
- double filtered_velocity;
-
- double deployment_angle;
-
- bool imuInitFail;
- bool imuReadFail;
- bool altiInitFail;
- bool altiReadFail;
-
- double ON_PAD_altitude;
- bool ON_PAD_fail;
-
- double duty_span;
-
- double dt;
-
- int led_brightness;
-
- time_t start_time;
- time_t fail_time; // For failure termination
- time_t liftoff_time;
- time_t relog_time;
- time_t deploy_time; // NOT INITIALIZED YET
- time_t loop_time;
- time_t led_time;
-};
-
-/**
- * @brief Convert fin deployment percentage to fin rotation angle
- *
- * @param percentage Fin deployment percentage
- * @return double
- */
-double deploy_percentage_to_angle(double percentage);
-
-/**
- * @brief Set the decimal precision of the given data, and return it
- * as a formatted string with a prefix containing a relevant description of the data.
- *
- * @param prefix Identifying or clarifying information about the loggef data
- * @param data Data to Log
- * @param precision The decimal precision value for the data
- *
- * @return A string with the formatted data.
- */
-std::string format_data(std::string prefix, double data, int precision);
-
-/**
- * @brief Blink Beaglebone LED 1
- *
- * @param vehicle Holds settings pertinent to the Beaglebone LED
- * @return true Successful Blink
- * @return false Unsuccessful Blink
- */
-bool led_out(Vehicle *vehicle);