From a3c7f2bb525ed0606834fcd90df5d679692130b9 Mon Sep 17 00:00:00 2001 From: Swooping-Evil <124680355+Swooping-Evil@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:05:55 +0300 Subject: [PATCH 1/2] adds statemachine logic --- n4-flight-software/include/functions.h | 26 ++++++ n4-flight-software/include/states.h | 27 ++++++ n4-flight-software/src/states.cpp | 124 +++++++++++++++++++++++++ n4-flight-software/src/states.h | 0 4 files changed, 177 insertions(+) create mode 100644 n4-flight-software/include/functions.h create mode 100644 n4-flight-software/include/states.h delete mode 100644 n4-flight-software/src/states.h diff --git a/n4-flight-software/include/functions.h b/n4-flight-software/include/functions.h new file mode 100644 index 0000000..1a5606b --- /dev/null +++ b/n4-flight-software/include/functions.h @@ -0,0 +1,26 @@ +#ifndef FUNCTIONS_H +#define FUNCTIONS_H + +#include "sensors.h" + +void ejection(int pin) { + // Set the pin as output + pinMode(pin, OUTPUT); + + // Activating the parachute + digitalWrite(pin, HIGH); + + //Deployment delay + delay(1000); // Delay for 1 second + + // Deactivating the parachute + digitalWrite(pin, LOW); +}; + +float getAltitude(); +float getAcceleration(); +float getVelocity(); + + + +#endif \ No newline at end of file diff --git a/n4-flight-software/include/states.h b/n4-flight-software/include/states.h new file mode 100644 index 0000000..55b91f9 --- /dev/null +++ b/n4-flight-software/include/states.h @@ -0,0 +1,27 @@ +#ifndef STATES_H +#define STATE_H +#include "stdint.h" + +//we initialize functions that will be included in checkstate.cpp + + +enum State { + PRE_FLIGHT_GROUND, + POWERED_FLIGHT, + COASTING, + DROGUE_DEPLOY, + DROGUE_DESCENT, + MAIN_CHUTE_DEPLOY, + MAIN_DESCENT, + POST_FLIGHT_GROUND +}; + +State isInPoweredFlight(float altitude); +State isInCoasting(bool isDecelerating); +State isInApogee(float velocity, float altitude); +State isInDrogueDeploy(float altitude); +State isInMainChuteDeploy(float altitude); +State isInPostFlight(float acceleration); + + +#endif \ No newline at end of file diff --git a/n4-flight-software/src/states.cpp b/n4-flight-software/src/states.cpp index e69de29..fa0e665 100644 --- a/n4-flight-software/src/states.cpp +++ b/n4-flight-software/src/states.cpp @@ -0,0 +1,124 @@ +#include "states.h" +#include "functions.h" +#include "defs.h" +#include "sensors.h" +#include "elapsedMillis.h" + +const int DROGUE_PIN = 3; +const int MAIN_PIN = 5; + +elapsedMillis decelerationTimer; // Timer to track deceleration duration + +bool isDeceleratingContinuously(){ + static float previousAltitude = 0.0f; // Store previous altitude + float currentAltitude = getAltitude(); // Read current altitude + float verticalAccel = getAcceleration(MPU_SENSOR_Z_AXIS) - 9.81f; // Calculate vertical acceleration + + // Check for deceleration event + bool isDecelerating = verticalAccel < 0 + + // Update deceleration timer + if (isDecelerating) { + if (!decelerationTimer.start()) { + decelerationTimer.operator unsigned long(); // Start timer if deceleration starts + } + } else { + decelerationTimer.stop(); // Reset timer if deceleration stops + + + // Check for continuous deceleration + return isDecelerating && decelerationTimer >= DECELERATION_DURATION; + } +} + +//define default current state +State currentState = State::PRE_FLIGHT_GROUND; + +//State machine transition conditions + +//checks if altitude is greater than 50m to determine powered flight +State isInPoweredFlight(float altitude) { + if (altitude > 50.0f) { + return State::POWERED_FLIGHT; + } +} +// Checks for continuous deceleration to determine coasting +State isInCoasting(bool isDecelerating) { + if (isDeceleratingContinuously() && millis() >= DECELERATION_CHECK_DURATION) { + return State::COASTING; + } else {} +} +//Checks for velocity is 0 or negative to determine apogee is reached and deploy drogue +State isInApogee(float velocity, float altitude) { + if (velocity <= 0 && altitude >= APOGEE_ALTITUDE) { + return State::DROGUE_DEPLOY; + } else if (altitude < DROGUE_DEPLOY_MIN_ALTITUDE) {} + else {} +} +// Checks for an altitude of 450 meteres to deploy the main chute +State isInMainChuteDeploy(float altitude) { + if (altitude <= MAIN_CHUTE_DEPLOY_ALTITUDE) { + return State::MAIN_CHUTE_DEPLOY; + } else {} +} +// Checks for an acceleration equal or greater to gravity to determine post flight +State isInPostFlight(float acceleration) { + if (acceleration >= 9.81f) { // Assuming acceleration due to gravity + return State::POST_FLIGHT_GROUND; + } else {} +} + +void loop() { + + // Read sensor data + float currentAltitude = getAltitude(); + float velocity = getVelocity(); + bool isDecelerating = isDeceleratingContinuously(); + + if(modf == FLIGHT_MODE) { + + // Call state transition functions + currentState = isInPoweredFlight(currentAltitude); + currentState = isInCoasting(isDecelerating); + currentState = isInApogee(velocity,currentAltitude); + currentState = isInMainChuteDeploy(currentAltitude); + + } else { + currentState = PRE_FLIGHT_GROUND; + } + + + // State transitions + switch (currentState) { + case State::PRE_FLIGHT_GROUND: + Serial.println( "Pre-Flight State"); + break; + case State::POWERED_FLIGHT: + Serial.println("Powered Flight state"); + break; + case State::COASTING: + Serial.println("Coasting State"); + break; + case State::DROGUE_DEPLOY: + Serial.println("Apogee reached"); + // Call drogue eject function + ejection(DROGUE_PIN); + break; + case State::DROGUE_DESCENT: + Serial.println("Drogue Descent"); + break; + case State::MAIN_CHUTE_DEPLOY: + Serial.println("Main Chute Deploy"); + // Call main chute eject function + ejection(MAIN_PIN); + break; + case State::POST_FLIGHT_GROUND: + Serial.println("Post-Flight state"); + break; + default: + break; + } + + // Delay between loop iterations + delay(100); // will adjust as needed +} diff --git a/n4-flight-software/src/states.h b/n4-flight-software/src/states.h deleted file mode 100644 index e69de29..0000000 From 6f5dd01ccfebd48ebeec13b171f32754a585bec2 Mon Sep 17 00:00:00 2001 From: Swooping-Evil <124680355+Swooping-Evil@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:07:04 +0300 Subject: [PATCH 2/2] Adds state machine changes --- .../{main.yml => doxygen-gh-pages.yml} | 15 +- .idea/.gitignore | 8 + .idea/N4-Flight-Software.iml | 14 + .idea/inspectionProfiles/Project_Default.xml | 6 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + n4-flight-software/Doxyfile => Doxyfile | 17 +- README.md | 2 +- contributing.md | 195 ++ .../html/_system_log_levels_8h_source.html | 42 +- .../html/_system_logger_8h_source.html | 42 +- .../html/annotated.html | 33 +- docs/html/annotated_dup.js | 16 + {n4-flight-software => docs}/html/bc_s.png | Bin {n4-flight-software => docs}/html/bc_sd.png | Bin .../html/class_custom_g_p_s.html | 38 +- .../html/class_custom_g_p_s.png | Bin .../html/class_data_logger-members.html | 35 +- .../html/class_data_logger.html | 42 +- docs/html/class_data_logger.js | 12 + .../html/class_logger_console-members.html | 35 +- .../html/class_logger_console.html | 38 +- .../html/class_logger_console.png | Bin .../html/class_m_p_u6050-members.html | 35 +- .../html/class_m_p_u6050.html | 42 +- docs/html/class_m_p_u6050.js | 9 + .../html/class_state__machine-members.html | 35 +- .../html/class_state__machine.html | 42 +- .../html/class_system_logger-members.html | 35 +- .../html/class_system_logger.html | 40 +- docs/html/class_system_logger.js | 4 + .../html/class_system_logger.png | Bin .../html/class_test-members.html | 35 +- .../html/class_test.html | 38 +- .../html/classes.html | 33 +- .../html/clipboard.js | 0 {n4-flight-software => docs}/html/closed.png | Bin {n4-flight-software => docs}/html/cookie.js | 0 .../html/custom-time_8h.html | 60 +- docs/html/custom-time_8h.js | 4 + .../html/custom-time_8h_source.html | 53 +- .../html/data-types_8h_source.html | 42 +- .../html/defs_8h_source.html | 176 +- .../dir_223c149f86d1b3369d43d9ec6c6d367c.html | 126 ++ .../dir_223c149f86d1b3369d43d9ec6c6d367c.js | 7 + .../dir_7e35c193691ab641d32e52b2b4a47995.html | 42 +- .../dir_7e35c193691ab641d32e52b2b4a47995.js | 8 + .../dir_c7dea9aec5351af29cf9782f17ca3e80.html | 42 +- .../dir_c7dea9aec5351af29cf9782f17ca3e80.js | 6 + .../dir_d09072d1c94fe000833aa47d92501a74.html | 44 +- .../dir_d09072d1c94fe000833aa47d92501a74.js | 10 + .../dir_f60075fce1cd53b9027038118d904c9d.html | 42 +- .../dir_f60075fce1cd53b9027038118d904c9d.js | 5 + {n4-flight-software => docs}/html/doc.svg | 0 {n4-flight-software => docs}/html/docd.svg | 0 {n4-flight-software => docs}/html/doxygen.css | 0 {n4-flight-software => docs}/html/doxygen.svg | 0 .../html/doxygen_crawl.html | 111 +- .../html/dynsections.js | 0 docs/html/files.html | 139 ++ docs/html/files_dup.js | 4 + .../html/folderclosed.svg | 0 .../html/folderclosedd.svg | 0 .../html/folderopen.svg | 0 .../html/folderopend.svg | 0 .../html/functions.html | 33 +- .../html/functions_func.html | 33 +- docs/html/globals.html | 243 +++ docs/html/globals_defs.html | 121 ++ .../index.html => docs/html/globals_enum.html | 42 +- docs/html/globals_eval.html | 114 ++ .../html/globals_func.html | 48 +- .../html/globals_vars.html | 45 +- .../html/gps_8h_source.html | 42 +- .../html/hierarchy.html | 33 +- docs/html/hierarchy.js | 19 + .../html/include_2state__machine_8cpp.html | 42 +- .../include_2state__machine_8h_source.html | 42 +- docs/html/index.html | 237 +++ {n4-flight-software => docs}/html/jquery.js | 0 .../html/kalman_8h_source.html | 42 +- .../html/logger_8h_source.html | 49 +- docs/html/logo.jpg | Bin 0 -> 7287 bytes docs/html/md__r_e_a_d_m_e.html | 343 ++++ docs/html/md_contributing.html | 273 +++ .../md_n4-flight-software_2_r_e_a_d_m_e.html | 35 +- ...-flight-software_2src_2pin-assignment.html | 49 +- {n4-flight-software => docs}/html/menu.js | 0 {n4-flight-software => docs}/html/menudata.js | 25 +- {n4-flight-software => docs}/html/minus.svg | 0 {n4-flight-software => docs}/html/minusd.svg | 0 .../html/mpu_8h_source.html | 104 +- {n4-flight-software => docs}/html/nav_f.png | Bin {n4-flight-software => docs}/html/nav_fd.png | Bin {n4-flight-software => docs}/html/nav_g.png | Bin {n4-flight-software => docs}/html/nav_h.png | Bin {n4-flight-software => docs}/html/nav_hd.png | Bin {n4-flight-software => docs}/html/navtree.css | 0 docs/html/navtree.js | 483 +++++ docs/html/navtreedata.js | 77 + docs/html/navtreeindex0.js | 150 ++ {n4-flight-software => docs}/html/open.png | Bin {n4-flight-software => docs}/html/pages.html | 36 +- {n4-flight-software => docs}/html/plus.svg | 0 {n4-flight-software => docs}/html/plusd.svg | 0 {n4-flight-software => docs}/html/resize.js | 0 docs/html/search/all_0.js | 13 + docs/html/search/all_1.js | 8 + docs/html/search/all_10.js | 12 + docs/html/search/all_11.js | 4 + docs/html/search/all_12.js | 4 + docs/html/search/all_13.js | 4 + docs/html/search/all_14.js | 23 + docs/html/search/all_15.js | 13 + docs/html/search/all_16.js | 8 + docs/html/search/all_17.js | 14 + docs/html/search/all_18.js | 9 + docs/html/search/all_19.js | 5 + docs/html/search/all_1a.js | 26 + docs/html/search/all_1b.js | 30 + docs/html/search/all_1c.js | 25 + docs/html/search/all_1d.js | 5 + docs/html/search/all_1e.js | 8 + docs/html/search/all_1f.js | 6 + docs/html/search/all_2.js | 16 + docs/html/search/all_3.js | 11 + docs/html/search/all_4.js | 6 + docs/html/search/all_5.js | 17 + .../all_5.js => docs/html/search/all_6.js | 3 +- docs/html/search/all_7.js | 7 + docs/html/search/all_8.js | 9 + docs/html/search/all_9.js | 19 + docs/html/search/all_a.js | 12 + docs/html/search/all_b.js | 6 + .../all_9.js => docs/html/search/all_c.js | 0 docs/html/search/all_d.js | 9 + docs/html/search/all_e.js | 15 + docs/html/search/all_f.js | 19 + .../html/search/classes_0.js | 0 .../html/search/classes_1.js | 0 .../html/search/classes_2.js | 0 .../html/search/classes_3.js | 0 .../html/search/classes_4.js | 0 .../html/search/classes_5.js | 0 .../html/search/classes_6.js | 0 .../html/search/classes_7.js | 0 .../html/search/classes_8.js | 0 .../html/search/close.svg | 0 docs/html/search/defines_0.js | 4 + docs/html/search/defines_1.js | 4 + docs/html/search/defines_2.js | 4 + docs/html/search/defines_3.js | 5 + docs/html/search/defines_4.js | 5 + docs/html/search/defines_5.js | 4 + docs/html/search/defines_6.js | 4 + docs/html/search/enums_0.js | 4 + docs/html/search/enumvalues_0.js | 4 + docs/html/search/enumvalues_1.js | 4 + .../html/search/files_0.js | 0 .../html/search/files_1.js | 0 .../html/search/files_2.js | 3 +- docs/html/search/functions_0.js | 6 + docs/html/search/functions_1.js | 7 + .../html/search/functions_2.js | 3 +- docs/html/search/functions_3.js | 5 + .../html/search/functions_4.js | 0 docs/html/search/functions_5.js | 4 + docs/html/search/functions_6.js | 5 + docs/html/search/functions_7.js | 14 + docs/html/search/functions_8.js | 4 + docs/html/search/functions_9.js | 4 + .../html/search/functions_a.js | 3 +- docs/html/search/functions_b.js | 5 + .../html/search/mag.svg | 0 .../html/search/mag_d.svg | 0 .../html/search/mag_sel.svg | 0 .../html/search/mag_seld.svg | 0 docs/html/search/pages_0.js | 4 + docs/html/search/pages_1.js | 4 + docs/html/search/pages_2.js | 4 + docs/html/search/pages_3.js | 4 + docs/html/search/pages_4.js | 4 + docs/html/search/pages_5.js | 4 + docs/html/search/pages_6.js | 4 + docs/html/search/pages_7.js | 4 + docs/html/search/pages_8.js | 4 + .../html/search/search.css | 0 .../html/search/search.js | 0 .../html/search/searchdata.js | 21 +- .../html/search/variables_0.js | 0 docs/html/search/variables_1.js | 6 + .../html/search/variables_2.js | 3 +- docs/html/search/variables_3.js | 4 + .../html/search/variables_4.js | 0 .../html/search/variables_5.js | 0 .../html/search/variables_6.js | 0 .../html/search/variables_7.js | 0 docs/html/search/variables_8.js | 5 + docs/html/search/variables_9.js | 7 + .../html/search/variables_a.js | 0 docs/html/search/variables_b.js | 4 + .../html/sensors_8h_source.html | 42 +- .../html/splitbar.png | Bin .../html/splitbard.png | Bin docs/html/src_2main_8cpp.html | 1573 +++++++++++++++++ docs/html/src_2main_8cpp.js | 65 + docs/html/states_8h.html | 139 ++ docs/html/states_8h_source.html | 131 ++ .../struct_acceleration___data-members.html | 35 +- .../html/struct_acceleration___data.html | 38 +- .../html/struct_altimeter___data-members.html | 35 +- .../html/struct_altimeter___data.html | 38 +- .../html/struct_filtered___data-members.html | 35 +- .../html/struct_filtered___data.html | 38 +- .../html/struct_g_p_s___data-members.html | 35 +- .../html/struct_g_p_s___data.html | 38 +- .../html/struct_gyroscope___data-members.html | 35 +- .../html/struct_gyroscope___data.html | 38 +- .../html/struct_telemetry___data-members.html | 35 +- .../html/struct_telemetry___data.html | 38 +- .../html/sync_off.png | Bin {n4-flight-software => docs}/html/sync_on.png | Bin {n4-flight-software => docs}/html/tab_a.png | Bin {n4-flight-software => docs}/html/tab_ad.png | Bin {n4-flight-software => docs}/html/tab_b.png | Bin {n4-flight-software => docs}/html/tab_bd.png | Bin {n4-flight-software => docs}/html/tab_h.png | Bin {n4-flight-software => docs}/html/tab_hd.png | Bin {n4-flight-software => docs}/html/tab_s.png | Bin {n4-flight-software => docs}/html/tab_sd.png | Bin {n4-flight-software => docs}/html/tabs.css | 0 .../html/test_2state__machine_8cpp.html | 42 +- .../html/test_2state__machine_8h_source.html | 42 +- .../html/test__class_8h_source.html | 42 +- flight-computer-pin-assignment-version-1.xlsx | Bin 0 -> 11690 bytes logo.jpg | Bin 0 -> 7287 bytes mainpage-backup | 0 mainpage.txt | 132 ++ n4-flight-software/data-logger.py | 2 - n4-flight-software/html/files.html | 123 -- n4-flight-software/html/globals.html | 121 -- n4-flight-software/html/search/all_0.js | 6 - n4-flight-software/html/search/all_1.js | 4 - n4-flight-software/html/search/all_2.js | 8 - n4-flight-software/html/search/all_3.js | 5 - n4-flight-software/html/search/all_4.js | 11 - n4-flight-software/html/search/all_7.js | 15 - n4-flight-software/html/search/all_8.js | 5 - n4-flight-software/html/search/all_b.js | 10 - n4-flight-software/html/search/all_c.js | 7 - n4-flight-software/html/search/all_d.js | 6 - n4-flight-software/html/search/functions_0.js | 4 - n4-flight-software/html/search/functions_1.js | 4 - n4-flight-software/html/search/functions_3.js | 4 - n4-flight-software/html/search/functions_5.js | 13 - n4-flight-software/html/search/functions_7.js | 4 - n4-flight-software/html/search/pages_0.js | 4 - n4-flight-software/html/search/variables_1.js | 5 - n4-flight-software/html/search/variables_3.js | 4 - n4-flight-software/html/search/variables_6.js | 4 - n4-flight-software/html/src_2main_8cpp.html | 692 -------- n4-flight-software/include/defs.h | 17 +- n4-flight-software/include/functions.h | 2 + n4-flight-software/src/.main.cpp.un~ | Bin 0 -> 18625 bytes n4-flight-software/src/.states.cpp.un~ | Bin 0 -> 5715 bytes n4-flight-software/src/custom_time.cpp | 23 + n4-flight-software/src/custom_time.h | 15 + .../src/{data-types.h => data_types.h} | 0 n4-flight-software/src/img_1.png | Bin 0 -> 35158 bytes n4-flight-software/src/logger.cpp | 2 +- n4-flight-software/src/logger.h | 2 +- n4-flight-software/src/main.cpp | 962 ++++++++-- n4-flight-software/src/mpu.cpp | 5 +- n4-flight-software/src/mpu.h | 50 +- n4-flight-software/src/pin_assignment.MD | 2 + n4-flight-software/src/states.cpp | 30 +- n4-flight-software/src/states.cpp~ | 21 + n4-flight-software/src/states.h | 21 + .../system_log_levels.h} | 8 +- n4-flight-software/src/system_logger.cpp | 124 ++ n4-flight-software/src/system_logger.h | 17 + .../system-logger/SystemLogger.cpp | 45 - .../system-logger/SystemLogger.h | 13 - .../logger-arduino/logger-arduino.ino | 28 - .../system-logger/logger-console.cpp | 48 - .../log_time_fmt_test}/custom-time.h | 7 +- .../log_time_fmt_test/log_time_fmt_test.ino} | 21 +- 287 files changed, 8141 insertions(+), 2219 deletions(-) rename .github/workflows/{main.yml => doxygen-gh-pages.yml} (75%) create mode 100644 .idea/.gitignore create mode 100644 .idea/N4-Flight-Software.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml rename n4-flight-software/Doxyfile => Doxyfile (99%) create mode 100644 contributing.md rename {n4-flight-software => docs}/html/_system_log_levels_8h_source.html (77%) rename {n4-flight-software => docs}/html/_system_logger_8h_source.html (81%) rename {n4-flight-software => docs}/html/annotated.html (87%) create mode 100644 docs/html/annotated_dup.js rename {n4-flight-software => docs}/html/bc_s.png (100%) rename {n4-flight-software => docs}/html/bc_sd.png (100%) rename {n4-flight-software => docs}/html/class_custom_g_p_s.html (75%) rename {n4-flight-software => docs}/html/class_custom_g_p_s.png (100%) rename {n4-flight-software => docs}/html/class_data_logger-members.html (84%) rename {n4-flight-software => docs}/html/class_data_logger.html (91%) create mode 100644 docs/html/class_data_logger.js rename {n4-flight-software => docs}/html/class_logger_console-members.html (81%) rename {n4-flight-software => docs}/html/class_logger_console.html (83%) rename {n4-flight-software => docs}/html/class_logger_console.png (100%) rename {n4-flight-software => docs}/html/class_m_p_u6050-members.html (91%) rename {n4-flight-software => docs}/html/class_m_p_u6050.html (94%) create mode 100644 docs/html/class_m_p_u6050.js rename {n4-flight-software => docs}/html/class_state__machine-members.html (85%) rename {n4-flight-software => docs}/html/class_state__machine.html (83%) rename {n4-flight-software => docs}/html/class_system_logger-members.html (79%) rename {n4-flight-software => docs}/html/class_system_logger.html (79%) create mode 100644 docs/html/class_system_logger.js rename {n4-flight-software => docs}/html/class_system_logger.png (100%) rename {n4-flight-software => docs}/html/class_test-members.html (79%) rename {n4-flight-software => docs}/html/class_test.html (79%) rename {n4-flight-software => docs}/html/classes.html (84%) rename {n4-flight-software => docs}/html/clipboard.js (100%) rename {n4-flight-software => docs}/html/closed.png (100%) rename {n4-flight-software => docs}/html/cookie.js (100%) rename {n4-flight-software => docs}/html/custom-time_8h.html (67%) create mode 100644 docs/html/custom-time_8h.js rename {n4-flight-software => docs}/html/custom-time_8h_source.html (78%) rename {n4-flight-software => docs}/html/data-types_8h_source.html (89%) rename {n4-flight-software => docs}/html/defs_8h_source.html (64%) create mode 100644 docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.html create mode 100644 docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.js rename n4-flight-software/html/dir_d44c64559bbebec7f509842c48db8b23.html => docs/html/dir_7e35c193691ab641d32e52b2b4a47995.html (78%) create mode 100644 docs/html/dir_7e35c193691ab641d32e52b2b4a47995.js rename n4-flight-software/html/dir_13e138d54eb8818da29c3992edef070a.html => docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.html (76%) create mode 100644 docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.js rename n4-flight-software/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html => docs/html/dir_d09072d1c94fe000833aa47d92501a74.html (79%) create mode 100644 docs/html/dir_d09072d1c94fe000833aa47d92501a74.js rename n4-flight-software/html/dir_cef54c92003fea6141f5cbd24377e67d.html => docs/html/dir_f60075fce1cd53b9027038118d904c9d.html (74%) create mode 100644 docs/html/dir_f60075fce1cd53b9027038118d904c9d.js rename {n4-flight-software => docs}/html/doc.svg (100%) rename {n4-flight-software => docs}/html/docd.svg (100%) rename {n4-flight-software => docs}/html/doxygen.css (100%) rename {n4-flight-software => docs}/html/doxygen.svg (100%) rename {n4-flight-software => docs}/html/doxygen_crawl.html (60%) rename {n4-flight-software => docs}/html/dynsections.js (100%) create mode 100644 docs/html/files.html create mode 100644 docs/html/files_dup.js rename {n4-flight-software => docs}/html/folderclosed.svg (100%) rename {n4-flight-software => docs}/html/folderclosedd.svg (100%) rename {n4-flight-software => docs}/html/folderopen.svg (100%) rename {n4-flight-software => docs}/html/folderopend.svg (100%) rename {n4-flight-software => docs}/html/functions.html (83%) rename {n4-flight-software => docs}/html/functions_func.html (83%) create mode 100644 docs/html/globals.html create mode 100644 docs/html/globals_defs.html rename n4-flight-software/html/index.html => docs/html/globals_enum.html (70%) create mode 100644 docs/html/globals_eval.html rename {n4-flight-software => docs}/html/globals_func.html (60%) rename {n4-flight-software => docs}/html/globals_vars.html (67%) rename {n4-flight-software => docs}/html/gps_8h_source.html (80%) rename {n4-flight-software => docs}/html/hierarchy.html (87%) create mode 100644 docs/html/hierarchy.js rename {n4-flight-software => docs}/html/include_2state__machine_8cpp.html (86%) rename {n4-flight-software => docs}/html/include_2state__machine_8h_source.html (80%) create mode 100644 docs/html/index.html rename {n4-flight-software => docs}/html/jquery.js (100%) rename {n4-flight-software => docs}/html/kalman_8h_source.html (79%) rename {n4-flight-software => docs}/html/logger_8h_source.html (88%) create mode 100644 docs/html/logo.jpg create mode 100644 docs/html/md__r_e_a_d_m_e.html create mode 100644 docs/html/md_contributing.html rename n4-flight-software/html/md__r_e_a_d_m_e.html => docs/html/md_n4-flight-software_2_r_e_a_d_m_e.html (75%) rename n4-flight-software/html/states_8h_source.html => docs/html/md_n4-flight-software_2src_2pin-assignment.html (71%) rename {n4-flight-software => docs}/html/menu.js (100%) rename {n4-flight-software => docs}/html/menudata.js (67%) rename {n4-flight-software => docs}/html/minus.svg (100%) rename {n4-flight-software => docs}/html/minusd.svg (100%) rename {n4-flight-software => docs}/html/mpu_8h_source.html (77%) rename {n4-flight-software => docs}/html/nav_f.png (100%) rename {n4-flight-software => docs}/html/nav_fd.png (100%) rename {n4-flight-software => docs}/html/nav_g.png (100%) rename {n4-flight-software => docs}/html/nav_h.png (100%) rename {n4-flight-software => docs}/html/nav_hd.png (100%) rename {n4-flight-software => docs}/html/navtree.css (100%) create mode 100644 docs/html/navtree.js create mode 100644 docs/html/navtreedata.js create mode 100644 docs/html/navtreeindex0.js rename {n4-flight-software => docs}/html/open.png (100%) rename {n4-flight-software => docs}/html/pages.html (72%) rename {n4-flight-software => docs}/html/plus.svg (100%) rename {n4-flight-software => docs}/html/plusd.svg (100%) rename {n4-flight-software => docs}/html/resize.js (100%) create mode 100644 docs/html/search/all_0.js create mode 100644 docs/html/search/all_1.js create mode 100644 docs/html/search/all_10.js create mode 100644 docs/html/search/all_11.js create mode 100644 docs/html/search/all_12.js create mode 100644 docs/html/search/all_13.js create mode 100644 docs/html/search/all_14.js create mode 100644 docs/html/search/all_15.js create mode 100644 docs/html/search/all_16.js create mode 100644 docs/html/search/all_17.js create mode 100644 docs/html/search/all_18.js create mode 100644 docs/html/search/all_19.js create mode 100644 docs/html/search/all_1a.js create mode 100644 docs/html/search/all_1b.js create mode 100644 docs/html/search/all_1c.js create mode 100644 docs/html/search/all_1d.js create mode 100644 docs/html/search/all_1e.js create mode 100644 docs/html/search/all_1f.js create mode 100644 docs/html/search/all_2.js create mode 100644 docs/html/search/all_3.js create mode 100644 docs/html/search/all_4.js create mode 100644 docs/html/search/all_5.js rename n4-flight-software/html/search/all_5.js => docs/html/search/all_6.js (76%) create mode 100644 docs/html/search/all_7.js create mode 100644 docs/html/search/all_8.js create mode 100644 docs/html/search/all_9.js create mode 100644 docs/html/search/all_a.js create mode 100644 docs/html/search/all_b.js rename n4-flight-software/html/search/all_9.js => docs/html/search/all_c.js (100%) create mode 100644 docs/html/search/all_d.js create mode 100644 docs/html/search/all_e.js create mode 100644 docs/html/search/all_f.js rename {n4-flight-software => docs}/html/search/classes_0.js (100%) rename {n4-flight-software => docs}/html/search/classes_1.js (100%) rename {n4-flight-software => docs}/html/search/classes_2.js (100%) rename {n4-flight-software => docs}/html/search/classes_3.js (100%) rename {n4-flight-software => docs}/html/search/classes_4.js (100%) rename {n4-flight-software => docs}/html/search/classes_5.js (100%) rename {n4-flight-software => docs}/html/search/classes_6.js (100%) rename {n4-flight-software => docs}/html/search/classes_7.js (100%) rename {n4-flight-software => docs}/html/search/classes_8.js (100%) rename {n4-flight-software => docs}/html/search/close.svg (100%) create mode 100644 docs/html/search/defines_0.js create mode 100644 docs/html/search/defines_1.js create mode 100644 docs/html/search/defines_2.js create mode 100644 docs/html/search/defines_3.js create mode 100644 docs/html/search/defines_4.js create mode 100644 docs/html/search/defines_5.js create mode 100644 docs/html/search/defines_6.js create mode 100644 docs/html/search/enums_0.js create mode 100644 docs/html/search/enumvalues_0.js create mode 100644 docs/html/search/enumvalues_1.js rename {n4-flight-software => docs}/html/search/files_0.js (100%) rename {n4-flight-software => docs}/html/search/files_1.js (100%) rename {n4-flight-software => docs}/html/search/files_2.js (57%) create mode 100644 docs/html/search/functions_0.js create mode 100644 docs/html/search/functions_1.js rename {n4-flight-software => docs}/html/search/functions_2.js (51%) create mode 100644 docs/html/search/functions_3.js rename {n4-flight-software => docs}/html/search/functions_4.js (100%) create mode 100644 docs/html/search/functions_5.js create mode 100644 docs/html/search/functions_6.js create mode 100644 docs/html/search/functions_7.js create mode 100644 docs/html/search/functions_8.js create mode 100644 docs/html/search/functions_9.js rename n4-flight-software/html/search/functions_6.js => docs/html/search/functions_a.js (77%) create mode 100644 docs/html/search/functions_b.js rename {n4-flight-software => docs}/html/search/mag.svg (100%) rename {n4-flight-software => docs}/html/search/mag_d.svg (100%) rename {n4-flight-software => docs}/html/search/mag_sel.svg (100%) rename {n4-flight-software => docs}/html/search/mag_seld.svg (100%) create mode 100644 docs/html/search/pages_0.js create mode 100644 docs/html/search/pages_1.js create mode 100644 docs/html/search/pages_2.js create mode 100644 docs/html/search/pages_3.js create mode 100644 docs/html/search/pages_4.js create mode 100644 docs/html/search/pages_5.js create mode 100644 docs/html/search/pages_6.js create mode 100644 docs/html/search/pages_7.js create mode 100644 docs/html/search/pages_8.js rename {n4-flight-software => docs}/html/search/search.css (100%) rename {n4-flight-software => docs}/html/search/search.js (100%) rename {n4-flight-software => docs}/html/search/searchdata.js (52%) rename {n4-flight-software => docs}/html/search/variables_0.js (100%) create mode 100644 docs/html/search/variables_1.js rename {n4-flight-software => docs}/html/search/variables_2.js (77%) create mode 100644 docs/html/search/variables_3.js rename n4-flight-software/html/search/all_6.js => docs/html/search/variables_4.js (100%) rename n4-flight-software/html/search/variables_4.js => docs/html/search/variables_5.js (100%) rename n4-flight-software/html/search/variables_5.js => docs/html/search/variables_6.js (100%) rename n4-flight-software/html/search/all_a.js => docs/html/search/variables_7.js (100%) create mode 100644 docs/html/search/variables_8.js create mode 100644 docs/html/search/variables_9.js rename n4-flight-software/html/search/variables_7.js => docs/html/search/variables_a.js (100%) create mode 100644 docs/html/search/variables_b.js rename {n4-flight-software => docs}/html/sensors_8h_source.html (77%) rename {n4-flight-software => docs}/html/splitbar.png (100%) rename {n4-flight-software => docs}/html/splitbard.png (100%) create mode 100644 docs/html/src_2main_8cpp.html create mode 100644 docs/html/src_2main_8cpp.js create mode 100644 docs/html/states_8h.html create mode 100644 docs/html/states_8h_source.html rename {n4-flight-software => docs}/html/struct_acceleration___data-members.html (82%) rename {n4-flight-software => docs}/html/struct_acceleration___data.html (83%) rename {n4-flight-software => docs}/html/struct_altimeter___data-members.html (82%) rename {n4-flight-software => docs}/html/struct_altimeter___data.html (82%) rename {n4-flight-software => docs}/html/struct_filtered___data-members.html (78%) rename {n4-flight-software => docs}/html/struct_filtered___data.html (77%) rename {n4-flight-software => docs}/html/struct_g_p_s___data-members.html (81%) rename {n4-flight-software => docs}/html/struct_g_p_s___data.html (81%) rename {n4-flight-software => docs}/html/struct_gyroscope___data-members.html (80%) rename {n4-flight-software => docs}/html/struct_gyroscope___data.html (80%) rename {n4-flight-software => docs}/html/struct_telemetry___data-members.html (83%) rename {n4-flight-software => docs}/html/struct_telemetry___data.html (84%) rename {n4-flight-software => docs}/html/sync_off.png (100%) rename {n4-flight-software => docs}/html/sync_on.png (100%) rename {n4-flight-software => docs}/html/tab_a.png (100%) rename {n4-flight-software => docs}/html/tab_ad.png (100%) rename {n4-flight-software => docs}/html/tab_b.png (100%) rename {n4-flight-software => docs}/html/tab_bd.png (100%) rename {n4-flight-software => docs}/html/tab_h.png (100%) rename {n4-flight-software => docs}/html/tab_hd.png (100%) rename {n4-flight-software => docs}/html/tab_s.png (100%) rename {n4-flight-software => docs}/html/tab_sd.png (100%) rename {n4-flight-software => docs}/html/tabs.css (100%) rename {n4-flight-software => docs}/html/test_2state__machine_8cpp.html (72%) rename {n4-flight-software => docs}/html/test_2state__machine_8h_source.html (81%) rename {n4-flight-software => docs}/html/test__class_8h_source.html (78%) create mode 100644 flight-computer-pin-assignment-version-1.xlsx create mode 100644 logo.jpg create mode 100644 mainpage-backup create mode 100644 mainpage.txt delete mode 100644 n4-flight-software/html/files.html delete mode 100644 n4-flight-software/html/globals.html delete mode 100644 n4-flight-software/html/search/all_0.js delete mode 100644 n4-flight-software/html/search/all_1.js delete mode 100644 n4-flight-software/html/search/all_2.js delete mode 100644 n4-flight-software/html/search/all_3.js delete mode 100644 n4-flight-software/html/search/all_4.js delete mode 100644 n4-flight-software/html/search/all_7.js delete mode 100644 n4-flight-software/html/search/all_8.js delete mode 100644 n4-flight-software/html/search/all_b.js delete mode 100644 n4-flight-software/html/search/all_c.js delete mode 100644 n4-flight-software/html/search/all_d.js delete mode 100644 n4-flight-software/html/search/functions_0.js delete mode 100644 n4-flight-software/html/search/functions_1.js delete mode 100644 n4-flight-software/html/search/functions_3.js delete mode 100644 n4-flight-software/html/search/functions_5.js delete mode 100644 n4-flight-software/html/search/functions_7.js delete mode 100644 n4-flight-software/html/search/pages_0.js delete mode 100644 n4-flight-software/html/search/variables_1.js delete mode 100644 n4-flight-software/html/search/variables_3.js delete mode 100644 n4-flight-software/html/search/variables_6.js delete mode 100644 n4-flight-software/html/src_2main_8cpp.html create mode 100644 n4-flight-software/src/.main.cpp.un~ create mode 100644 n4-flight-software/src/.states.cpp.un~ create mode 100644 n4-flight-software/src/custom_time.cpp create mode 100644 n4-flight-software/src/custom_time.h rename n4-flight-software/src/{data-types.h => data_types.h} (100%) create mode 100644 n4-flight-software/src/img_1.png create mode 100644 n4-flight-software/src/pin_assignment.MD create mode 100644 n4-flight-software/src/states.cpp~ create mode 100644 n4-flight-software/src/states.h rename n4-flight-software/{system-logger/SystemLogLevels.h => src/system_log_levels.h} (77%) create mode 100644 n4-flight-software/src/system_logger.cpp create mode 100644 n4-flight-software/src/system_logger.h delete mode 100644 n4-flight-software/system-logger/SystemLogger.cpp delete mode 100644 n4-flight-software/system-logger/SystemLogger.h delete mode 100644 n4-flight-software/system-logger/logger-arduino/logger-arduino.ino delete mode 100644 n4-flight-software/system-logger/logger-console.cpp rename n4-flight-software/{src => test/log_time_fmt_test}/custom-time.h (75%) rename n4-flight-software/{src/custom-time.cpp => test/log_time_fmt_test/log_time_fmt_test.ino} (67%) diff --git a/.github/workflows/main.yml b/.github/workflows/doxygen-gh-pages.yml similarity index 75% rename from .github/workflows/main.yml rename to .github/workflows/doxygen-gh-pages.yml index 27099c4..51f363f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/doxygen-gh-pages.yml @@ -1,9 +1,9 @@ # This is a basic workflow to help you get started with Actions -name: Doxygen Action +name: Doxygen-Documentation # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the main branch +# events but only for the master branch on: push: branches: [ main ] @@ -19,19 +19,22 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - + + # build the doxygen documentation - name: Doxygen Action uses: mattnotmitt/doxygen-action@v1.1.0 with: # Path to Doxyfile - doxyfile-path: "./Doxyfile" # default is ./Doxyfile + doxyfile-path: ./Doxyfile # default is ./Doxyfile # Working directory - working-directory: "." # default is . + working-directory: . # default is . + # Deploy the HTML documentation to GitHub Pages - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} # Default Doxyfile build documentation to html directory. # Change the directory if changes in Doxyfile - publish_dir: ./html \ No newline at end of file + publish_dir: ./docs/html/ + publish_branch: gh-pages \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..8fe0ea1 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/../../../../../:\5th-year\project\N4-Flight-Software\.idea/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/N4-Flight-Software.iml b/.idea/N4-Flight-Software.iml new file mode 100644 index 0000000..bc83c75 --- /dev/null +++ b/.idea/N4-Flight-Software.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..578add8 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a7faf2c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/n4-flight-software/Doxyfile b/Doxyfile similarity index 99% rename from n4-flight-software/Doxyfile rename to Doxyfile index 8d502b8..2811e5b 100644 --- a/n4-flight-software/Doxyfile +++ b/Doxyfile @@ -48,20 +48,20 @@ PROJECT_NAME = "N4 Flight Software" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = N4 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "Flight software used on N4 flight computers for the Nakuja Project " +PROJECT_BRIEF = "Flight software used for the N4 flight computers" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = ./logo.jpg # With the PROJECT_ICON tag one can specify an icon that is included in the tabs # when the HTML document is shown. Doxygen will copy the logo to the output @@ -74,7 +74,7 @@ PROJECT_ICON = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = ./docs # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 # sub-directories (in 2 levels) under the output directory of each output format @@ -949,7 +949,9 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = +INPUT = mainpage.txt n4-flight-software +#INPUT += README.md +#USE_MDFILE_AS_MAINPAGE = README.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -1039,7 +1041,8 @@ FILE_PATTERNS = *.c \ *.vhdl \ *.ucf \ *.qsf \ - *.ice + *.ice \ + *.md # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -1756,7 +1759,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the # FULL_SIDEBAR option determines if the side bar is limited to only the treeview diff --git a/README.md b/README.md index f22526b..6a09c41 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ![Static Badge](https://img.shields.io/badge/Status-development-orange) ### Code documentation -The complete code documentation can be found here ()[] +The complete code documentation can be found here [N4 Flight Software Documentation](https://nakujaproject.com/N4-Flight-Software/) ### N4 Flight software requirements diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..13c2ffa --- /dev/null +++ b/contributing.md @@ -0,0 +1,195 @@ +# Contributing Guidelines + +*Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged!* :octocat: + +### Contents + +- [Code of Conduct](#book-code-of-conduct) +- [Asking Questions](#bulb-asking-questions) +- [Opening an Issue](#inbox_tray-opening-an-issue) +- [Feature Requests](#love_letter-feature-requests) +- [Triaging Issues](#mag-triaging-issues) +- [Submitting Pull Requests](#repeat-submitting-pull-requests) +- [Writing Commit Messages](#memo-writing-commit-messages) +- [Code Review](#white_check_mark-code-review) +- [Coding Style](#nail_care-coding-style) +- [Certificate of Origin](#medal_sports-certificate-of-origin) +- [Credits](#pray-credits) + +> **This guide serves to set clear expectations for everyone involved with the project so that we can improve it together while also creating a welcoming space for everyone to participate. Following these guidelines will help ensure a positive experience for contributors and maintainers.** + +## :book: Code of Conduct + +Please review our [Code of Conduct](https://github.com/jessesquires/.github/blob/main/CODE_OF_CONDUCT.md). It is in effect at all times. We expect it to be honored by everyone who contributes to this project. Acting like an asshole will not be tolerated. + +## :bulb: Asking Questions + +See our [Support Guide](https://github.com/jessesquires/.github/blob/main/SUPPORT.md). In short, GitHub issues are not the appropriate place to debug your specific project, but should be reserved for filing bugs and feature requests. + +## :inbox_tray: Opening an Issue + +Before [creating an issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue), check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first. + +### :lock: Reporting Security Issues + +Review our [Security Policy](https://github.com/jessesquires/.github/blob/main/SECURITY.md). **Do not** file a public issue for security vulnerabilities. + +### :beetle: Bug Reports and Other Issues + +A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report. :v: + +In short, since you are most likely a developer, **provide a ticket that you would like to receive**. + +- **Review the documentation and [Support Guide](https://github.com/jessesquires/.github/blob/main/SUPPORT.md)** before opening a new issue. + +- **Do not open a duplicate issue!** Search through existing issues to see if your issue has previously been reported. If your issue exists, comment with any additional information you have. You may simply note "I have this problem too", which helps prioritize the most common problems and requests. + +- **Prefer using [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)**, not comments, if you simply want to "+1" an existing issue. + +- **Fully complete the provided issue template.** The bug report template requests all the information we need to quickly and efficiently address your issue. Be clear, concise, and descriptive. Provide as much information as you can, including steps to reproduce, stack traces, compiler errors, library versions, OS versions, and screenshots (if applicable). + +- **Use [GitHub-flavored Markdown](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).** Especially put code blocks and console outputs in backticks (```). This improves readability. + +## :love_letter: Feature Requests + +Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted. We want to avoid [feature creep](https://en.wikipedia.org/wiki/Feature_creep). Your idea may be great, but also out-of-scope for the project. If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help! + +- **Do not open a duplicate feature request.** Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue. + +- **Fully complete the provided issue template.** The feature request template asks for all necessary information for us to begin a productive conversation. + +- Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation details if possible. + +## :mag: Triaging Issues + +You can triage issues which may include reproducing bug reports or asking for additional information, such as version numbers or reproduction instructions. Any help you can provide to quickly resolve an issue is very much appreciated! + +## :repeat: Submitting Pull Requests + +We **love** pull requests! Before [forking the repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended approach for solving the problem in the comments for an existing issue. + +For most contributions, after your first pull request is accepted and merged, you will be [invited to the project](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository) and given **push access**. :tada: + +*Note: All contributions will be licensed under the project's license.* + +- **Smaller is better.** Submit **one** pull request per bug fix or feature. A pull request should contain isolated changes pertaining to a single bug fix or feature implementation. **Do not** refactor or reformat code that is unrelated to your change. It is better to **submit many small pull requests** rather than a single large one. Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether. + +- **Coordinate bigger changes.** For large and non-trivial changes, open an issue to discuss a strategy with the maintainers. Otherwise, you risk doing a lot of work for nothing! + +- **Prioritize understanding over cleverness.** Write code clearly and concisely. Remember that source code usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be obvious to a reasonably skilled developer, otherwise you should add a comment that explains it. + +- **Follow existing coding style and conventions.** Keep your code consistent with the style, formatting, and conventions in the rest of the code base. When possible, these will be enforced with a linter. Consistency makes it easier to review and modify in the future. + +- **Include test coverage.** Add unit tests or UI tests when possible. Follow existing patterns for implementing tests. + +- **Update the example project** if one exists to exercise any new functionality you have added. + +- **Add documentation.** Document your changes with code doc comments or in existing guides. + +- **Update the CHANGELOG** for all enhancements and bug fixes. Include the corresponding issue number if one exists, and your GitHub username. (example: "- Fixed crash in profile view. #123 @jessesquires") + +- **Use the repo's default branch.** Branch from and [submit your pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to the repo's default branch. Usually this is `main`, but it could be `dev`, `develop`, or `master`. + +- **[Resolve any merge conflicts](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)** that occur. + +- **Promptly address any CI failures**. If your pull request fails to build or pass tests, please push another commit to fix it. + +- When writing comments, use properly constructed sentences, including punctuation. + +- Use spaces, not tabs. + +## :memo: Writing Commit Messages + +Please [write a great commit message](https://chris.beams.io/posts/git-commit/). + +1. Separate subject from body with a blank line +1. Limit the subject line to 50 characters +1. Capitalize the subject line +1. Do not end the subject line with a period +1. Use the imperative mood in the subject line (example: "Fix networking issue") +1. Wrap the body at about 72 characters +1. Use the body to explain **why**, *not what and how* (the code shows that!) +1. If applicable, prefix the title with the relevant component name. (examples: "[Docs] Fix typo", "[Profile] Fix missing avatar") + +``` +[TAG] Short summary of changes in 50 chars or less + +Add a more detailed explanation here, if necessary. Possibly give +some background about the issue being fixed, etc. The body of the +commit message can be several paragraphs. Further paragraphs come +after blank lines and please do proper word-wrap. + +Wrap it to about 72 characters or so. In some contexts, +the first line is treated as the subject of the commit and the +rest of the text as the body. The blank line separating the summary +from the body is critical (unless you omit the body entirely); +various tools like `log`, `shortlog` and `rebase` can get confused +if you run the two together. + +Explain the problem that this commit is solving. Focus on why you +are making this change as opposed to how or what. The code explains +how or what. Reviewers and your future self can read the patch, +but might not understand why a particular solution was implemented. +Are there side effects or other unintuitive consequences of this +change? Here's the place to explain them. + + - Bullet points are okay, too + + - A hyphen or asterisk should be used for the bullet, preceded + by a single space, with blank lines in between + +Note the fixed or relevant GitHub issues at the end: + +Resolves: #123 +See also: #456, #789 +``` + +## :white_check_mark: Code Review + +- **Review the code, not the author.** Look for and suggest improvements without disparaging or insulting the author. Provide actionable feedback and explain your reasoning. + +- **You are not your code.** When your code is critiqued, questioned, or constructively criticized, remember that you are not your code. Do not take code review personally. + +- **Always do your best.** No one writes bugs on purpose. Do your best, and learn from your mistakes. + +- Kindly note any violations to the guidelines specified in this document. + +## :nail_care: Coding Style + +Consistency is the most important. Following the existing style, formatting, and naming conventions of the file you are modifying and of the overall project. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance. + +For example, if all private properties are prefixed with an underscore `_`, then new ones you add should be prefixed in the same way. Or, if methods are named using camelcase, like `thisIsMyNewMethod`, then do not diverge from that by writing `this_is_my_new_method`. You get the idea. If in doubt, please ask or search the codebase for something similar. + +When possible, style and format will be enforced with a linter. + +## :medal_sports: Certificate of Origin + +*Developer's Certificate of Origin 1.1* + +By making a contribution to this project, I certify that: + +> 1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or +> 1. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or +> 1. The contribution was provided directly to me by some other person who certified (1), (2) or (3) and I have not modified it. +> 1. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. + +## [No Brown M&M's](https://en.wikipedia.org/wiki/Van_Halen#Contract_riders) + +If you are reading this, bravo dear user and (hopefully) contributor for making it this far! You are awesome. :100: + +To confirm that you have read this guide and are following it as best as possible, **include this emoji at the top** of your issue or pull request: :black_heart: `:black_heart:` + +## :pray: Credits + +Written by [@jessesquires](https://github.com/jessesquires). + +**Please feel free to adopt this guide in your own projects. Fork it wholesale or remix it for your needs.** + +*Many of the ideas and prose for the statements in this document were based on or inspired by work from the following communities:* + +- [Alamofire](https://github.com/Alamofire/Alamofire/blob/master/CONTRIBUTING.md) +- [CocoaPods](https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md) +- [Docker](https://github.com/moby/moby/blob/master/CONTRIBUTING.md) +- [Linux](https://elinux.org/Developer_Certificate_Of_Origin) + +*We commend them for their efforts to facilitate collaboration in their projects.* diff --git a/n4-flight-software/html/_system_log_levels_8h_source.html b/docs/html/_system_log_levels_8h_source.html similarity index 77% rename from n4-flight-software/html/_system_log_levels_8h_source.html rename to docs/html/_system_log_levels_8h_source.html index 44a2b86..3aef95f 100644 --- a/n4-flight-software/html/_system_log_levels_8h_source.html +++ b/docs/html/_system_log_levels_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: system-logger/SystemLogLevels.h Source File +N4 Flight Software: n4-flight-software/system-logger/SystemLogLevels.h Source File + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
+ +
+
+
+
- -
-
SystemLogLevels.h
@@ -106,10 +115,13 @@
20
21#endif
- - + + diff --git a/n4-flight-software/html/_system_logger_8h_source.html b/docs/html/_system_logger_8h_source.html similarity index 81% rename from n4-flight-software/html/_system_logger_8h_source.html rename to docs/html/_system_logger_8h_source.html index f7c850b..cb4ae76 100644 --- a/n4-flight-software/html/_system_logger_8h_source.html +++ b/docs/html/_system_logger_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: system-logger/SystemLogger.h Source File +N4 Flight Software: n4-flight-software/system-logger/SystemLogger.h Source File + + @@ -24,10 +26,11 @@
-
N4 Flight Software +
N4 Flight Software N4
-
Flight software used on N4 flight computers for the Nakuja Project
+
Flight software used for the N4 flight computers
+ @@ -50,17 +53,29 @@ + +
+ +
+
+
+
- -
-
SystemLogger.h
@@ -110,10 +119,13 @@
Definition SystemLogger.h:7
const char * getLogLevelString(uint8_t log_level)
convert the log level to string
Definition SystemLogger.cpp:8
- - + + diff --git a/n4-flight-software/html/annotated.html b/docs/html/annotated.html similarity index 87% rename from n4-flight-software/html/annotated.html rename to docs/html/annotated.html index c2507c4..0f020cc 100644 --- a/n4-flight-software/html/annotated.html +++ b/docs/html/annotated.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
-
N4 Flight Software +
N4 Flight Software N4
-
Flight software used on N4 flight computers for the Nakuja Project
+
Flight software used for the N4 flight computers
+ @@ -50,19 +53,29 @@ -
+
+ +
+
+
+
- -
+ + diff --git a/docs/html/annotated_dup.js b/docs/html/annotated_dup.js new file mode 100644 index 0000000..74f6807 --- /dev/null +++ b/docs/html/annotated_dup.js @@ -0,0 +1,16 @@ +var annotated_dup = +[ + [ "Acceleration_Data", "struct_acceleration___data.html", null ], + [ "Altimeter_Data", "struct_altimeter___data.html", null ], + [ "CustomGPS", "class_custom_g_p_s.html", null ], + [ "DataLogger", "class_data_logger.html", "class_data_logger" ], + [ "Filtered_Data", "struct_filtered___data.html", null ], + [ "GPS_Data", "struct_g_p_s___data.html", null ], + [ "Gyroscope_Data", "struct_gyroscope___data.html", null ], + [ "LoggerConsole", "class_logger_console.html", null ], + [ "MPU6050", "class_m_p_u6050.html", "class_m_p_u6050" ], + [ "State_machine", "class_state__machine.html", null ], + [ "SystemLogger", "class_system_logger.html", "class_system_logger" ], + [ "Telemetry_Data", "struct_telemetry___data.html", null ], + [ "Test", "class_test.html", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/bc_s.png b/docs/html/bc_s.png similarity index 100% rename from n4-flight-software/html/bc_s.png rename to docs/html/bc_s.png diff --git a/n4-flight-software/html/bc_sd.png b/docs/html/bc_sd.png similarity index 100% rename from n4-flight-software/html/bc_sd.png rename to docs/html/bc_sd.png diff --git a/n4-flight-software/html/class_custom_g_p_s.html b/docs/html/class_custom_g_p_s.html similarity index 75% rename from n4-flight-software/html/class_custom_g_p_s.html rename to docs/html/class_custom_g_p_s.html index 98b5e34..ba14fb8 100644 --- a/n4-flight-software/html/class_custom_g_p_s.html +++ b/docs/html/class_custom_g_p_s.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
-
N4 Flight Software +
N4 Flight Software N4
-
Flight software used on N4 flight computers for the Nakuja Project
+
Flight software used for the N4 flight computers
+ @@ -50,17 +53,29 @@ + +
+ +
+
+
+
-
-
CustomGPS Class Reference
@@ -99,13 +112,16 @@

Detailed Description

Implements GPS functions to get latitude and longitude


The documentation for this class was generated from the following file:
- - + + diff --git a/n4-flight-software/html/class_custom_g_p_s.png b/docs/html/class_custom_g_p_s.png similarity index 100% rename from n4-flight-software/html/class_custom_g_p_s.png rename to docs/html/class_custom_g_p_s.png diff --git a/n4-flight-software/html/class_data_logger-members.html b/docs/html/class_data_logger-members.html similarity index 84% rename from n4-flight-software/html/class_data_logger-members.html rename to docs/html/class_data_logger-members.html index 86aa10e..582944c 100644 --- a/n4-flight-software/html/class_data_logger-members.html +++ b/docs/html/class_data_logger-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
-
N4 Flight Software +
N4 Flight Software N4
-
Flight software used on N4 flight computers for the Nakuja Project
+
Flight software used for the N4 flight computers
+ @@ -50,17 +53,29 @@ + +
+ +
+
+
+
-
-
DataLogger Member List
@@ -101,10 +114,12 @@
-
N4 Flight Software +
N4 Flight Software N4
-
Flight software used on N4 flight computers for the Nakuja Project
+
Flight software used for the N4 flight computers
loggerTest()DataLogger
loggerWrite(telemetry_type_t)DataLogger
- - + + diff --git a/n4-flight-software/html/class_data_logger.html b/docs/html/class_data_logger.html similarity index 91% rename from n4-flight-software/html/class_data_logger.html rename to docs/html/class_data_logger.html index be72116..01a24b4 100644 --- a/n4-flight-software/html/class_data_logger.html +++ b/docs/html/class_data_logger.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
+ +
+
+
+
-
-
Public Member Functions | @@ -96,7 +109,7 @@
-
N4 Flight Software +
N4 Flight Software N4
-
Flight software used on N4 flight computers for the Nakuja Project
+
Flight software used for the N4 flight computers
- + @@ -307,14 +320,17 @@

logger.h -
  • src/logger.cpp
  • +
  • n4-flight-software/src/logger.h
  • +
  • n4-flight-software/src/logger.cpp
  • - - + + diff --git a/docs/html/class_data_logger.js b/docs/html/class_data_logger.js new file mode 100644 index 0000000..8e34e66 --- /dev/null +++ b/docs/html/class_data_logger.js @@ -0,0 +1,12 @@ +var class_data_logger = +[ + [ "DataLogger", "class_data_logger.html#a9ddfc501b4bd4f004f11854c3552d574", null ], + [ "loggerEquals", "class_data_logger.html#acb9bf3c62db1f28016d68d51efe25d43", null ], + [ "loggerFormat", "class_data_logger.html#a5e9756481c9c74167ba32ad7a479e8b3", null ], + [ "loggerInfo", "class_data_logger.html#a9a968317a7e3bb763d8cd551063e7348", null ], + [ "loggerInit", "class_data_logger.html#a0cf2853582b7f2194eb0024d3d6d4944", null ], + [ "loggerRead", "class_data_logger.html#a5a0deefb9372f1577636014a59025e6f", null ], + [ "loggerSpaces", "class_data_logger.html#aa2e189964fbebc28dc2a327fdccc5684", null ], + [ "loggerTest", "class_data_logger.html#ae8a69bf0cc965365057e93a164ca9239", null ], + [ "loggerWrite", "class_data_logger.html#a411ac6fd751d3a87cef0375fccaad028", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/class_logger_console-members.html b/docs/html/class_logger_console-members.html similarity index 81% rename from n4-flight-software/html/class_logger_console-members.html rename to docs/html/class_logger_console-members.html index 773dd81..1724ef0 100644 --- a/n4-flight-software/html/class_logger_console-members.html +++ b/docs/html/class_logger_console-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@

    Public Member Functions

     DataLogger (uint8_t cs_pin, uint8_t led_pin, char *filename, SerialFlashFile file, uint32_t filesize)
     DataLogger (uint8_t cs_pin, uint8_t led_pin, char *filename, SerialFlashFile file, uint32_t filesize)
     class constructor pass the chip select pin as a parameter for that class instance
     
    bool loggerInit ()
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    LoggerConsole Member List
    @@ -95,10 +108,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    writeToConsole(const time_t timestamp, const char *client, uint8_t log_level, const char *msg) (defined in LoggerConsole)LoggerConsoleinline
    writeToConsole(const uint32_t timestamp, const char *client, uint8_t log_level, const char *msg) (defined in SystemLogger)SystemLogger
    - - + + diff --git a/n4-flight-software/html/class_logger_console.html b/docs/html/class_logger_console.html similarity index 83% rename from n4-flight-software/html/class_logger_console.html rename to docs/html/class_logger_console.html index 66180a6..9192b39 100644 --- a/n4-flight-software/html/class_logger_console.html +++ b/docs/html/class_logger_console.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Member Functions | @@ -116,13 +129,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this class was generated from the following file: - - + + diff --git a/n4-flight-software/html/class_logger_console.png b/docs/html/class_logger_console.png similarity index 100% rename from n4-flight-software/html/class_logger_console.png rename to docs/html/class_logger_console.png diff --git a/n4-flight-software/html/class_m_p_u6050-members.html b/docs/html/class_m_p_u6050-members.html similarity index 91% rename from n4-flight-software/html/class_m_p_u6050-members.html rename to docs/html/class_m_p_u6050-members.html index 646f3ad..500c0d8 100644 --- a/n4-flight-software/html/class_m_p_u6050-members.html +++ b/docs/html/class_m_p_u6050-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    MPU6050 Member List
    @@ -123,10 +136,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    temp (defined in MPU6050)MPU6050
    temp_real (defined in MPU6050)MPU6050
    - - + + diff --git a/n4-flight-software/html/class_m_p_u6050.html b/docs/html/class_m_p_u6050.html similarity index 94% rename from n4-flight-software/html/class_m_p_u6050.html rename to docs/html/class_m_p_u6050.html index 67f98a3..f362e74 100644 --- a/n4-flight-software/html/class_m_p_u6050.html +++ b/docs/html/class_m_p_u6050.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    @@ -296,14 +309,17 @@

    mpu.h -
  • src/mpu.cpp
  • +
  • n4-flight-software/src/mpu.h
  • +
  • n4-flight-software/src/mpu.cpp
  • - - + + diff --git a/docs/html/class_m_p_u6050.js b/docs/html/class_m_p_u6050.js new file mode 100644 index 0000000..f57a7cc --- /dev/null +++ b/docs/html/class_m_p_u6050.js @@ -0,0 +1,9 @@ +var class_m_p_u6050 = +[ + [ "filterImu", "class_m_p_u6050.html#aed4696b264b467844771ef28b274541b", null ], + [ "getPitch", "class_m_p_u6050.html#aa8d0edd31d2892d6703b4dce77d4dfc7", null ], + [ "getRoll", "class_m_p_u6050.html#adcecd29f4445b6670aafa2452a26f197", null ], + [ "readXAcceleration", "class_m_p_u6050.html#a63bb7b9f83eca4c2debdd0dfa7991865", null ], + [ "readYAcceleration", "class_m_p_u6050.html#ab34bd3131afe39a6f5178f46ec63a0e7", null ], + [ "readZAcceleration", "class_m_p_u6050.html#a18bf4368cc536ba0da3d41bdd4241be8", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/class_state__machine-members.html b/docs/html/class_state__machine-members.html similarity index 85% rename from n4-flight-software/html/class_state__machine-members.html rename to docs/html/class_state__machine-members.html index d48a1b6..b2f02a2 100644 --- a/n4-flight-software/html/class_state__machine-members.html +++ b/docs/html/class_state__machine-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    State_machine Member List
    @@ -101,10 +114,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    pre_flight() (defined in State_machine)State_machine
    State_machine() (defined in State_machine)State_machine
    - - + + diff --git a/n4-flight-software/html/class_state__machine.html b/docs/html/class_state__machine.html similarity index 83% rename from n4-flight-software/html/class_state__machine.html rename to docs/html/class_state__machine.html index 61e4f20..bd312c3 100644 --- a/n4-flight-software/html/class_state__machine.html +++ b/docs/html/class_state__machine.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Member Functions | @@ -120,15 +133,18 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this class was generated from the following files: - - + + diff --git a/n4-flight-software/html/class_system_logger-members.html b/docs/html/class_system_logger-members.html similarity index 79% rename from n4-flight-software/html/class_system_logger-members.html rename to docs/html/class_system_logger-members.html index 5a42764..9350d34 100644 --- a/n4-flight-software/html/class_system_logger-members.html +++ b/docs/html/class_system_logger-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    SystemLogger Member List
    @@ -94,10 +107,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    getLogLevelString(uint8_t log_level)SystemLogger
    writeToConsole(const uint32_t timestamp, const char *client, uint8_t log_level, const char *msg) (defined in SystemLogger)SystemLogger
    - - + + diff --git a/n4-flight-software/html/class_system_logger.html b/docs/html/class_system_logger.html similarity index 79% rename from n4-flight-software/html/class_system_logger.html rename to docs/html/class_system_logger.html index 8e0fd36..6425537 100644 --- a/n4-flight-software/html/class_system_logger.html +++ b/docs/html/class_system_logger.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Member Functions | @@ -112,14 +125,17 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this class was generated from the following files: - - + + diff --git a/docs/html/class_system_logger.js b/docs/html/class_system_logger.js new file mode 100644 index 0000000..43c3c75 --- /dev/null +++ b/docs/html/class_system_logger.js @@ -0,0 +1,4 @@ +var class_system_logger = +[ + [ "getLogLevelString", "class_system_logger.html#ad6feeadde357832516761347ff4cf25c", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/class_system_logger.png b/docs/html/class_system_logger.png similarity index 100% rename from n4-flight-software/html/class_system_logger.png rename to docs/html/class_system_logger.png diff --git a/n4-flight-software/html/class_test-members.html b/docs/html/class_test-members.html similarity index 79% rename from n4-flight-software/html/class_test-members.html rename to docs/html/class_test-members.html index 9481b9d..c9149a8 100644 --- a/n4-flight-software/html/class_test-members.html +++ b/docs/html/class_test-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Test Member List
    @@ -94,10 +107,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    foo() (defined in Test)Test
    y (defined in Test)Test
    - - + + diff --git a/n4-flight-software/html/class_test.html b/docs/html/class_test.html similarity index 79% rename from n4-flight-software/html/class_test.html rename to docs/html/class_test.html index 13e6760..d3f7f8d 100644 --- a/n4-flight-software/html/class_test.html +++ b/docs/html/class_test.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Member Functions | @@ -106,13 +119,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this class was generated from the following file: - - + + diff --git a/n4-flight-software/html/classes.html b/docs/html/classes.html similarity index 84% rename from n4-flight-software/html/classes.html rename to docs/html/classes.html index fc28fd0..0974213 100644 --- a/n4-flight-software/html/classes.html +++ b/docs/html/classes.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    - -
    + + diff --git a/n4-flight-software/html/clipboard.js b/docs/html/clipboard.js similarity index 100% rename from n4-flight-software/html/clipboard.js rename to docs/html/clipboard.js diff --git a/n4-flight-software/html/closed.png b/docs/html/closed.png similarity index 100% rename from n4-flight-software/html/closed.png rename to docs/html/closed.png diff --git a/n4-flight-software/html/cookie.js b/docs/html/cookie.js similarity index 100% rename from n4-flight-software/html/cookie.js rename to docs/html/cookie.js diff --git a/n4-flight-software/html/custom-time_8h.html b/docs/html/custom-time_8h.html similarity index 67% rename from n4-flight-software/html/custom-time_8h.html rename to docs/html/custom-time_8h.html index 73bded9..e8a9790 100644 --- a/n4-flight-software/html/custom-time_8h.html +++ b/docs/html/custom-time_8h.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/custom-time.h File Reference +N4 Flight Software: n4-flight-software/src/custom-time.h File Reference + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    +Functions
    custom-time.h File Reference
    @@ -107,21 +115,6 @@
    -
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    char * convertTimestamp (unsigned long)
     convert time in millisecsonds to minutes, seconds and time that are human readable
     
    - - - - - - - - -

    -Variables

    -char tstamp [50]
     
    -int minute =0
     
    -int sec =0
     
    -int msec =0
     

    Detailed Description

    This file defeines functions needed for time conversions for data logging.

    @@ -154,10 +147,13 @@

    + + diff --git a/docs/html/custom-time_8h.js b/docs/html/custom-time_8h.js new file mode 100644 index 0000000..6a50271 --- /dev/null +++ b/docs/html/custom-time_8h.js @@ -0,0 +1,4 @@ +var custom_time_8h = +[ + [ "convertTimestamp", "custom-time_8h.html#a3e93bbd5d89dde887f93f6264db8a49f", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/custom-time_8h_source.html b/docs/html/custom-time_8h_source.html similarity index 78% rename from n4-flight-software/html/custom-time_8h_source.html rename to docs/html/custom-time_8h_source.html index 4300b07..efea527 100644 --- a/n4-flight-software/html/custom-time_8h_source.html +++ b/docs/html/custom-time_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/custom-time.h Source File +N4 Flight Software: n4-flight-software/src/custom-time.h Source File + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    custom-time.h
    @@ -103,18 +112,18 @@
    9
    10#include <Arduino.h>
    11
    -
    12char tstamp[50]; // to hold a timestamp
    -
    13int minute=0, sec=0, msec=0;
    -
    14
    -
    15char* convertTimestamp(unsigned long);
    -
    16
    -
    17#endif
    -
    char * convertTimestamp(unsigned long)
    convert time in millisecsonds to minutes, seconds and time that are human readable
    Definition custom-time.cpp:14
    +
    12char* convertTimestamp(unsigned long);
    +
    13
    +
    14#endif
    +
    char * convertTimestamp(unsigned long)
    convert time in millisecsonds to minutes, seconds and time that are human readable
    Definition custom-time.cpp:17
    - - + + diff --git a/n4-flight-software/html/data-types_8h_source.html b/docs/html/data-types_8h_source.html similarity index 89% rename from n4-flight-software/html/data-types_8h_source.html rename to docs/html/data-types_8h_source.html index 94f4f77..0e53e5a 100644 --- a/n4-flight-software/html/data-types_8h_source.html +++ b/docs/html/data-types_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/data-types.h Source File +N4 Flight Software: n4-flight-software/src/data-types.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    data-types.h
    @@ -154,10 +163,13 @@
    Definition data-types.h:19
    Definition data-types.h:40
    - - + + diff --git a/n4-flight-software/html/defs_8h_source.html b/docs/html/defs_8h_source.html similarity index 64% rename from n4-flight-software/html/defs_8h_source.html rename to docs/html/defs_8h_source.html index 0df4844..0c6801a 100644 --- a/n4-flight-software/html/defs_8h_source.html +++ b/docs/html/defs_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: include/defs.h Source File +N4 Flight Software: n4-flight-software/include/defs.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    defs.h
    @@ -95,85 +104,80 @@
    1#ifndef DEFS_H
    2#define DEFS_H
    3
    -
    4// to select the telemetry transfer method used
    -
    5#define MQTT 1 // set this to 1 if using MQTT for telemetry transfer
    -
    6#define XBEE 1 // set to 1 if using XBEE for telemetry transfer
    -
    7
    -
    8#define GPS_BAUD_RATE 9600
    -
    9#define XBEE_BAUD_RATE // TODO: set to XBEE baud rate
    -
    10
    -
    11/* debug parameters for use during testing - set to 0 for production */
    -
    12#define DEBUG 1
    -
    13#define LOG_TO_MEMORY 0 // set to 1 during live testing
    -
    14#define DEBUG_TO_TERMINAL 1 // set to 0 for production
    -
    15
    -
    16#if DEBUG // DEBUG
    -
    17#define debug(x) Serial.print(x)
    -
    18#define debugln(x) Serial.println(x)
    -
    19#define debugf(x, y) Serial.printf(x, y)
    -
    20
    -
    21#else
    +
    4#include <Arduino.h>
    +
    5
    +
    6// to select the telemetry transfer method used
    +
    7#define MQTT 1 // set this to 1 if using MQTT for telemetry transfer
    +
    8#define XBEE 1 // set to 1 if using XBEE for telemetry transfer
    +
    9
    +
    10#define GPS_BAUD_RATE 9600
    +
    11#define XBEE_BAUD_RATE // TODO: set to XBEE baud rate
    +
    12
    +
    13/* debug parameters for use during testing - set to 0 for production */
    +
    14#define DEBUG 1
    +
    15#define LOG_TO_MEMORY 0 // set to 1 during live testing
    +
    16#define DEBUG_TO_TERMINAL 1 // set to 0 for production
    +
    17
    +
    18#if DEBUG
    +
    19#define debug(x) Serial.print(x)
    +
    20#define debugln(x) Serial.println(x)
    +
    21#define debugf(x, y) Serial.printf(x, y)
    22
    -
    23#define debug(x)
    -
    24#define debugln(x)
    -
    25#define debugf(x, y)
    -
    26#endif // DEBUG
    -
    27
    -
    28/* end of debug parameters */
    +
    23#else
    +
    24
    +
    25#define debug(x)
    +
    26#define debugln(x)
    +
    27#define debugf(x, y)
    +
    28#endif // DEBUG
    29
    -
    30/* timing constant */
    -
    31#define SETUP_DELAY 300
    -
    32#define TASK_DELAY 10
    -
    33
    -
    34/* flight constants */
    -
    35#define EJECTION_HEIGHT 1000 // eject at 1000m AGL
    -
    36#define SEA_LEVEL_PRESSURE 101325 // Assume the sea level pressure is 101325 Pascals - this can change with weather
    -
    37#define BASE_ALTITUDE 1417 /* this value is the altitude at rocket launch site */
    -
    38
    -
    39/* tasks constants */
    -
    40#define STACK_SIZE 2048
    -
    41#define ALTIMETER_QUEUE_LENGTH 10 // todo: change to 2 items
    -
    42#define GYROSCOPE_QUEUE_LENGTH 10
    -
    43#define GPS_QUEUE_LENGTH 24
    -
    44#define TELEMETRY_DATA_QUEUE_LENGTH 10
    -
    45#define FILTERED_DATA_QUEUE_LENGTH 10
    -
    46#define FLIGHT_STATES_QUEUE_LENGTH 1
    -
    47
    -
    48/* MQTT constants */
    -
    49#define MQTT_SERVER "192.168.78.19"
    -
    50#define MQTT_PORT 1882
    -
    51
    -
    52/* WIFI credentials */
    -
    53// const char* SSID = "Galaxy";
    -
    54// const char* PASSWORD = "luwa2131";
    -
    55
    -
    56/* ROCKET FLIGHT STATES */
    -
    57#define PRE_FLIGHT 0
    -
    58#define POWERED_FLIGHT 1
    -
    59#define COASTING 2
    -
    60#define APOGEE 3
    -
    61#define BALLISTIC_DESCENT 4
    -
    62#define PARACHUTE_DESCENT 5
    -
    63#define POST_FLIGHT 6
    -
    64#define UNDEFINED_STATE 7
    -
    65
    -
    66#define EJECTION_PIN 12
    -
    67/* LEDs for testing - remove on production */
    -
    68#define PRE_FLIGHT_LED 4
    +
    30/* end of debug parameters */
    +
    31
    +
    32/* timing constant */
    +
    33#define SETUP_DELAY 300
    +
    34#define TASK_DELAY 10
    +
    35
    +
    36/* flight constants */
    +
    37#define EJECTION_HEIGHT 1000 // eject at 1000m AGL
    +
    38#define SEA_LEVEL_PRESSURE 101325 // Assume the sea level pressure is 101325 Pascals - this can change with weather
    +
    39#define BASE_ALTITUDE 1417 /* this value is the altitude at rocket launch site */
    +
    40
    +
    41/* tasks constants */
    +
    42#define STACK_SIZE 2048
    +
    43#define ALTIMETER_QUEUE_LENGTH 10 // todo: change to 2 items
    +
    44#define GYROSCOPE_QUEUE_LENGTH 10
    +
    45#define GPS_QUEUE_LENGTH 24
    +
    46#define TELEMETRY_DATA_QUEUE_LENGTH 10
    +
    47#define FILTERED_DATA_QUEUE_LENGTH 10
    +
    48#define FLIGHT_STATES_QUEUE_LENGTH 1
    +
    49
    +
    50/* MQTT constants */
    +
    51#define MQTT_SERVER "192.168.78.19"
    +
    52#define MQTT_PORT 1882
    +
    53
    +
    54/* WIFI credentials */
    +
    55// const char* SSID = "Galaxy";
    +
    56// const char* PASSWORD = "luwa2131";
    +
    57
    +
    58#define EJECTION_PIN 12
    +
    59/* LEDs for testing - remove on production */
    +
    60#define PRE_FLIGHT_LED 4
    +
    61
    +
    62// number of readings to take while callibrating the sensor
    +
    63#define CALLIBRATION_READINGS 200
    +
    64
    +
    65#define TX 17
    +
    66#define RX 16
    +
    67
    +
    68#endif // DEFS_H
    69
    -
    70// number of readings to take while callibrating the sensor
    -
    71#define CALLIBRATION_READINGS 200
    -
    72
    -
    73#define TX 17
    -
    74#define RX 16
    -
    75
    -
    76#endif // DEFS_H
    -
    77
    - - + + diff --git a/docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.html b/docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.html new file mode 100644 index 0000000..4d45234 --- /dev/null +++ b/docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.html @@ -0,0 +1,126 @@ + + + + + + + +N4 Flight Software: n4-flight-software Directory Reference + + + + + + + + + + + + + + + +
    +
    +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    n4-flight-software Directory Reference
    +
    +
    + + + + + + + + + + +

    +Directories

     include
     
     src
     
     system-logger
     
     test
     
    +
    +
    + + + + diff --git a/docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.js b/docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.js new file mode 100644 index 0000000..3dd663a --- /dev/null +++ b/docs/html/dir_223c149f86d1b3369d43d9ec6c6d367c.js @@ -0,0 +1,7 @@ +var dir_223c149f86d1b3369d43d9ec6c6d367c = +[ + [ "include", "dir_7e35c193691ab641d32e52b2b4a47995.html", "dir_7e35c193691ab641d32e52b2b4a47995" ], + [ "src", "dir_d09072d1c94fe000833aa47d92501a74.html", "dir_d09072d1c94fe000833aa47d92501a74" ], + [ "system-logger", "dir_f60075fce1cd53b9027038118d904c9d.html", "dir_f60075fce1cd53b9027038118d904c9d" ], + [ "test", "dir_c7dea9aec5351af29cf9782f17ca3e80.html", "dir_c7dea9aec5351af29cf9782f17ca3e80" ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/dir_d44c64559bbebec7f509842c48db8b23.html b/docs/html/dir_7e35c193691ab641d32e52b2b4a47995.html similarity index 78% rename from n4-flight-software/html/dir_d44c64559bbebec7f509842c48db8b23.html rename to docs/html/dir_7e35c193691ab641d32e52b2b4a47995.html index 2dae5b0..7de5006 100644 --- a/n4-flight-software/html/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/docs/html/dir_7e35c193691ab641d32e52b2b4a47995.html @@ -5,12 +5,14 @@ -N4 Flight Software: include Directory Reference +N4 Flight Software: n4-flight-software/include Directory Reference + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    include Directory Reference
    @@ -107,10 +116,13 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     
    - - + + diff --git a/docs/html/dir_7e35c193691ab641d32e52b2b4a47995.js b/docs/html/dir_7e35c193691ab641d32e52b2b4a47995.js new file mode 100644 index 0000000..e519389 --- /dev/null +++ b/docs/html/dir_7e35c193691ab641d32e52b2b4a47995.js @@ -0,0 +1,8 @@ +var dir_7e35c193691ab641d32e52b2b4a47995 = +[ + [ "defs.h", "defs_8h_source.html", null ], + [ "kalman.h", "kalman_8h_source.html", null ], + [ "sensors.h", "sensors_8h_source.html", null ], + [ "state_machine.cpp", "include_2state__machine_8cpp.html", null ], + [ "state_machine.h", "include_2state__machine_8h_source.html", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/dir_13e138d54eb8818da29c3992edef070a.html b/docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.html similarity index 76% rename from n4-flight-software/html/dir_13e138d54eb8818da29c3992edef070a.html rename to docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.html index 84eda7e..a72e67d 100644 --- a/n4-flight-software/html/dir_13e138d54eb8818da29c3992edef070a.html +++ b/docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.html @@ -5,12 +5,14 @@ -N4 Flight Software: test Directory Reference +N4 Flight Software: n4-flight-software/test Directory Reference + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    test Directory Reference
    @@ -103,10 +112,13 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     
    - - + + diff --git a/docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.js b/docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.js new file mode 100644 index 0000000..df81cc2 --- /dev/null +++ b/docs/html/dir_c7dea9aec5351af29cf9782f17ca3e80.js @@ -0,0 +1,6 @@ +var dir_c7dea9aec5351af29cf9782f17ca3e80 = +[ + [ "state_machine.cpp", "test_2state__machine_8cpp.html", null ], + [ "state_machine.h", "test_2state__machine_8h_source.html", null ], + [ "test_class.h", "test__class_8h_source.html", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/html/dir_d09072d1c94fe000833aa47d92501a74.html similarity index 79% rename from n4-flight-software/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html rename to docs/html/dir_d09072d1c94fe000833aa47d92501a74.html index a6877f9..79a5e11 100644 --- a/n4-flight-software/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/docs/html/dir_d09072d1c94fe000833aa47d92501a74.html @@ -5,12 +5,14 @@ -N4 Flight Software: src Directory Reference +N4 Flight Software: n4-flight-software/src Directory Reference + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    src Directory Reference
    @@ -109,14 +118,17 @@
    - +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     
     mpu.h
     
     states.h
     states.h
     
    - - + + diff --git a/docs/html/dir_d09072d1c94fe000833aa47d92501a74.js b/docs/html/dir_d09072d1c94fe000833aa47d92501a74.js new file mode 100644 index 0000000..95b925e --- /dev/null +++ b/docs/html/dir_d09072d1c94fe000833aa47d92501a74.js @@ -0,0 +1,10 @@ +var dir_d09072d1c94fe000833aa47d92501a74 = +[ + [ "custom-time.h", "custom-time_8h.html", "custom-time_8h" ], + [ "data-types.h", "data-types_8h_source.html", null ], + [ "gps.h", "gps_8h_source.html", null ], + [ "logger.h", "logger_8h_source.html", null ], + [ "main.cpp", "src_2main_8cpp.html", "src_2main_8cpp" ], + [ "mpu.h", "mpu_8h_source.html", null ], + [ "states.h", "states_8h.html", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/dir_cef54c92003fea6141f5cbd24377e67d.html b/docs/html/dir_f60075fce1cd53b9027038118d904c9d.html similarity index 74% rename from n4-flight-software/html/dir_cef54c92003fea6141f5cbd24377e67d.html rename to docs/html/dir_f60075fce1cd53b9027038118d904c9d.html index 03a62bf..4bc611a 100644 --- a/n4-flight-software/html/dir_cef54c92003fea6141f5cbd24377e67d.html +++ b/docs/html/dir_f60075fce1cd53b9027038118d904c9d.html @@ -5,12 +5,14 @@ -N4 Flight Software: system-logger Directory Reference +N4 Flight Software: n4-flight-software/system-logger Directory Reference + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    system-logger Directory Reference
    @@ -101,10 +110,13 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     
    - - + + diff --git a/docs/html/dir_f60075fce1cd53b9027038118d904c9d.js b/docs/html/dir_f60075fce1cd53b9027038118d904c9d.js new file mode 100644 index 0000000..afa16fa --- /dev/null +++ b/docs/html/dir_f60075fce1cd53b9027038118d904c9d.js @@ -0,0 +1,5 @@ +var dir_f60075fce1cd53b9027038118d904c9d = +[ + [ "SystemLogger.h", "_system_logger_8h_source.html", null ], + [ "SystemLogLevels.h", "_system_log_levels_8h_source.html", null ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/doc.svg b/docs/html/doc.svg similarity index 100% rename from n4-flight-software/html/doc.svg rename to docs/html/doc.svg diff --git a/n4-flight-software/html/docd.svg b/docs/html/docd.svg similarity index 100% rename from n4-flight-software/html/docd.svg rename to docs/html/docd.svg diff --git a/n4-flight-software/html/doxygen.css b/docs/html/doxygen.css similarity index 100% rename from n4-flight-software/html/doxygen.css rename to docs/html/doxygen.css diff --git a/n4-flight-software/html/doxygen.svg b/docs/html/doxygen.svg similarity index 100% rename from n4-flight-software/html/doxygen.svg rename to docs/html/doxygen.svg diff --git a/n4-flight-software/html/doxygen_crawl.html b/docs/html/doxygen_crawl.html similarity index 60% rename from n4-flight-software/html/doxygen_crawl.html rename to docs/html/doxygen_crawl.html index 70deec8..53b3d46 100644 --- a/n4-flight-software/html/doxygen_crawl.html +++ b/docs/html/doxygen_crawl.html @@ -26,7 +26,9 @@ - + + + @@ -52,10 +54,11 @@ - - - - + + + + + @@ -86,6 +89,14 @@ + + + + + + + + @@ -93,6 +104,10 @@ + + + + @@ -101,6 +116,18 @@ + + + + + + + + + + + + @@ -132,50 +159,110 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + diff --git a/n4-flight-software/html/dynsections.js b/docs/html/dynsections.js similarity index 100% rename from n4-flight-software/html/dynsections.js rename to docs/html/dynsections.js diff --git a/docs/html/files.html b/docs/html/files.html new file mode 100644 index 0000000..cc56cec --- /dev/null +++ b/docs/html/files.html @@ -0,0 +1,139 @@ + + + + + + + +N4 Flight Software: File List + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    File List
    +
    +
    +
    Here is a list of all documented files with brief descriptions:
    +
    [detail level 123]
    + + + + + + + + + + + + + + + + + + + + + + +
      n4-flight-software
      include
     defs.h
     kalman.h
     sensors.h
     state_machine.cpp
     state_machine.h
      src
     custom-time.hThis file defeines functions needed for time conversions for data logging
     data-types.h
     gps.h
     logger.h
     main.cppThis contains the main driver code for the flight computer
     mpu.h
     states.h
      system-logger
     SystemLogger.h
     SystemLogLevels.h
      test
     state_machine.cpp
     state_machine.h
     test_class.h
    +
    +
    +
    + +
    + + diff --git a/docs/html/files_dup.js b/docs/html/files_dup.js new file mode 100644 index 0000000..980cebe --- /dev/null +++ b/docs/html/files_dup.js @@ -0,0 +1,4 @@ +var files_dup = +[ + [ "n4-flight-software", "dir_223c149f86d1b3369d43d9ec6c6d367c.html", "dir_223c149f86d1b3369d43d9ec6c6d367c" ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/folderclosed.svg b/docs/html/folderclosed.svg similarity index 100% rename from n4-flight-software/html/folderclosed.svg rename to docs/html/folderclosed.svg diff --git a/n4-flight-software/html/folderclosedd.svg b/docs/html/folderclosedd.svg similarity index 100% rename from n4-flight-software/html/folderclosedd.svg rename to docs/html/folderclosedd.svg diff --git a/n4-flight-software/html/folderopen.svg b/docs/html/folderopen.svg similarity index 100% rename from n4-flight-software/html/folderopen.svg rename to docs/html/folderopen.svg diff --git a/n4-flight-software/html/folderopend.svg b/docs/html/folderopend.svg similarity index 100% rename from n4-flight-software/html/folderopend.svg rename to docs/html/folderopend.svg diff --git a/n4-flight-software/html/functions.html b/docs/html/functions.html similarity index 83% rename from n4-flight-software/html/functions.html rename to docs/html/functions.html index 52dfd6e..450e8f6 100644 --- a/n4-flight-software/html/functions.html +++ b/docs/html/functions.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    readZAcceleration() : MPU6050
    - -
    + + diff --git a/n4-flight-software/html/functions_func.html b/docs/html/functions_func.html similarity index 83% rename from n4-flight-software/html/functions_func.html rename to docs/html/functions_func.html index 37d1f67..4a889df 100644 --- a/n4-flight-software/html/functions_func.html +++ b/docs/html/functions_func.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    readZAcceleration() : MPU6050
    - -
    + + diff --git a/docs/html/globals.html b/docs/html/globals.html new file mode 100644 index 0000000..0f4f112 --- /dev/null +++ b/docs/html/globals.html @@ -0,0 +1,243 @@ + + + + + + + +N4 Flight Software: File Members + + + + + + + + + + + + + + + +
    +
    +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented file members with links to the documentation:
    + +

    - a -

    + + +

    - b -

    + + +

    - c -

    + + +

    - d -

    + + +

    - e -

    + + +

    - f -

    + + +

    - g -

    + + +

    - h -

    + + +

    - i -

    + + +

    - l -

    + + +

    - m -

    + + +

    - n -

    + + +

    - o -

    + + +

    - p -

    + + +

    - r -

    + + +

    - s -

    + + +

    - t -

    + + +

    - v -

    +
    +
    + + + + diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html new file mode 100644 index 0000000..f0e4dae --- /dev/null +++ b/docs/html/globals_defs.html @@ -0,0 +1,121 @@ + + + + + + + +N4 Flight Software: File Members + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented macros with links to the documentation:
    +
    +
    + + + + diff --git a/n4-flight-software/html/index.html b/docs/html/globals_enum.html similarity index 70% rename from n4-flight-software/html/index.html rename to docs/html/globals_enum.html index 8551fce..f7d3eaa 100644 --- a/n4-flight-software/html/index.html +++ b/docs/html/globals_enum.html @@ -5,12 +5,14 @@ -N4 Flight Software: Main Page +N4 Flight Software: File Members + + @@ -24,10 +26,11 @@ + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    -
    -
    N4 Flight Software Documentation
    -
    - -
    + + diff --git a/docs/html/globals_eval.html b/docs/html/globals_eval.html new file mode 100644 index 0000000..2edf0ca --- /dev/null +++ b/docs/html/globals_eval.html @@ -0,0 +1,114 @@ + + + + + + + +N4 Flight Software: File Members + + + + + + + + + + + + + + + +
    +
    +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented enum values with links to the documentation:
    +
    +
    + + + + diff --git a/n4-flight-software/html/globals_func.html b/docs/html/globals_func.html similarity index 60% rename from n4-flight-software/html/globals_func.html rename to docs/html/globals_func.html index 8f5ed38..5907101 100644 --- a/n4-flight-software/html/globals_func.html +++ b/docs/html/globals_func.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    Here is a list of all documented functions with links to the documentation:
    - -
    + + diff --git a/n4-flight-software/html/globals_vars.html b/docs/html/globals_vars.html similarity index 67% rename from n4-flight-software/html/globals_vars.html rename to docs/html/globals_vars.html index 0c2c19e..c0aef94 100644 --- a/n4-flight-software/html/globals_vars.html +++ b/docs/html/globals_vars.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    Here is a list of all documented variables with links to the documentation:
    - -
    + + diff --git a/n4-flight-software/html/gps_8h_source.html b/docs/html/gps_8h_source.html similarity index 80% rename from n4-flight-software/html/gps_8h_source.html rename to docs/html/gps_8h_source.html index 82c741f..95c1a65 100644 --- a/n4-flight-software/html/gps_8h_source.html +++ b/docs/html/gps_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/gps.h Source File +N4 Flight Software: n4-flight-software/src/gps.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    gps.h
    @@ -112,10 +121,13 @@
    19#endif
    Definition gps.h:14
    - - + + diff --git a/n4-flight-software/html/hierarchy.html b/docs/html/hierarchy.html similarity index 87% rename from n4-flight-software/html/hierarchy.html rename to docs/html/hierarchy.html index 4cfab53..2a4aae2 100644 --- a/n4-flight-software/html/hierarchy.html +++ b/docs/html/hierarchy.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    - -
    + + diff --git a/docs/html/hierarchy.js b/docs/html/hierarchy.js new file mode 100644 index 0000000..dc6ccf9 --- /dev/null +++ b/docs/html/hierarchy.js @@ -0,0 +1,19 @@ +var hierarchy = +[ + [ "Acceleration_Data", "struct_acceleration___data.html", null ], + [ "Altimeter_Data", "struct_altimeter___data.html", null ], + [ "DataLogger", "class_data_logger.html", null ], + [ "Filtered_Data", "struct_filtered___data.html", null ], + [ "GPS_Data", "struct_g_p_s___data.html", null ], + [ "Gyroscope_Data", "struct_gyroscope___data.html", null ], + [ "MPU6050", "class_m_p_u6050.html", null ], + [ "State_machine", "class_state__machine.html", null ], + [ "SystemLogger", "class_system_logger.html", [ + [ "LoggerConsole", "class_logger_console.html", null ] + ] ], + [ "Telemetry_Data", "struct_telemetry___data.html", null ], + [ "Test", "class_test.html", null ], + [ "TinyGPSPlus", null, [ + [ "CustomGPS", "class_custom_g_p_s.html", null ] + ] ] +]; \ No newline at end of file diff --git a/n4-flight-software/html/include_2state__machine_8cpp.html b/docs/html/include_2state__machine_8cpp.html similarity index 86% rename from n4-flight-software/html/include_2state__machine_8cpp.html rename to docs/html/include_2state__machine_8cpp.html index b462dc1..b51c755 100644 --- a/n4-flight-software/html/include_2state__machine_8cpp.html +++ b/docs/html/include_2state__machine_8cpp.html @@ -5,12 +5,14 @@ -N4 Flight Software: include/state_machine.cpp File Reference +N4 Flight Software: n4-flight-software/include/state_machine.cpp File Reference + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    Functions | @@ -146,10 +155,13 @@
    Version
    0.1
    Date
    2023-03-28
    - -
    + + diff --git a/n4-flight-software/html/include_2state__machine_8h_source.html b/docs/html/include_2state__machine_8h_source.html similarity index 80% rename from n4-flight-software/html/include_2state__machine_8h_source.html rename to docs/html/include_2state__machine_8h_source.html index 6aae481..c654114 100644 --- a/n4-flight-software/html/include_2state__machine_8h_source.html +++ b/docs/html/include_2state__machine_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: include/state_machine.h Source File +N4 Flight Software: n4-flight-software/include/state_machine.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    state_machine.h
    @@ -112,10 +121,13 @@
    16#endif
    Definition state_machine.h:6
    - - + + diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 0000000..7483d4e --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,237 @@ + + + + + + + +N4 Flight Software: N4 Flight Software + + + + + + + + + + + + + + + +
    +
    +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    N4 Flight Software
    +
    +
    +

    +Introduction

    +

    Welcome to N4 Flight software docs. N4 Flight software is the code used to run N4 rockets at Nakuja Rocket Project. This code is built using FreeRTOS on the Arduino-ESP32 framework. It is designed to run either on AI-Thinker NodeMCU-ESP32 boards or ESP32-DOIT-DEVKIT V1.

    +

    +Major features

    +

    This firmare has been improved tremendously from the previous versions and includes the following features:

    +

    +Modularity

    +
      +
    • Most of the code is now contained in separate files each perfoming its own singular task to ensure code maintainability and testing.
    • +
    +

    +System Logging

    +
      +
    • We have built a system logger to keep track of each and every operation that the flight computer undertakes. This can be be retrieved later and reviewed for post-flight analysis
    • +
    +

    +HIL Testing Engine

    +
      +
    • A hardware-in-the-loop testing engine has been built into the flight software to allow us to "Test Like We Fly". This allows the flight computer to be tested and debugged way before flight day. Using an improvised XMODEM algorithm, we are able to upload test flight data and run necessary integration tests.
      Note
      See Integration and Testing Procedures for more info
      +
    • +
    +

    +Flight data logging

    +
      +
    • Flight data logging has been improved. Using an onboard SPI Flash memory, we are able log sensor data and flight states.
    • +
    +

    +Data dump interface

    +
      +
    • A data dumping hardware interface has been added to ease the retrieval of data post flight data.
    • +
    +

    +SAFE and FLIGHT modes

    +
      +
    • To prevent misfires during intergration and testing, this firmware implements SAFE_MODE that among others operations, disables the pyro-charges before POWERED_FLIGHT.
    • +
    +

    +XBEE, MQTT, LORA, WIFI telemetry selection

    +
      +
    • For backward and forward compatibility, we implement a method to allow choice of data telemetry protocol being used.
    • +
    +

    +Double ejection

    +
      +
    • We implement drogue and main chute ejection algorithms for successful vehicle recovery
    • +
    +

    +Building, Compilation and Downloading.

    +

    +System requirements

    +

    The following must be installed to build this release:
    +

      +
    1. PlatformIO Core. Download the core here: PlatformIO Core
    2. +
    3. PlatformIO IDE (recommended on VS Code but you can use IDE of your choice). To install PlatformIO IDE, follow the steps listed here: PlatformIO IDE
    4. +
    5. Serial Monitor tool e.g. Putty, Ai-Thinker Serial, RealTerm etc
    6. +
    +

    +Building the code

    +
      +
    • Clone the repo on your local machine
      git clone https://github.com/nakujaproject/N4-Flight-Software.git
      +
    • +
    +
    Note
    You can also download the folder as a zip file and extract it to a folder of your choice. But we recommend cloning it so you can keep up to date with the remote changes.
    +
      +
    • Change the directory to
      N4-Flight-Software\n4-flight-software
      +
      . This is the folder containing
      platformio.ini
      +
    • +
    • Install code dependencies
      pio pkg install
      +
    • +
    • Build
      pio run
      +
    • +
    • Connect your flight computer using a USB cable and make sure it is seen by your PC. It should be listed under Device Manager>Ports, if you are on windows
    • +
    +
    Note
    If your ESP32 is note recognized, you have to install USB-TO-TTL chip driver manually. For ESP32 Boards using CH340 chip, download the driver here CH340 Driver-SparkFun. Run the driver and it will be automatically installed on your machine. For ESP32 Boards using CP2102 chip, follow the procedure here CP2102-driver-POLOLU. Run the driver and it will be automatically installed on your machine.
    +
      +
    • Upload and run Close any open serial ports connected to that ESP32 and run the command below
      pio run -t upload
      +
      The firmware will be uploaded to the flight computer
    • +
    +

    +Hardware, pin assignment and peripherals

    +
    Note
    In development
    +

    +Integration and Testing Procedures

    +
    Note
    In development
    +

    +Contributors

    +

    Our thanks go to the following current and previous avionics team members for their contribution:

      +
    1. Edwin Mwiti
    2. +
    3. Junn Hope
    4. +
    5. Jones Kisaka
    6. +
    7. Ruth
    8. +
    9. Safa Osman
    10. +
    11. Tabby Achieng
    12. +
    13. Sharlyn
    14. +
    15. Pat
    16. +
    17. Emmanuel
    18. +
    19. Fortune
    20. +
    21. Newton
    22. +
    23. Rodney
    24. +
    25. Sammy
    26. +
    27. Michael Kimani
    28. +
    29. George Bange
    30. +
    31. Maisha
    32. +
    33. Naomi Chesang
    34. +
    35. Brian Munene
    36. +
    37. Samson Onyambu
    38. +
    39. Cate Kabura
    40. +
    41. Amos Korir
    42. +
    43. Graig Kipkorir
    44. +
    45. Jerry Mumo
    46. +
    47. Esther Mamai
    48. +
    49. Martin Simbona
    50. +
    51. Jeff Mboya
    52. +
    53. Washington Kamadi
    54. +
    55. Ian Muchiri
    56. +
    57. Kibandi
    58. +
    59. Emmanuel Obara
    60. +
    61. Victoria

      +

      Ad Astra!!

      +
    62. +
    +
    + +
    +
    + + + + diff --git a/n4-flight-software/html/jquery.js b/docs/html/jquery.js similarity index 100% rename from n4-flight-software/html/jquery.js rename to docs/html/jquery.js diff --git a/n4-flight-software/html/kalman_8h_source.html b/docs/html/kalman_8h_source.html similarity index 79% rename from n4-flight-software/html/kalman_8h_source.html rename to docs/html/kalman_8h_source.html index d16175d..0b8ea56 100644 --- a/n4-flight-software/html/kalman_8h_source.html +++ b/docs/html/kalman_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: include/kalman.h Source File +N4 Flight Software: n4-flight-software/include/kalman.h Source File + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    kalman.h
    @@ -108,10 +117,13 @@
    12
    Definition kalman.h:5
    - - + + diff --git a/n4-flight-software/html/logger_8h_source.html b/docs/html/logger_8h_source.html similarity index 88% rename from n4-flight-software/html/logger_8h_source.html rename to docs/html/logger_8h_source.html index 6161a0c..c5da1c9 100644 --- a/n4-flight-software/html/logger_8h_source.html +++ b/docs/html/logger_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/logger.h Source File +N4 Flight Software: n4-flight-software/src/logger.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    logger.h
    @@ -113,7 +122,7 @@
    30
    31
    32 public:
    -
    33 DataLogger(uint8_t cs_pin, uint8_t led_pin, char* filename, SerialFlashFile file, uint32_t filesize); // constructor
    +
    33 DataLogger(uint8_t cs_pin, uint8_t led_pin, char* filename, SerialFlashFile file, uint32_t filesize); // constructor
    34 bool loggerInit();
    35 void loggerFormat();
    36 void loggerInfo();
    @@ -137,15 +146,17 @@
    void loggerSpaces()
    helper function to print spaces for data formatting
    Definition logger.cpp:252
    void loggerEquals()
    helper function to print = for data formatting
    Definition logger.cpp:261
    bool loggerTest()
    test the flash memory write and read function by reading and writing a variable to it
    Definition logger.cpp:142
    -
    char filename[]
    Definition main.cpp:42
    -
    SerialFlashFile file
    Definition main.cpp:46
    -
    uint8_t cs_pin
    Definition main.cpp:40
    +
    char filename[]
    Definition main.cpp:518
    +
    SerialFlashFile file
    Definition main.cpp:522
    Definition data-types.h:40
    - - + + diff --git a/docs/html/logo.jpg b/docs/html/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..92c45fb23b35c439c7ac32c22f53eca43e3ca99e GIT binary patch literal 7287 zcmbW6XH-+sv*<&Y-a>C8C@4*&NezP16cCW!rHk|yAP@y1N)=F0st5>33B5=O9qH1W zQWB&JBnaUEAv}Elx9(f(eR}uK+4JR`*|X-i&aAy>_P&_ASOGEVY3XW#NJvOP4wnz; zViBYXA|oaJH!g+za!_2MpdcrwprN9oyh2AqM@LITOH0qd!bH!&%s@-a#LmRb3T9(t zqhsXYWCwGyfZ4$RoRE-R&LO9url6n()6>#}|J!oW0b;%aLVyrtB-cQs%p_#YBo{p( z0T76U;xgKQ0skK%A-#-|lIjXI4eg~tJrjtOgp7=ooa|rJm(~%N-$CTe6fA<$_b6G7 z9I3APf$zLb$-g3`QQgUAJdPEXdFmfUO~cN?$;EyBhKT6RTe5QU3U?KiH19vq($>+{ zGkIcaW^Q3=<>c(*>gMk8EFdr_I0PCR7X2zF7V-K`Tx#08_vslQK4yL{C@lI?TvGbA zrnauWp|Pp?TUU2aZ(slSfx(H%sp*;7x%q`vG-mDh`o`wgHtyi>;Sv5AI63{tMFJxG z57vK?{XbmHmt3Ue$N*CuYfgD@~b$>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A$A6uy>0NZ+dzmgc`;3l}fQm0C& z-Orzz0Zt|N81M~m?9jS=9pd1-{1!I9-%8uH$F}Kcw1x6d<+*9J=m>}Z-6FDuXw!60 z?Z^z)8}fPjTJ%lIazCOk`(>qD^3(dGP-E;3pPL_C?$N1}yx~oGnPy282XfGS?1Kw? z-MSGPqZrLp{5`z3rLpmo`+au;UKoxD*s#o>7(~2N{~AEB5c2B_Ej&}=brMT(@;Lmw ziF7nM85QcY6Q2rfV^L0IU*OX;ec0meTK~53*6$EeRq(D)D|9PQZzBus_F57Ksa&c| zmdM#ybgG?@xY3X{Oe-v175X?xC@@J~g@SfA^XN;A+H+Bg7i0YImL;H^Yk{gd7{1Mo zxJ?DEvIV!dJNDq#2ka@UXJxkhrs;T|=#sL<>NDCtT!Au!+LPf|Nrj@F6`B}&qjpiv z&qEHUX!8zx2>DIO<&)!Dbpz(a9~1p=7azlHKU>y%vNbbdtmsK;NC zA9h`zL;Rb2x9wCKYjI}ppU*!2k`>`2BRtxoX@KOuMy2Am9*~5RaB{x@F$YO#_MOJW zZyiV`-cF@g!d2Ki*J?3f$9^CLtEleApXb}<;RBx*CYitRn~3)2T&oqhyj*~H9~1@J z*OpFbCtDGWXXF@ZwiRa5ar&W7t3ai*eQoo>{$enow;}QtB|^@494o-lgJRMx+F`Mo zt9&2iRBCPU{qJI3wRM@WmSvOU`c?5cZz=<*+|IgSQ&?E=m)Gx7W+(X)l`DHxRCPT^ zL(?lTiLRqVn#8dv2#dsY{Zx&O^@HDKvJPNht|SuSwSa8DEnCzpAITtl`mKE*qSJdJ#u=qGvl&lz6e$0QT!|6Uz`lDs@Jrmwral#sYAeg!V( F{}%;&SQ-ET literal 0 HcmV?d00001 diff --git a/docs/html/md__r_e_a_d_m_e.html b/docs/html/md__r_e_a_d_m_e.html new file mode 100644 index 0000000..dae2f2c --- /dev/null +++ b/docs/html/md__r_e_a_d_m_e.html @@ -0,0 +1,343 @@ + + + + + + + +N4 Flight Software: N4 Flight Software Documentation + + + + + + + + + + + + + +
    +
    +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + + + + + +
    +
    N4 Flight Software +
    +
    Flight software used for the N4 flight computers
    +
    + + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    N4 Flight Software Documentation
    +
    +
    +

    Static Badge Static Badge Static Badge

    +

    +Code documentation

    +

    The complete code documentation can be found here ()[]

    +

    +N4 Flight software requirements

    +
    +

    +1. Rocket kinematics (acceleration, velocity)

    +

    a) Perform accurate calculation of acceleration and velocity from sensor data

    +

    b) Perform data filtering to get close to ideal simulated data

    +

    +2. Rocket altitude above ground level (AGL)

    +

    a) Determine the rocket's instantaneous AGL during flight

    +

    +3. Flight state transitions

    +

    a) Accurately switch to the corresponding flight state based on evaluated sensor data

    +

    +4. Data logging and storage

    +

    a) Collect and aggregate all sensor data and store it in an external flash memory for post-flight data recovery

    +

    b) Perform onboard system logging to indicate all events that occur during flight and store this in a separate system log file

    +

    +5. Onboard systems diagnostics

    +

    a) Troubleshoot onboard subsystems such as the sensors, batteries etc. and log to the system file

    +

    b) Package the system diagnostics results into telemetry packets for transmission to ground

    +

    +6. GPS location

    +

    a) Accurately determine the latitude, longitude and timestamp of the rocket using GPS for post flight recovery

    +

    +7. Rocket attitude (orientation ) determination

    +

    a) Calculate the roll and pitch of the rocket in space during flight

    +

    +8. Command and data handling

    +

    a) Receive commands sent from ground station

    +

    b) Decode commands sent from ground station

    +

    c) Acknowledge and perform command sent from the ground station

    +

    +9. Telemetry transmission

    +

    a) Reliably transmit the rocket's data to the ground station

    +

    b) Perform error detection and correction on the telemetry packets

    +

    +10. Video capture and streaming**

    +

    a) Capture video stream during flight

    +

    b) Record video stream to an onboard SD card for post-flight analysis

    +

    b) Transmit video stream to ground**

    +

    +Tasks and task creation

    +
    +

    +autotoc_md32

    +

    +Data queues and task communication

    +
    +

    +Telemetry and transmission to ground

    +
    +

    +Link budget calculation

    +

    +Telemetry packet structure

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Data Data type Size (bytes) Description
    record_number uint32_t 4 record number count
    state uint8_t 1 current flight state
    operation_mode uint8_t 1 current flight mode, whether SAFE or ARMED
    ax float 4 acceleration in the x-axis (m/s^2)
    ay float 4 acceleration in the y-axis (m/s^2)
    az float 4 acceleration in the z-axis (m/s^2)
    pitch float 4 pitch angle (deg)
    roll float 4 roll angle (deg)
    gx float 4 angular velocity along the x-axis (deg/sec)
    gy float 4 angular velocity along the y-axis (deg/sec)
    gz float 4 angular velocity along the z-axis (deg/sec)
    latitude double 8 geographical distance N or S of equator (deg)
    longitude double 8 geographical distance E or W of Greenwich Meridian (deg)
    gps_altitude uint16_t 2 altitude read by the onboard GPS (m)
    gps_time time_t 4 current time from the GPS (UTC)
    pressure float 4 pressure from the altimeter (mb)
    temperature uint8_t 1 temperature from the altimeter (deg C)
    altitude_agl uint16_t 2 height above ground level
    velocity float 4 velocity derived from the altimeter
    pyro1_state uint8_t 1 state of main chute pyro (whether ejected or active)
    pyro2_state uint8_t 1 state of drogue chute pyro (whether ejected or active)
    battery_voltage uint8_t 1 voltage of the battery during flight
    Total packet size 74 BYTES
    +

    +Data Logging and storage

    +
    +

    For logging and storage, we use two methods to ensure redundancy.

    +

    One is logging to an external SPI flash memory during flight, the WINBOND W25Q32JVSIQ2135, which is a 32Mbits(4 MB) storage chip. For redundancy, we add a microSD card into which data is dumped from the external SPI flash memory POST-FLIGHT.

    +

    The logging flowchart is shown below:

    +

    logger-flowchart

    +

    +Flash chip hardware tests

    +

    Using this library SerialFlashLib, we carried out flash chip hardware tests to make sure the MCU communicates as desired with the memory chip. The circuit diagram is shown below:

    +

    flash-cct

    +

    +PCB layout for the flash memory

    +

    To ensure maximum reliability of the flash memory on the PCB, follow the following techniques during layout:

    +

    The following snapshot from serial monitor shows that ESP32 was able to recognize the chip over the SPI channel.

    +

    flash-test

    +

    However, there is a discrepancy when we use this library to recognize this memory chip. This may be because the chip is a fake and therefore not recognized by this library. By default, the lib shows the size of the chip as 1MB, which is wrong.

    +

    If we use the SparkFun_SPI_SerialFlashChip library, we are able to recognize the chip as shown below.

    +

    flash-SFE

    +

    The flash chip is working okay from the tests above.

    +

    Now, since we want to access the flash memory in a file-system kind of way, where we can read and write FILES, we use the SerialFlash Library, even if the flash memory is not recognized by it. This will make it easier for us to access huge blocks of memory in chunks and avoid accessing the memory directly. In addition, we can erase files and use SD-like methods to access data.

    +

    The demonstration below received data from the serial monitor, and writes it to a file inside the flash memory.

    +

    First we test for file R/W.

    +

    +Known issue

    +

    When using SPI protocol on breadboard, it might fail to communicate with the peripheral device. This is because SPI is high-speed and is expected to be used with short traces on PCB. When testing this part, I experienced errors before i realized this issue. To correct this, I reduced the SPI communication speed from 50MHz to 20MHz so that I could access the R/W functions using the breadboard. More details are in reference #8 below.

    +

    Note: Make sure you change the speed to 20MHz for your files to be created. Change the speed in the SerialFlashChip.cpp near the top of the file (SPICONFIG)

    +

    The image below shows the response after I reduced the SPI speed: flash

    +

    Testing method

      +
    1. I created a file 4KB in size and named it test.csv.
    2. +
    3. Then generated dummy data using random() functions in Arduino.
    4. +
    5. I then appended this random data to the file, while checking the size being occupied by the file
    6. +
    7. Running the flash_read.ino file after data is done recording displays all the recorded data on the flash memory
    8. +
    +

    +How to recover the data

    +

    Use Nakuja Flight Data Recovery Tool to dump the recorded data as follows:

    +

    The image below shows the response after I reduced the SPI speed: flash

    +

    +GPS Operations

    +

    GPS is used to give us accurate location in terms of longitude, latitude, time and altitude. This data is useful for post-flight recovery and for apogee detection and verification. However, because of the low sample rate of GPS modules (1 Hz), we cannot use it reliably to log altitude data since rocketry is high speed.

    +

    gps

    +

    +Reading GPS data algorithm

    +

    We read GPS data using the TinyGPSPlus Library. The data of interest is the latitude, longitude, time and altitude. The algorithm is as follows:

    +
      +
    1. Create GPS data queue
    2. +
    3. Create the readGPS task
    4. +
    5. Inside the task, create a local gps_type_t variable to hold the sampled data
    6. +
    7. Read the latitude, longitude, time and altitude into the gps_type_t variable
    8. +
    9. Send this data to telemetry_queue
    10. +
    +

    +GPS fix time issues

    +

    The start of GPS can be cold or warm. Cold start means the GPS is starting from scratch, no prior satellite data exists, and here it takes much time to lock satellites and download satellite data. Once you initially download satellite data, the following connections take less time, referred to as warm-starts.

    +

    When using GPS, you will find that the time it takes to acquire a fix to GPS satellites depends on the cloud cover. If the cloud cover is too high, it takes longer to acquire a signal and vice-versa. During one of the tests of the GPS, it took ~2 min at 45% cloud cover to acquire signal.

    +

    During launch, we do not want to wait for infinity to get a GPS lock, so we implement a timeout as follows:

    +
    Consider the GPS_WAIT_TIME as 2 minutes (2000ms):
    +
    +
    1. Initialize a timeout variable and a lock_acquired boolean value
    +
    2. Check the value of the timeout_variable
    +
    3. Is it less than the GPS_WAIT_TIME?
    +
    4. If less than the wait time, continue waiting for GPS fix, if more than the GPS_WAIT_TIME, stop waiting for fix and return false
    +
    5. If the GPS data is available and successfully encoded via serial, set the lock_acquired booelan value to true
    +
    int value
    Parse the received serial command if it is a string.
    Definition main.cpp:388
    +

    This timeout will ensure we do not delay other sub-systems of the flight software from starting.

    +

    +Flowchart

    +

    gps-flowchart

    +

    +GPS tests

    +

    The following screenshots show the results of GPS tests during development. In the image below, the raw GPS coordinates are read and printed on the serial debugger:

    +

    gps-data

    +

    +State machine logic and operation

    +
    +

    +States

    +

    +State transition conditions

    +

    +State functions handling

    +

    +IMU

    +

    +Calculating acceleration from accelerometer

    +

    +Calculating velocity from accelerometer

    +

    The initial idea is to use integration. Since velocity is the first integral of acceleration. From the equation:

    v = u + at
    +

    So what we do to calculate the velocity is keep track of time, acceleration in the requires axis and then update the initial velocity. Consider the X axis:

    +
    Vx = Ux + ACCx*Sample_time
    +
    Ux = Vx
    +

    (Let the sample tme be 1ms (0.001 s))

    +

    Known issue is velocity drift: where the velocity does not get to zero even when the sensor is stationary. small errors in the measurement of acceleration and angular velocity are integrated into progressively larger errors in velocity, which are compounded into still greater errors in position

    +

    Article: IMU Velocity drift

    +

    However, after extensive research online, it was concluded that getting velocity from accelerometer is very innacurate and unreliable. Check out this reddit thread: Acceleration & velocity with MPU6050

    +

    Check this arduinoForum article too (ArduinForum) [https://forum.arduino.cc/t/integrating-acceleration-to-get-velocity/954731/8]

    +

    Following this, we decide to keep the accelerometer for measuring the acceleration and the rocket orientation.

    +

    +Data Filtering

    +
    +

    +Complementary filter

    +

    +Utility scripts

    +

    During development the following scripts might (and will) be useful.

    +

    +1. HEX converter

    +

    Converts string to HEX string and back. Built with python

    +
    +Requirements
    +
      +
    1. Python > 3.10
    2. +
    +

    The screenshot below shows the program running: hex-converter

    +
    +Usage
    +

    Open a terminal window in the folder containing the hex-converter.py file and run the following command:

    +
    python hex-converter.py
    +

    The screenshot above appears. Select your option and proceed. The program will output your string in HEX format.

    +

    +References and Error fixes

    +
      +
    1. (Wire LIbrary Device Lock) Confusing overload of Wire::begin · Issue #6616 · espressif/arduino-esp32 · GitHub
    2. +
    3. (Estimating velocity and altitude) [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4179067/]
    4. +
    5. [rocket orientation and velocity] (https://www.reddit.com/r/rocketry/comments/10q7j8m/using_accelerometers_for_rocket_attitude/)
    6. +
    7. https://cdn.shopify.com/s/files/1/1014/5789/files/Standard-ASCII-Table_large.jpg?10669400161723642407
    8. +
    9. https://www.codeproject.com/Articles/99547/Hex-strings-to-raw-data-and-back
    10. +
    11. https://cdn.shopify.com/s/files/1/1014/5789/files/Standard-ASCII-Table_large.jpg?10669400161723642407
    12. +
    13. https://www.geeksforgeeks.org/convert-a-string-to-hexadecimal-ascii-values/
    14. +
    15. (SPI Flash memory file creation issue on breadboard) https://forum.arduino.cc/t/esp32-and-winbond-w25q128jv-serial-flash-memory/861315/3
    16. +
    +
    +
    + + +
    + + diff --git a/docs/html/md_contributing.html b/docs/html/md_contributing.html new file mode 100644 index 0000000..735cb6c --- /dev/null +++ b/docs/html/md_contributing.html @@ -0,0 +1,273 @@ + + + + + + + +N4 Flight Software: Contributing Guidelines + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    N4 Flight Software +
    +
    Flight software used for the N4 flight computers
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    +
    +
    Contributing Guidelines
    +
    +
    +

    Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged! :octocat:

    +

    +Contents

    +
      +
    • Code of Conduct
    • +
    • Asking Questions
    • +
    • Opening an Issue
    • +
    • Feature Requests
    • +
    • Triaging Issues
    • +
    • Submitting Pull Requests
    • +
    • Writing Commit Messages
    • +
    • Code Review
    • +
    • Coding Style
    • +
    • Certificate of Origin
    • +
    • Credits
    • +
    +
    +

    This guide serves to set clear expectations for everyone involved with the project so that we can improve it together while also creating a welcoming space for everyone to participate. Following these guidelines will help ensure a positive experience for contributors and maintainers.

    +
    +

    +:book: Code of Conduct

    +

    Please review our Code of Conduct. It is in effect at all times. We expect it to be honored by everyone who contributes to this project. Acting like an asshole will not be tolerated.

    +

    +:bulb: Asking Questions

    +

    See our Support Guide. In short, GitHub issues are not the appropriate place to debug your specific project, but should be reserved for filing bugs and feature requests.

    +

    +:inbox_tray: Opening an Issue

    +

    Before creating an issue, check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first.

    +

    +:lock: Reporting Security Issues

    +

    Review our Security Policy. Do not file a public issue for security vulnerabilities.

    +

    +:beetle: Bug Reports and Other Issues

    +

    A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report. :v:

    +

    In short, since you are most likely a developer, provide a ticket that you would like to receive.

    +
      +
    • Review the documentation and Support Guide before opening a new issue.
    • +
    • Do not open a duplicate issue! Search through existing issues to see if your issue has previously been reported. If your issue exists, comment with any additional information you have. You may simply note "I have this problem too", which helps prioritize the most common problems and requests.
    • +
    • Prefer using reactions, not comments, if you simply want to "+1" an existing issue.
    • +
    • Fully complete the provided issue template. The bug report template requests all the information we need to quickly and efficiently address your issue. Be clear, concise, and descriptive. Provide as much information as you can, including steps to reproduce, stack traces, compiler errors, library versions, OS versions, and screenshots (if applicable).
    • +
    • Use GitHub-flavored Markdown. Especially put code blocks and console outputs in backticks (```). This improves readability.
    • +
    +

    +:love_letter: Feature Requests

    +

    Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted. We want to avoid feature creep. Your idea may be great, but also out-of-scope for the project. If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help!

    +
      +
    • Do not open a duplicate feature request. Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue.
    • +
    • Fully complete the provided issue template. The feature request template asks for all necessary information for us to begin a productive conversation.
    • +
    • Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation details if possible.
    • +
    +

    +:mag: Triaging Issues

    +

    You can triage issues which may include reproducing bug reports or asking for additional information, such as version numbers or reproduction instructions. Any help you can provide to quickly resolve an issue is very much appreciated!

    +

    +:repeat: Submitting Pull Requests

    +

    We love pull requests! Before forking the repo and creating a pull request for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended approach for solving the problem in the comments for an existing issue.

    +

    For most contributions, after your first pull request is accepted and merged, you will be invited to the project and given push access. :tada:

    +

    Note: All contributions will be licensed under the project's license.

    +
      +
    • Smaller is better. Submit one pull request per bug fix or feature. A pull request should contain isolated changes pertaining to a single bug fix or feature implementation. Do not refactor or reformat code that is unrelated to your change. It is better to submit many small pull requests rather than a single large one. Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether.
    • +
    • Coordinate bigger changes. For large and non-trivial changes, open an issue to discuss a strategy with the maintainers. Otherwise, you risk doing a lot of work for nothing!
    • +
    • Prioritize understanding over cleverness. Write code clearly and concisely. Remember that source code usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be obvious to a reasonably skilled developer, otherwise you should add a comment that explains it.
    • +
    • Follow existing coding style and conventions. Keep your code consistent with the style, formatting, and conventions in the rest of the code base. When possible, these will be enforced with a linter. Consistency makes it easier to review and modify in the future.
    • +
    • Include test coverage. Add unit tests or UI tests when possible. Follow existing patterns for implementing tests.
    • +
    • Update the example project if one exists to exercise any new functionality you have added.
    • +
    • Add documentation. Document your changes with code doc comments or in existing guides.
    • +
    • Update the CHANGELOG for all enhancements and bug fixes. Include the corresponding issue number if one exists, and your GitHub username. (example: "- Fixed crash in profile view. #123 @jessesquires")
    • +
    • Use the repo's default branch. Branch from and submit your pull request to the repo's default branch. Usually this is main, but it could be dev, develop, or master.
    • +
    • Resolve any merge conflicts that occur.
    • +
    • Promptly address any CI failures. If your pull request fails to build or pass tests, please push another commit to fix it.
    • +
    • When writing comments, use properly constructed sentences, including punctuation.
    • +
    • Use spaces, not tabs.
    • +
    +

    +:memo: Writing Commit Messages

    +

    Please write a great commit message.

    +
      +
    1. Separate subject from body with a blank line
    2. +
    +
      +
    1. Limit the subject line to 50 characters
    2. +
    +
      +
    1. Capitalize the subject line
    2. +
    +
      +
    1. Do not end the subject line with a period
    2. +
    +
      +
    1. Use the imperative mood in the subject line (example: "Fix networking issue")
    2. +
    +
      +
    1. Wrap the body at about 72 characters
    2. +
    +
      +
    1. Use the body to explain why, not what and how (the code shows that!)
    2. +
    +
      +
    1. If applicable, prefix the title with the relevant component name. (examples: "[Docs] Fix typo", "[Profile] Fix missing avatar")
    2. +
    +
    [TAG] Short summary of changes in 50 chars or less
    +
    +
    Add a more detailed explanation here, if necessary. Possibly give
    +
    some background about the issue being fixed, etc. The body of the
    +
    commit message can be several paragraphs. Further paragraphs come
    +
    after blank lines and please do proper word-wrap.
    +
    +
    Wrap it to about 72 characters or so. In some contexts,
    +
    the first line is treated as the subject of the commit and the
    +
    rest of the text as the body. The blank line separating the summary
    +
    from the body is critical (unless you omit the body entirely);
    +
    various tools like `log`, `shortlog` and `rebase` can get confused
    +
    if you run the two together.
    +
    +
    Explain the problem that this commit is solving. Focus on why you
    +
    are making this change as opposed to how or what. The code explains
    +
    how or what. Reviewers and your future self can read the patch,
    +
    but might not understand why a particular solution was implemented.
    +
    Are there side effects or other unintuitive consequences of this
    +
    change? Here's the place to explain them.
    +
    +
    - Bullet points are okay, too
    +
    +
    - A hyphen or asterisk should be used for the bullet, preceded
    +
    by a single space, with blank lines in between
    +
    +
    Note the fixed or relevant GitHub issues at the end:
    +
    +
    Resolves: #123
    +
    See also: #456, #789
    +

    +:white_check_mark: Code Review

    +
      +
    • Review the code, not the author. Look for and suggest improvements without disparaging or insulting the author. Provide actionable feedback and explain your reasoning.
    • +
    • You are not your code. When your code is critiqued, questioned, or constructively criticized, remember that you are not your code. Do not take code review personally.
    • +
    • Always do your best. No one writes bugs on purpose. Do your best, and learn from your mistakes.
    • +
    • Kindly note any violations to the guidelines specified in this document.
    • +
    +

    +:nail_care: Coding Style

    +

    Consistency is the most important. Following the existing style, formatting, and naming conventions of the file you are modifying and of the overall project. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance.

    +

    For example, if all private properties are prefixed with an underscore _, then new ones you add should be prefixed in the same way. Or, if methods are named using camelcase, like thisIsMyNewMethod, then do not diverge from that by writing this_is_my_new_method. You get the idea. If in doubt, please ask or search the codebase for something similar.

    +

    When possible, style and format will be enforced with a linter.

    +

    +:medal_sports: Certificate of Origin

    +

    Developer's Certificate of Origin 1.1

    +

    By making a contribution to this project, I certify that:

    +
    +

    ‍1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

      +
    1. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
    2. +
    +
      +
    1. The contribution was provided directly to me by some other person who certified (1), (2) or (3) and I have not modified it.
    2. +
    +
      +
    1. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
    2. +
    +
    +

    +No Brown M&M's

    +

    If you are reading this, bravo dear user and (hopefully) contributor for making it this far! You are awesome. :100:

    +

    To confirm that you have read this guide and are following it as best as possible, include this emoji at the top of your issue or pull request: :black_heart: :black_heart:

    +

    +:pray: Credits

    +

    Written by @jessesquires.

    +

    Please feel free to adopt this guide in your own projects. Fork it wholesale or remix it for your needs.

    +

    Many of the ideas and prose for the statements in this document were based on or inspired by work from the following communities:

    + +

    We commend them for their efforts to facilitate collaboration in their projects.

    +
    +
    + + +
    + + diff --git a/n4-flight-software/html/md__r_e_a_d_m_e.html b/docs/html/md_n4-flight-software_2_r_e_a_d_m_e.html similarity index 75% rename from n4-flight-software/html/md__r_e_a_d_m_e.html rename to docs/html/md_n4-flight-software_2_r_e_a_d_m_e.html index 40189e1..dbf084e 100644 --- a/n4-flight-software/html/md__r_e_a_d_m_e.html +++ b/docs/html/md_n4-flight-software_2_r_e_a_d_m_e.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    README
    - -
    + + diff --git a/n4-flight-software/html/states_8h_source.html b/docs/html/md_n4-flight-software_2src_2pin-assignment.html similarity index 71% rename from n4-flight-software/html/states_8h_source.html rename to docs/html/md_n4-flight-software_2src_2pin-assignment.html index 384564d..389be24 100644 --- a/n4-flight-software/html/states_8h_source.html +++ b/docs/html/md_n4-flight-software_2src_2pin-assignment.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/states.h Source File +N4 Flight Software: pin-assignment + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    -
    -
    states.h
    +
    +
    pin-assignment
    -
    1
    -
    - - +
    +
    + + diff --git a/n4-flight-software/html/menu.js b/docs/html/menu.js similarity index 100% rename from n4-flight-software/html/menu.js rename to docs/html/menu.js diff --git a/n4-flight-software/html/menudata.js b/docs/html/menudata.js similarity index 67% rename from n4-flight-software/html/menudata.js rename to docs/html/menudata.js index f42d491..71668bb 100644 --- a/n4-flight-software/html/menudata.js +++ b/docs/html/menudata.js @@ -35,6 +35,27 @@ var menudata={children:[ {text:"Files",url:"files.html",children:[ {text:"File List",url:"files.html"}, {text:"File Members",url:"globals.html",children:[ -{text:"All",url:"globals.html"}, +{text:"All",url:"globals.html",children:[ +{text:"a",url:"globals.html#index_a"}, +{text:"b",url:"globals.html#index_b"}, +{text:"c",url:"globals.html#index_c"}, +{text:"d",url:"globals.html#index_d"}, +{text:"e",url:"globals.html#index_e"}, +{text:"f",url:"globals.html#index_f"}, +{text:"g",url:"globals.html#index_g"}, +{text:"h",url:"globals.html#index_h"}, +{text:"i",url:"globals.html#index_i"}, +{text:"l",url:"globals.html#index_l"}, +{text:"m",url:"globals.html#index_m"}, +{text:"n",url:"globals.html#index_n"}, +{text:"o",url:"globals.html#index_o"}, +{text:"p",url:"globals.html#index_p"}, +{text:"r",url:"globals.html#index_r"}, +{text:"s",url:"globals.html#index_s"}, +{text:"t",url:"globals.html#index_t"}, +{text:"v",url:"globals.html#index_v"}]}, {text:"Functions",url:"globals_func.html"}, -{text:"Variables",url:"globals_vars.html"}]}]}]} +{text:"Variables",url:"globals_vars.html"}, +{text:"Enumerations",url:"globals_enum.html"}, +{text:"Enumerator",url:"globals_eval.html"}, +{text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/n4-flight-software/html/minus.svg b/docs/html/minus.svg similarity index 100% rename from n4-flight-software/html/minus.svg rename to docs/html/minus.svg diff --git a/n4-flight-software/html/minusd.svg b/docs/html/minusd.svg similarity index 100% rename from n4-flight-software/html/minusd.svg rename to docs/html/minusd.svg diff --git a/n4-flight-software/html/mpu_8h_source.html b/docs/html/mpu_8h_source.html similarity index 77% rename from n4-flight-software/html/mpu_8h_source.html rename to docs/html/mpu_8h_source.html index 45e5d77..e143c62 100644 --- a/n4-flight-software/html/mpu_8h_source.html +++ b/docs/html/mpu_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: src/mpu.h Source File +N4 Flight Software: n4-flight-software/src/mpu.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    mpu.h
    @@ -146,52 +155,55 @@
    52class MPU6050 {
    53 private:
    -
    54 uint8_t _address;
    -
    55 uint32_t _accel_fs_range;
    -
    56 uint32_t _gyro_fs_range;
    -
    57
    +
    54 uint8_t _address;
    +
    55 uint32_t _accel_fs_range;
    +
    56 uint32_t _gyro_fs_range;
    +
    57
    58 public:
    -
    59 // sensor data
    -
    60 int16_t acc_x, acc_y, acc_z; // raw acceleration values
    -
    61 float acc_x_real, acc_y_real, acc_z_real; // converted aceleration values
    -
    62 int16_t ang_vel_x, ang_vel_y, ang_vel_z;
    -
    63 float ang_vel_x_real, ang_vel_y_real, ang_vel_z_real; // converted angular velocity values
    -
    64 int16_t temp;
    -
    65 float temp_real;
    +
    59 // sensor data
    +
    60 int16_t acc_x, acc_y, acc_z; // raw acceleration values
    +
    61 float acc_x_real, acc_y_real, acc_z_real; // converted acceleration values
    +
    62 int16_t ang_vel_x, ang_vel_y, ang_vel_z;
    +
    63 float ang_vel_x_real, ang_vel_y_real, ang_vel_z_real; // converted angular velocity values
    +
    64 int16_t temp;
    +
    65 float temp_real;
    66
    -
    67 float pitch_angle, roll_angle;
    -
    68 float acc_x_ms, acc_y_ms, acc_z_ms; // acceleration in m/s^2
    +
    67 float pitch_angle, roll_angle;
    +
    68 float acc_x_ms, acc_y_ms, acc_z_ms; // acceleration in m/s^2
    69
    70
    -
    71 MPU6050(uint8_t address, uint32_t accel_fs_range, uint32_t gyro_fs_range);
    -
    72 void init();
    -
    73 float readXAcceleration();
    -
    74 float readYAcceleration();
    -
    75 float readZAcceleration();
    -
    76 float readXAngularVelocity();
    -
    77 float readYAngularVelocity();
    -
    78 float readZAngularVelocity();
    -
    79 float readTemperature();
    -
    80 void filterImu();
    -
    81 float getRoll();
    -
    82 float getPitch();
    +
    71 MPU6050(uint8_t address, uint32_t accel_fs_range, uint32_t gyro_fs_range);
    +
    72 void init();
    +
    73 float readXAcceleration();
    +
    74 float readYAcceleration();
    +
    75 float readZAcceleration();
    +
    76 float readXAngularVelocity();
    +
    77 float readYAngularVelocity();
    +
    78 float readZAngularVelocity();
    +
    79 float readTemperature();
    +
    80 void filterImu();
    +
    81 float getRoll();
    +
    82 float getPitch();
    83
    84};
    85
    86#endif
    Definition mpu.h:52
    -
    float readZAcceleration()
    Definition mpu.cpp:106
    -
    float readXAcceleration()
    Definition mpu.cpp:54
    -
    float getPitch()
    Definition mpu.cpp:150
    -
    float readYAcceleration()
    Definition mpu.cpp:80
    -
    float getRoll()
    Definition mpu.cpp:134
    -
    void filterImu()
    Definition mpu.cpp:166
    +
    float readZAcceleration()
    Definition mpu.cpp:109
    +
    float readXAcceleration()
    Definition mpu.cpp:57
    +
    float getPitch()
    Definition mpu.cpp:153
    +
    float readYAcceleration()
    Definition mpu.cpp:83
    +
    float getRoll()
    Definition mpu.cpp:137
    +
    void filterImu()
    Definition mpu.cpp:169
    - - + + diff --git a/n4-flight-software/html/nav_f.png b/docs/html/nav_f.png similarity index 100% rename from n4-flight-software/html/nav_f.png rename to docs/html/nav_f.png diff --git a/n4-flight-software/html/nav_fd.png b/docs/html/nav_fd.png similarity index 100% rename from n4-flight-software/html/nav_fd.png rename to docs/html/nav_fd.png diff --git a/n4-flight-software/html/nav_g.png b/docs/html/nav_g.png similarity index 100% rename from n4-flight-software/html/nav_g.png rename to docs/html/nav_g.png diff --git a/n4-flight-software/html/nav_h.png b/docs/html/nav_h.png similarity index 100% rename from n4-flight-software/html/nav_h.png rename to docs/html/nav_h.png diff --git a/n4-flight-software/html/nav_hd.png b/docs/html/nav_hd.png similarity index 100% rename from n4-flight-software/html/nav_hd.png rename to docs/html/nav_hd.png diff --git a/n4-flight-software/html/navtree.css b/docs/html/navtree.css similarity index 100% rename from n4-flight-software/html/navtree.css rename to docs/html/navtree.css diff --git a/docs/html/navtree.js b/docs/html/navtree.js new file mode 100644 index 0000000..9027ce6 --- /dev/null +++ b/docs/html/navtree.js @@ -0,0 +1,483 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function initNavTree(toroot,relpath) { + let navTreeSubIndices = []; + const ARROW_DOWN = '▼'; + const ARROW_RIGHT = '►'; + const NAVPATH_COOKIE_NAME = ''+'navpath'; + + const getData = function(varName) { + const i = varName.lastIndexOf('/'); + const n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/-/g,'_')); + } + + const stripPath = function(uri) { + return uri.substring(uri.lastIndexOf('/')+1); + } + + const stripPath2 = function(uri) { + const i = uri.lastIndexOf('/'); + const s = uri.substring(i+1); + const m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; + } + + const hashValue = function() { + return $(location).attr('hash').substring(1).replace(/[^\w-]/g,''); + } + + const hashUrl = function() { + return '#'+hashValue(); + } + + const pathName = function() { + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]/g, ''); + } + + const storeLink = function(link) { + if (!$("#nav-sync").hasClass('sync')) { + Cookie.writeSetting(NAVPATH_COOKIE_NAME,link,0); + } + } + + const deleteLink = function() { + Cookie.eraseSetting(NAVPATH_COOKIE_NAME); + } + + const cachedLink = function() { + return Cookie.readSetting(NAVPATH_COOKIE_NAME,''); + } + + const getScript = function(scriptName,func) { + const head = document.getElementsByTagName("head")[0]; + const script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); + } + + const createIndent = function(o,domNode,node) { + let level=-1; + let n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + const imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=ARROW_RIGHT; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=ARROW_RIGHT; + node.expanded = false; + } else { + expandNode(o, node, false, true); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + let span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } + } + + let animationInProgress = false; + + const gotoAnchor = function(anchor,aname) { + let pos, docContent = $('#doc-content'); + let ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || ancParent.hasClass('fieldtype') || + ancParent.is(':header')) { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + const dcOffset = docContent.offset().top; + const dcHeight = docContent.height(); + const dcScrHeight = docContent[0].scrollHeight + const dcScrTop = docContent.scrollTop(); + let dist = Math.abs(Math.min(pos-dcOffset,dcScrHeight-dcHeight-dcScrTop)); + animationInProgress = true; + docContent.animate({ + scrollTop: pos + dcScrTop - dcOffset + },Math.max(50,Math.min(500,dist)),function() { + animationInProgress=false; + if (anchor.parent().attr('class')=='memItemLeft') { + let rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname') { + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype') { + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + }); + } + } + + const newNode = function(o, po, text, link, childrenData, lastNode) { + const node = { + children : [], + childrenData : childrenData, + depth : po.depth + 1, + relpath : po.relpath, + isLast : lastNode, + li : document.createElement("li"), + parentNode : po, + itemDiv : document.createElement("div"), + labelSpan : document.createElement("span"), + label : document.createTextNode(text), + expanded : false, + childrenUL : null, + getChildrenUL : function() { + if (!this.childrenUL) { + this.childrenUL = document.createElement("ul"); + this.childrenUL.className = "children_ul"; + this.childrenUL.style.display = "none"; + this.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }, + }; + + node.itemDiv.className = "item"; + node.labelSpan.className = "label"; + createIndent(o,node.itemDiv,node); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + const a = document.createElement("a"); + node.labelSpan.appendChild(a); + po.getChildrenUL().appendChild(node.li); + a.appendChild(node.label); + if (link) { + let url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + const aname = '#'+link.split('#')[1]; + const srcPage = stripPath(pathName()); + const targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : aname; + a.onclick = function() { + storeLink(link); + aPPar = $(a).parent().parent(); + if (!aPPar.hasClass('selected')) { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + aPPar.addClass('selected'); + aPPar.attr('id','selected'); + } + const anchor = $(aname); + gotoAnchor(anchor,aname); + }; + } else { + a.href = url; + a.onclick = () => storeLink(link); + } + } else if (childrenData != null) { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + return node; + } + + const showRoot = function() { + const headerHeight = $("#top").height(); + const footerHeight = $("#nav-path").height(); + const windowHeight = $(window).height() - headerHeight - footerHeight; + (function() { // retry until we can scroll to the selected item + try { + const navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); + } + + const expandNode = function(o, node, imm, setFocus) { + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + expandNode(o, node, imm, setFocus); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + if (setFocus) { + $(node.expandToggle).focus(); + } + } + } + } + + const glowEffect = function(n,duration) { + n.addClass('glow').delay(duration).queue(function(next) { + $(this).removeClass('glow');next(); + }); + } + + const highlightAnchor = function() { + const aname = hashUrl(); + const anchor = $(aname); + gotoAnchor(anchor,aname); + } + + const selectAndHighlight = function(hash,n) { + let a; + if (hash) { + const link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + let topOffset=5; + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); + } + + const showNode = function(o, node, index, hash) { + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + showNode(o,node,index,hash); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + const n = node.children[o.breadcrumbs[index]]; + if (index+11 ? '#'+parts[1].replace(/[^\w-]/g,'') : ''; + } + if (hash.match(/^#l\d+$/)) { + const anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + const url=root+hash; + let i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function() { + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + }); + } + } + + const showSyncOff = function(n,relpath) { + n.html(''); + } + + const showSyncOn = function(n,relpath) { + n.html(''); + } + + const o = { + toroot : toroot, + node : { + childrenData : NAVTREE, + children : [], + childrenUL : document.createElement("ul"), + getChildrenUL : function() { return this.childrenUL }, + li : document.getElementById("nav-tree-contents"), + depth : 0, + relpath : relpath, + expanded : false, + isLast : true, + plus_img : document.createElement("span"), + }, + }; + o.node.li.appendChild(o.node.childrenUL); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = ARROW_RIGHT; + + const navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + + navSync.click(() => { + const navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } + }); + + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + + $(window).bind('hashchange', () => { + if (!animationInProgress) { + if (window.location.hash && window.location.hash.length>1) { + let a; + if ($(location).attr('hash')) { + const clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,19 +53,29 @@ -
    +
    + +
    +
    +
    +
    Here is a list of all related documentation pages:
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    - + +
     README
     README
     pin-assignment
    - - + + diff --git a/n4-flight-software/html/plus.svg b/docs/html/plus.svg similarity index 100% rename from n4-flight-software/html/plus.svg rename to docs/html/plus.svg diff --git a/n4-flight-software/html/plusd.svg b/docs/html/plusd.svg similarity index 100% rename from n4-flight-software/html/plusd.svg rename to docs/html/plusd.svg diff --git a/n4-flight-software/html/resize.js b/docs/html/resize.js similarity index 100% rename from n4-flight-software/html/resize.js rename to docs/html/resize.js diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js new file mode 100644 index 0000000..e4aa3b4 --- /dev/null +++ b/docs/html/search/all_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['acc_5fdata_0',['acc_data',['../src_2main_8cpp.html#a5db507f1ef37ed2d76f24c064e4e6a85',1,'main.cpp']]], + ['acceleration_5fdata_1',['Acceleration_Data',['../struct_acceleration___data.html',1,'']]], + ['ack_2',['ACK',['../src_2main_8cpp.html#a6f6489887e08bff4887d0bc5dcf214d8',1,'main.cpp']]], + ['altimeter_5fdata_3',['Altimeter_Data',['../struct_altimeter___data.html',1,'']]], + ['and_20downloading_4',['Building, Compilation and Downloading.',['../index.html#install_sec',1,'']]], + ['and_20flight_20modes_5',['SAFE and FLIGHT modes',['../index.html#step7',1,'']]], + ['and_20peripherals_6',['Hardware, pin assignment and peripherals',['../index.html#step13',1,'']]], + ['and_20testing_20procedures_7',['Integration and Testing Procedures',['../index.html#step14',1,'']]], + ['assignment_8',['pin-assignment',['../md_n4-flight-software_2src_2pin-assignment.html',1,'']]], + ['assignment_20and_20peripherals_9',['Hardware, pin assignment and peripherals',['../index.html#step13',1,'']]] +]; diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js new file mode 100644 index 0000000..d76ce37 --- /dev/null +++ b/docs/html/search/all_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['blink_5f200ms_0',['blink_200ms',['../src_2main_8cpp.html#a4139203bf745c4d38fd73bab228d571e',1,'main.cpp']]], + ['bmpinit_1',['BMPInit',['../src_2main_8cpp.html#a80d57b1ee5cb9d474465d3f8485f5bbc',1,'main.cpp']]], + ['building_20compilation_20and_20downloading_2',['Building, Compilation and Downloading.',['../index.html#install_sec',1,'']]], + ['building_20the_20code_3',['Building the code',['../index.html#step11',1,'']]], + ['buzz_4',['buzz',['../src_2main_8cpp.html#a28b1eb955e6e2f5e83599536f6bf4d2f',1,'main.cpp']]] +]; diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js new file mode 100644 index 0000000..4587e3c --- /dev/null +++ b/docs/html/search/all_10.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['telemetry_20selection_0',['XBEE, MQTT, LORA, WIFI telemetry selection',['../index.html#step8',1,'']]], + ['telemetry_5fdata_1',['Telemetry_Data',['../struct_telemetry___data.html',1,'']]], + ['telemetry_5fdata_5fqhandle_2',['telemetry_data_qHandle',['../src_2main_8cpp.html#a0ed5ea94df7417ea494d69ca56aab490',1,'main.cpp']]], + ['test_3',['Test',['../class_test.html',1,'']]], + ['test_5fstate_4',['TEST_STATE',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09d',1,'main.cpp']]], + ['testing_20engine_5',['HIL Testing Engine',['../index.html#step4',1,'']]], + ['testing_20procedures_6',['Integration and Testing Procedures',['../index.html#step14',1,'']]], + ['the_20code_7',['Building the code',['../index.html#step11',1,'']]], + ['transmit_5ftelemetry_5fbit_8',['TRANSMIT_TELEMETRY_BIT',['../src_2main_8cpp.html#a3101d6fdbdc9f9b1d5395471a32e23c9',1,'main.cpp']]] +]; diff --git a/docs/html/search/all_11.js b/docs/html/search/all_11.js new file mode 100644 index 0000000..6631942 --- /dev/null +++ b/docs/html/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value_0',['value',['../src_2main_8cpp.html#ac4f474c82e82cbb89ca7c36dd52be0ed',1,'main.cpp']]] +]; diff --git a/docs/html/search/all_12.js b/docs/html/search/all_12.js new file mode 100644 index 0000000..8dbce4a --- /dev/null +++ b/docs/html/search/all_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['wifi_20telemetry_20selection_0',['XBEE, MQTT, LORA, WIFI telemetry selection',['../index.html#step8',1,'']]] +]; diff --git a/docs/html/search/all_13.js b/docs/html/search/all_13.js new file mode 100644 index 0000000..804ef7c --- /dev/null +++ b/docs/html/search/all_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['xbee_20mqtt_20lora_20wifi_20telemetry_20selection_0',['XBEE, MQTT, LORA, WIFI telemetry selection',['../index.html#step8',1,'']]] +]; diff --git a/docs/html/search/all_14.js b/docs/html/search/all_14.js new file mode 100644 index 0000000..bca3a1d --- /dev/null +++ b/docs/html/search/all_14.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['layout_20for_20the_20flash_20memory_0',['PCB layout for the flash memory',['../md__r_e_a_d_m_e.html#autotoc_md42',1,'']]], + ['level_20agl_1',['2. Rocket altitude above ground level (AGL)',['../md__r_e_a_d_m_e.html#autotoc_md21',1,'']]], + ['link_20budget_20calculation_2',['Link budget calculation',['../md__r_e_a_d_m_e.html#autotoc_md37',1,'']]], + ['listdir_3',['listDir',['../src_2main_8cpp.html#a8841578fe91cace6206676f0e751cab5',1,'main.cpp']]], + ['location_4',['6. GPS location',['../md__r_e_a_d_m_e.html#autotoc_md25',1,'']]], + ['log_5fsample_5finterval_5',['log_sample_interval',['../src_2main_8cpp.html#affaa6e6cce540b233b04e558e3d164b2',1,'main.cpp']]], + ['loggerconsole_6',['LoggerConsole',['../class_logger_console.html',1,'']]], + ['loggerequals_7',['loggerEquals',['../class_data_logger.html#acb9bf3c62db1f28016d68d51efe25d43',1,'DataLogger']]], + ['loggerformat_8',['loggerFormat',['../class_data_logger.html#a5e9756481c9c74167ba32ad7a479e8b3',1,'DataLogger']]], + ['loggerinfo_9',['loggerInfo',['../class_data_logger.html#a9a968317a7e3bb763d8cd551063e7348',1,'DataLogger']]], + ['loggerinit_10',['loggerInit',['../class_data_logger.html#a0cf2853582b7f2194eb0024d3d6d4944',1,'DataLogger']]], + ['loggerread_11',['loggerRead',['../class_data_logger.html#a5a0deefb9372f1577636014a59025e6f',1,'DataLogger']]], + ['loggerspaces_12',['loggerSpaces',['../class_data_logger.html#aa2e189964fbebc28dc2a327fdccc5684',1,'DataLogger']]], + ['loggertest_13',['loggerTest',['../class_data_logger.html#ae8a69bf0cc965365057e93a164ca9239',1,'DataLogger']]], + ['loggerwrite_14',['loggerWrite',['../class_data_logger.html#a411ac6fd751d3a87cef0375fccaad028',1,'DataLogger']]], + ['logging_20and_20storage_15',['Data Logging and storage',['../md__r_e_a_d_m_e.html#autotoc_md39',1,'']]], + ['logging_20and_20storage_16',['4. Data logging and storage',['../md__r_e_a_d_m_e.html#autotoc_md23',1,'']]], + ['logic_20and_20operation_17',['State machine logic and operation',['../md__r_e_a_d_m_e.html#autotoc_md50',1,'']]], + ['logtomemory_18',['logToMemory',['../src_2main_8cpp.html#a7df146b43e503e23146e698154d5096d',1,'main.cpp']]], + ['loop_19',['loop',['../src_2main_8cpp.html#afe461d27b9c48d5921c00d521181f12f',1,'main.cpp']]] +]; diff --git a/docs/html/search/all_15.js b/docs/html/search/all_15.js new file mode 100644 index 0000000..6289afa --- /dev/null +++ b/docs/html/search/all_15.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['m_20m_20s_20a_0',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['m_20s_20a_1',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['machine_20logic_20and_20operation_2',['State machine logic and operation',['../md__r_e_a_d_m_e.html#autotoc_md50',1,'']]], + ['main_2ecpp_3',['main.cpp',['../src_2main_8cpp.html',1,'']]], + ['mainchutedeploy_4',['mainChuteDeploy',['../src_2main_8cpp.html#a9074d493ccf55d0cfa3acd2d173f665a',1,'main.cpp']]], + ['max_5fcmd_5flength_5',['MAX_CMD_LENGTH',['../src_2main_8cpp.html#a2e69b1ee7e19bfbe378c886f88e60fac',1,'main.cpp']]], + ['max_5fcsv_5flength_6',['MAX_CSV_LENGTH',['../src_2main_8cpp.html#a3aad00c42368296b28f72f623c446925',1,'main.cpp']]], + ['memory_7',['PCB layout for the flash memory',['../md__r_e_a_d_m_e.html#autotoc_md42',1,'']]], + ['messages_8',[':memo: Writing Commit Messages',['../md_contributing.html#autotoc_md10',1,'']]], + ['mpu6050_9',['MPU6050',['../class_m_p_u6050.html',1,'']]] +]; diff --git a/docs/html/search/all_16.js b/docs/html/search/all_16.js new file mode 100644 index 0000000..4006164 --- /dev/null +++ b/docs/html/search/all_16.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['n4_20flight_20software_20documentation_0',['N4 Flight Software Documentation',['../md__r_e_a_d_m_e.html',1,'']]], + ['n4_20flight_20software_20requirements_1',['N4 Flight software requirements',['../md__r_e_a_d_m_e.html#autotoc_md18',1,'']]], + ['nak_2',['NAK',['../src_2main_8cpp.html#a7ff3e502ffb5d509612c6c6741de45cc',1,'main.cpp']]], + ['nak_5finterval_3',['NAK_INTERVAL',['../src_2main_8cpp.html#a394162e74bbeb9bf67d3009cc38e0466',1,'main.cpp']]], + ['no_20brown_20m_20m_20s_20a_4',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]] +]; diff --git a/docs/html/search/all_17.js b/docs/html/search/all_17.js new file mode 100644 index 0000000..1346835 --- /dev/null +++ b/docs/html/search/all_17.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['of_20conduct_0',[':book: Code of Conduct',['../md_contributing.html#autotoc_md2',1,'']]], + ['of_20origin_1',[':medal_sports: Certificate of Origin',['../md_contributing.html#autotoc_md13',1,'']]], + ['onboard_20systems_20diagnostics_2',['5. Onboard systems diagnostics',['../md__r_e_a_d_m_e.html#autotoc_md24',1,'']]], + ['opening_20an_20issue_3',[':inbox_tray: Opening an Issue',['../md_contributing.html#autotoc_md4',1,'']]], + ['operation_4',['State machine logic and operation',['../md__r_e_a_d_m_e.html#autotoc_md50',1,'']]], + ['operation_5fmode_5',['operation_mode',['../src_2main_8cpp.html#a59b33f351d47779eaaff510227075be1',1,'main.cpp']]], + ['operations_6',['GPS Operations',['../md__r_e_a_d_m_e.html#autotoc_md45',1,'']]], + ['org_20wiki_20van_5fhalen_20contract_5friders_20no_20brown_20m_20m_20s_20a_7',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['orientation_20determination_8',['7. Rocket attitude (orientation ) determination',['../md__r_e_a_d_m_e.html#autotoc_md26',1,'']]], + ['origin_9',[':medal_sports: Certificate of Origin',['../md_contributing.html#autotoc_md13',1,'']]], + ['other_20issues_10',[':beetle: Bug Reports and Other Issues',['../md_contributing.html#autotoc_md6',1,'']]] +]; diff --git a/docs/html/search/all_18.js b/docs/html/search/all_18.js new file mode 100644 index 0000000..6616f5a --- /dev/null +++ b/docs/html/search/all_18.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['packet_20structure_0',['Telemetry packet structure',['../md__r_e_a_d_m_e.html#autotoc_md38',1,'']]], + ['parseserialnumeric_1',['ParseSerialNumeric',['../src_2main_8cpp.html#a102c6561be41c1aafb3bd6da443deed7',1,'main.cpp']]], + ['pcb_20layout_20for_20the_20flash_20memory_2',['PCB layout for the flash memory',['../md__r_e_a_d_m_e.html#autotoc_md42',1,'']]], + ['pin_20assignment_3',['pin-assignment',['../md_n4-flight-software_2src_2pin-assignment.html',1,'']]], + ['previous_5flog_5ftime_4',['previous_log_time',['../src_2main_8cpp.html#ac03f1f50d9e1452593353033c5b2b1b0',1,'main.cpp']]], + ['pull_20requests_5',[':repeat: Submitting Pull Requests',['../md_contributing.html#autotoc_md9',1,'']]] +]; diff --git a/docs/html/search/all_19.js b/docs/html/search/all_19.js new file mode 100644 index 0000000..031cd70 --- /dev/null +++ b/docs/html/search/all_19.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['questions_0',[':bulb: Asking Questions',['../md_contributing.html#autotoc_md3',1,'']]], + ['queues_20and_20task_20communication_1',['Data queues and task communication',['../md__r_e_a_d_m_e.html#autotoc_md33',1,'']]] +]; diff --git a/docs/html/search/all_1a.js b/docs/html/search/all_1a.js new file mode 100644 index 0000000..cf163e6 --- /dev/null +++ b/docs/html/search/all_1a.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['readaccelerationtask_0',['readAccelerationTask',['../src_2main_8cpp.html#a64be9ebbabd58a9b6d32b92ce607f2a6',1,'main.cpp']]], + ['readaltimetertask_1',['readAltimeterTask',['../src_2main_8cpp.html#a5947e71102388e9d5bfd09f8e97d668c',1,'main.cpp']]], + ['readgpstask_2',['readGPSTask',['../src_2main_8cpp.html#aa8ea491ed98b16bb5292ad184537f0b5',1,'main.cpp']]], + ['reading_20gps_20data_20algorithm_3',['Reading GPS data algorithm',['../md__r_e_a_d_m_e.html#autotoc_md46',1,'']]], + ['readme_4',['README',['../md_n4-flight-software_2_r_e_a_d_m_e.html',1,'']]], + ['readxacceleration_5',['readXAcceleration',['../class_m_p_u6050.html#a63bb7b9f83eca4c2debdd0dfa7991865',1,'MPU6050']]], + ['readyacceleration_6',['readYAcceleration',['../class_m_p_u6050.html#ab34bd3131afe39a6f5178f46ec63a0e7',1,'MPU6050']]], + ['readzacceleration_7',['readZAcceleration',['../class_m_p_u6050.html#a18bf4368cc536ba0da3d41bdd4241be8',1,'MPU6050']]], + ['receive_5ftest_5fdata_8',['RECEIVE_TEST_DATA',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09da078eb5ef5383567cdf7a9b36f49289d6',1,'main.cpp']]], + ['receivetestdataserialevent_9',['receiveTestDataSerialEvent',['../src_2main_8cpp.html#a61040c538622d7ad222068e37d96b52a',1,'main.cpp']]], + ['recover_20the_20data_10',['How to recover the data',['../md__r_e_a_d_m_e.html#autotoc_md44',1,'']]], + ['recv_5fdata_5fled_11',['recv_data_led',['../src_2main_8cpp.html#a7047c2926a0671d98c6f80a4015f2c14',1,'main.cpp']]], + ['red_5fled_12',['red_led',['../src_2main_8cpp.html#a450aab1d5c2ac17dd8a8fd346a47cf16',1,'main.cpp']]], + ['references_20and_20error_20fixes_13',['References and Error fixes',['../md__r_e_a_d_m_e.html#autotoc_md65',1,'']]], + ['reporting_20security_20issues_14',[':lock: Reporting Security Issues',['../md_contributing.html#autotoc_md5',1,'']]], + ['reports_20and_20other_20issues_15',[':beetle: Bug Reports and Other Issues',['../md_contributing.html#autotoc_md6',1,'']]], + ['requests_16',['Requests',['../md_contributing.html#autotoc_md7',1,':love_letter: Feature Requests'],['../md_contributing.html#autotoc_md9',1,':repeat: Submitting Pull Requests']]], + ['requirements_17',['Requirements',['../md__r_e_a_d_m_e.html#autotoc_md63',1,'']]], + ['requirements_18',['N4 Flight software requirements',['../md__r_e_a_d_m_e.html#autotoc_md18',1,'']]], + ['review_19',[':white_check_mark: Code Review',['../md_contributing.html#autotoc_md11',1,'']]], + ['rocket_20altitude_20above_20ground_20level_20agl_20',['2. Rocket altitude above ground level (AGL)',['../md__r_e_a_d_m_e.html#autotoc_md21',1,'']]], + ['rocket_20attitude_20orientation_20determination_21',['7. Rocket attitude (orientation ) determination',['../md__r_e_a_d_m_e.html#autotoc_md26',1,'']]], + ['rocket_20kinematics_20acceleration_20velocity_22',['1. Rocket kinematics (acceleration, velocity)',['../md__r_e_a_d_m_e.html#autotoc_md20',1,'']]] +]; diff --git a/docs/html/search/all_1b.js b/docs/html/search/all_1b.js new file mode 100644 index 0000000..1efad3c --- /dev/null +++ b/docs/html/search/all_1b.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['s_20a_0',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['scripts_1',['Utility scripts',['../md__r_e_a_d_m_e.html#autotoc_md61',1,'']]], + ['sd_5fcs_5fpin_2',['SD_CS_PIN',['../src_2main_8cpp.html#adcf3e4d2276ee4d10b23c05e4e7da0c3',1,'main.cpp']]], + ['security_20issues_3',[':lock: Reporting Security Issues',['../md_contributing.html#autotoc_md5',1,'']]], + ['set_5frun_5fmode_5fpin_4',['SET_RUN_MODE_PIN',['../src_2main_8cpp.html#abea45f8bc016d99f82b468ae77916e64',1,'main.cpp']]], + ['set_5ftest_5fmode_5fpin_5',['SET_TEST_MODE_PIN',['../src_2main_8cpp.html#ac0121f71eae2488320c2cd36a4843976',1,'main.cpp']]], + ['setup_6',['setup',['../src_2main_8cpp.html#a4fc01d736fe50cf5b977f755b675f11d',1,'main.cpp']]], + ['software_20documentation_7',['N4 Flight Software Documentation',['../md__r_e_a_d_m_e.html',1,'']]], + ['software_20requirements_8',['N4 Flight software requirements',['../md__r_e_a_d_m_e.html#autotoc_md18',1,'']]], + ['soh_9',['SOH',['../src_2main_8cpp.html#ab3796cca360697d3658162dba5965e28',1,'main.cpp']]], + ['soh_5frecvd_5fflag_10',['SOH_recvd_flag',['../src_2main_8cpp.html#a6a02e76e786465c8d2fe8ba9ad3393da',1,'main.cpp']]], + ['state_20functions_20handling_11',['State functions handling',['../md__r_e_a_d_m_e.html#autotoc_md54',1,'']]], + ['state_20machine_20logic_20and_20operation_12',['State machine logic and operation',['../md__r_e_a_d_m_e.html#autotoc_md50',1,'']]], + ['state_20transition_20conditions_13',['State transition conditions',['../md__r_e_a_d_m_e.html#autotoc_md53',1,'']]], + ['state_20transitions_14',['3. Flight state transitions',['../md__r_e_a_d_m_e.html#autotoc_md22',1,'']]], + ['state_5fmachine_15',['State_machine',['../class_state__machine.html',1,'']]], + ['state_5fmachine_2ecpp_16',['state_machine.cpp',['../include_2state__machine_8cpp.html',1,'(Global Namespace)'],['../test_2state__machine_8cpp.html',1,'(Global Namespace)']]], + ['states_17',['States',['../md__r_e_a_d_m_e.html#autotoc_md52',1,'']]], + ['states_2eh_18',['states.h',['../states_8h.html',1,'']]], + ['storage_19',['storage',['../md__r_e_a_d_m_e.html#autotoc_md23',1,'4. Data logging and storage'],['../md__r_e_a_d_m_e.html#autotoc_md39',1,'Data Logging and storage']]], + ['streaming_20',['10. Video capture and streaming**',['../md__r_e_a_d_m_e.html#autotoc_md29',1,'']]], + ['structure_21',['Telemetry packet structure',['../md__r_e_a_d_m_e.html#autotoc_md38',1,'']]], + ['style_22',[':nail_care: Coding Style',['../md_contributing.html#autotoc_md12',1,'']]], + ['submitting_20pull_20requests_23',[':repeat: Submitting Pull Requests',['../md_contributing.html#autotoc_md9',1,'']]], + ['switchleds_24',['SwitchLEDs',['../src_2main_8cpp.html#a5f3e40ff0b3b6f2c247fadc41b0a5896',1,'main.cpp']]], + ['systemlogger_25',['SystemLogger',['../class_system_logger.html',1,'']]], + ['systems_20diagnostics_26',['5. Onboard systems diagnostics',['../md__r_e_a_d_m_e.html#autotoc_md24',1,'']]] +]; diff --git a/docs/html/search/all_1c.js b/docs/html/search/all_1c.js new file mode 100644 index 0000000..0ae91db --- /dev/null +++ b/docs/html/search/all_1c.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['task_20communication_0',['Data queues and task communication',['../md__r_e_a_d_m_e.html#autotoc_md33',1,'']]], + ['task_20creation_1',['Tasks and task creation',['../md__r_e_a_d_m_e.html#autotoc_md30',1,'']]], + ['tasks_20and_20task_20creation_2',['Tasks and task creation',['../md__r_e_a_d_m_e.html#autotoc_md30',1,'']]], + ['telemetry_20and_20transmission_20to_20ground_3',['Telemetry and transmission to ground',['../md__r_e_a_d_m_e.html#autotoc_md35',1,'']]], + ['telemetry_20packet_20structure_4',['Telemetry packet structure',['../md__r_e_a_d_m_e.html#autotoc_md38',1,'']]], + ['telemetry_20transmission_5',['9. Telemetry transmission',['../md__r_e_a_d_m_e.html#autotoc_md28',1,'']]], + ['telemetry_5fdata_6',['Telemetry_Data',['../struct_telemetry___data.html',1,'']]], + ['telemetry_5fdata_5fqhandle_7',['telemetry_data_qHandle',['../src_2main_8cpp.html#a0ed5ea94df7417ea494d69ca56aab490',1,'main.cpp']]], + ['test_8',['Test',['../class_test.html',1,'']]], + ['test_5fstate_9',['TEST_STATE',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09d',1,'main.cpp']]], + ['tests_10',['tests',['../md__r_e_a_d_m_e.html#autotoc_md41',1,'Flash chip hardware tests'],['../md__r_e_a_d_m_e.html#autotoc_md49',1,'GPS tests']]], + ['the_20data_11',['How to recover the data',['../md__r_e_a_d_m_e.html#autotoc_md44',1,'']]], + ['the_20flash_20memory_12',['PCB layout for the flash memory',['../md__r_e_a_d_m_e.html#autotoc_md42',1,'']]], + ['time_20issues_13',['GPS fix time issues',['../md__r_e_a_d_m_e.html#autotoc_md47',1,'']]], + ['to_20ground_14',['Telemetry and transmission to ground',['../md__r_e_a_d_m_e.html#autotoc_md35',1,'']]], + ['to_20recover_20the_20data_15',['How to recover the data',['../md__r_e_a_d_m_e.html#autotoc_md44',1,'']]], + ['transition_20conditions_16',['State transition conditions',['../md__r_e_a_d_m_e.html#autotoc_md53',1,'']]], + ['transitions_17',['3. Flight state transitions',['../md__r_e_a_d_m_e.html#autotoc_md22',1,'']]], + ['transmission_18',['9. Telemetry transmission',['../md__r_e_a_d_m_e.html#autotoc_md28',1,'']]], + ['transmission_20to_20ground_19',['Telemetry and transmission to ground',['../md__r_e_a_d_m_e.html#autotoc_md35',1,'']]], + ['transmit_5ftelemetry_5fbit_20',['TRANSMIT_TELEMETRY_BIT',['../src_2main_8cpp.html#a3101d6fdbdc9f9b1d5395471a32e23c9',1,'main.cpp']]], + ['triaging_20issues_21',[':mag: Triaging Issues',['../md_contributing.html#autotoc_md8',1,'']]] +]; diff --git a/docs/html/search/all_1d.js b/docs/html/search/all_1d.js new file mode 100644 index 0000000..76870a6 --- /dev/null +++ b/docs/html/search/all_1d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['usage_0',['Usage',['../md__r_e_a_d_m_e.html#autotoc_md64',1,'']]], + ['utility_20scripts_1',['Utility scripts',['../md__r_e_a_d_m_e.html#autotoc_md61',1,'']]] +]; diff --git a/docs/html/search/all_1e.js b/docs/html/search/all_1e.js new file mode 100644 index 0000000..41f9636 --- /dev/null +++ b/docs/html/search/all_1e.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['value_0',['value',['../src_2main_8cpp.html#ac4f474c82e82cbb89ca7c36dd52be0ed',1,'main.cpp']]], + ['van_5fhalen_20contract_5friders_20no_20brown_20m_20m_20s_20a_1',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['velocity_2',['1. Rocket kinematics (acceleration, velocity)',['../md__r_e_a_d_m_e.html#autotoc_md20',1,'']]], + ['velocity_20from_20accelerometer_3',['Calculating velocity from accelerometer',['../md__r_e_a_d_m_e.html#autotoc_md57',1,'']]], + ['video_20capture_20and_20streaming_4',['10. Video capture and streaming**',['../md__r_e_a_d_m_e.html#autotoc_md29',1,'']]] +]; diff --git a/docs/html/search/all_1f.js b/docs/html/search/all_1f.js new file mode 100644 index 0000000..f8c3402 --- /dev/null +++ b/docs/html/search/all_1f.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['wiki_20van_5fhalen_20contract_5friders_20no_20brown_20m_20m_20s_20a_0',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['wikipedia_20org_20wiki_20van_5fhalen_20contract_5friders_20no_20brown_20m_20m_20s_20a_1',['<a href="https://en.wikipedia.org/wiki/Van_Halen#Contract_riders" >No Brown M&M's</a>',['../md_contributing.html#autotoc_md14',1,'']]], + ['writing_20commit_20messages_2',[':memo: Writing Commit Messages',['../md_contributing.html#autotoc_md10',1,'']]] +]; diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js new file mode 100644 index 0000000..6268784 --- /dev/null +++ b/docs/html/search/all_2.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['can_0',['CAN',['../src_2main_8cpp.html#a427a40e102258055c72607bf7b604549',1,'main.cpp']]], + ['checkflightstate_1',['checkFlightState',['../src_2main_8cpp.html#a152aa3ad3c21993eb70968de75219174',1,'main.cpp']]], + ['checkruntesttoggle_2',['checkRunTestToggle',['../src_2main_8cpp.html#a36d26be00724540c08411ce54b01a49b',1,'main.cpp']]], + ['cleartelemetryqueuetask_3',['clearTelemetryQueueTask',['../src_2main_8cpp.html#a2eee545cf4af91a694e63ac4940276a4',1,'main.cpp']]], + ['code_4',['Building the code',['../index.html#step11',1,'']]], + ['compilation_20and_20downloading_5',['Building, Compilation and Downloading.',['../index.html#install_sec',1,'']]], + ['contributors_6',['Contributors',['../index.html#step15',1,'']]], + ['converttimestamp_7',['convertTimestamp',['../custom-time_8h.html#a3e93bbd5d89dde887f93f6264db8a49f',1,'custom-time.cpp']]], + ['current_5flog_5ftime_8',['current_log_time',['../src_2main_8cpp.html#a318b23db9cedde5ea8466af114f0c203',1,'main.cpp']]], + ['current_5fstate_9',['current_state',['../src_2main_8cpp.html#ac559654865b2d48ea0b77b1a1f4a097b',1,'main.cpp']]], + ['current_5ftest_5fstate_10',['current_test_state',['../src_2main_8cpp.html#a9dc783a2c139e60a49e643aed8b741b9',1,'main.cpp']]], + ['custom_2dtime_2eh_11',['custom-time.h',['../custom-time_8h.html',1,'']]], + ['customgps_12',['CustomGPS',['../class_custom_g_p_s.html',1,'']]] +]; diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js new file mode 100644 index 0000000..2fbf194 --- /dev/null +++ b/docs/html/search/all_3.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['data_20dump_20interface_0',['Data dump interface',['../index.html#step6',1,'']]], + ['data_20logging_1',['Flight data logging',['../index.html#step5',1,'']]], + ['datalogger_2',['DataLogger',['../class_data_logger.html',1,'DataLogger'],['../class_data_logger.html#a9ddfc501b4bd4f004f11854c3552d574',1,'DataLogger::DataLogger()']]], + ['debugtoterminaltask_3',['debugToTerminalTask',['../src_2main_8cpp.html#aaa1a5716bd567e8c37465dabe33e6396',1,'main.cpp']]], + ['double_20ejection_4',['Double ejection',['../index.html#step9',1,'']]], + ['downloading_5',['Building, Compilation and Downloading.',['../index.html#install_sec',1,'']]], + ['droguechutedeploy_6',['drogueChuteDeploy',['../src_2main_8cpp.html#aee373e9d6ea48f0b376bdaa1c2970510',1,'main.cpp']]], + ['dump_20interface_7',['Data dump interface',['../index.html#step6',1,'']]] +]; diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js new file mode 100644 index 0000000..89d8041 --- /dev/null +++ b/docs/html/search/all_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['ejection_0',['Double ejection',['../index.html#step9',1,'']]], + ['engine_1',['HIL Testing Engine',['../index.html#step4',1,'']]], + ['eot_2',['EOT',['../src_2main_8cpp.html#aa3210a5256085e136fed7897ae93a756',1,'main.cpp']]] +]; diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js new file mode 100644 index 0000000..7e2a465 --- /dev/null +++ b/docs/html/search/all_5.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['features_0',['Major features',['../index.html#step1',1,'']]], + ['file_1',['file',['../src_2main_8cpp.html#ada14cbbf98490eb3cb49b5d1cb0c0056',1,'main.cpp']]], + ['file_5fsize_5f1m_2',['FILE_SIZE_1M',['../src_2main_8cpp.html#a1ba4fed8e0dad7fbe3e7de830a2e9f6c',1,'main.cpp']]], + ['file_5fsize_5f4m_3',['FILE_SIZE_4M',['../src_2main_8cpp.html#aef692c53edfa11997d3470f8ed1d6a26',1,'main.cpp']]], + ['file_5fsize_5f512k_4',['FILE_SIZE_512K',['../src_2main_8cpp.html#aa9614a793fcf876f8e55a118d21d2d77',1,'main.cpp']]], + ['filename_5',['filename',['../src_2main_8cpp.html#a6c2affe0788e6ba12dce7a51e1bd35c3',1,'main.cpp']]], + ['filtered_5fdata_6',['Filtered_Data',['../struct_filtered___data.html',1,'']]], + ['filterimu_7',['filterImu',['../class_m_p_u6050.html#aed4696b264b467844771ef28b274541b',1,'MPU6050']]], + ['flash_5fcs_5fpin_8',['flash_cs_pin',['../src_2main_8cpp.html#a974c70ac5c2f6156bf0e7fafd973d803',1,'main.cpp']]], + ['flash_5fled_5fpin_9',['flash_led_pin',['../src_2main_8cpp.html#ab506410443108766020e011a3c9293af',1,'main.cpp']]], + ['flight_20data_20logging_10',['Flight data logging',['../index.html#step5',1,'']]], + ['flight_20modes_11',['SAFE and FLIGHT modes',['../index.html#step7',1,'']]], + ['flight_20software_12',['N4 Flight Software',['../index.html',1,'']]], + ['flightstatecallback_13',['flightStateCallback',['../src_2main_8cpp.html#a6648d201a9f47aa836d36e5339e78ef3',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/all_5.js b/docs/html/search/all_6.js similarity index 76% rename from n4-flight-software/html/search/all_5.js rename to docs/html/search/all_6.js index fc84153..21b738e 100644 --- a/n4-flight-software/html/search/all_5.js +++ b/docs/html/search/all_6.js @@ -5,5 +5,6 @@ var searchData= ['getroll_2',['getRoll',['../class_m_p_u6050.html#adcecd29f4445b6670aafa2452a26f197',1,'MPU6050']]], ['gps_5fdata_3',['GPS_Data',['../struct_g_p_s___data.html',1,'']]], ['gpsinit_4',['GPSInit',['../src_2main_8cpp.html#a6f220446b54026b1217f93a3a9c04c1f',1,'main.cpp']]], - ['gyroscope_5fdata_5',['Gyroscope_Data',['../struct_gyroscope___data.html',1,'']]] + ['green_5fled_5',['green_led',['../src_2main_8cpp.html#ac4026e93b77dbb4130e8114a3ce0f669',1,'main.cpp']]], + ['gyroscope_5fdata_6',['Gyroscope_Data',['../struct_gyroscope___data.html',1,'']]] ]; diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js new file mode 100644 index 0000000..8e56cd0 --- /dev/null +++ b/docs/html/search/all_7.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['handshake_0',['HANDSHAKE',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09dacc6ddcaa36bd57e5aec12749cb5ce29c',1,'main.cpp']]], + ['handshakeserialevent_1',['handshakeSerialEvent',['../src_2main_8cpp.html#a41453ccb33ef6b57e513b16e92dd130e',1,'main.cpp']]], + ['hardware_20pin_20assignment_20and_20peripherals_2',['Hardware, pin assignment and peripherals',['../index.html#step13',1,'']]], + ['hil_20testing_20engine_3',['HIL Testing Engine',['../index.html#step4',1,'']]] +]; diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js new file mode 100644 index 0000000..1f91203 --- /dev/null +++ b/docs/html/search/all_8.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['imu_0',['imu',['../src_2main_8cpp.html#aea39bb6bc24075cef46a6b4d55071082',1,'main.cpp']]], + ['initgpio_1',['initGPIO',['../src_2main_8cpp.html#ae8297bf2b99a2ad67af6f9a421ea4b16',1,'main.cpp']]], + ['initxmodem_2',['InitXMODEM',['../src_2main_8cpp.html#abf447a0860a5fec74fecf8654172fec0',1,'main.cpp']]], + ['integration_20and_20testing_20procedures_3',['Integration and Testing Procedures',['../index.html#step14',1,'']]], + ['interface_4',['Data dump interface',['../index.html#step6',1,'']]], + ['introduction_5',['Introduction',['../index.html#intro_sec',1,'']]] +]; diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js new file mode 100644 index 0000000..bf9d113 --- /dev/null +++ b/docs/html/search/all_9.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['listdir_0',['listDir',['../src_2main_8cpp.html#a8841578fe91cace6206676f0e751cab5',1,'main.cpp']]], + ['log_5fsample_5finterval_1',['log_sample_interval',['../src_2main_8cpp.html#affaa6e6cce540b233b04e558e3d164b2',1,'main.cpp']]], + ['loggerconsole_2',['LoggerConsole',['../class_logger_console.html',1,'']]], + ['loggerequals_3',['loggerEquals',['../class_data_logger.html#acb9bf3c62db1f28016d68d51efe25d43',1,'DataLogger']]], + ['loggerformat_4',['loggerFormat',['../class_data_logger.html#a5e9756481c9c74167ba32ad7a479e8b3',1,'DataLogger']]], + ['loggerinfo_5',['loggerInfo',['../class_data_logger.html#a9a968317a7e3bb763d8cd551063e7348',1,'DataLogger']]], + ['loggerinit_6',['loggerInit',['../class_data_logger.html#a0cf2853582b7f2194eb0024d3d6d4944',1,'DataLogger']]], + ['loggerread_7',['loggerRead',['../class_data_logger.html#a5a0deefb9372f1577636014a59025e6f',1,'DataLogger']]], + ['loggerspaces_8',['loggerSpaces',['../class_data_logger.html#aa2e189964fbebc28dc2a327fdccc5684',1,'DataLogger']]], + ['loggertest_9',['loggerTest',['../class_data_logger.html#ae8a69bf0cc965365057e93a164ca9239',1,'DataLogger']]], + ['loggerwrite_10',['loggerWrite',['../class_data_logger.html#a411ac6fd751d3a87cef0375fccaad028',1,'DataLogger']]], + ['logging_11',['System Logging',['../index.html#step3',1,'']]], + ['logging_12',['Flight data logging',['../index.html#step5',1,'']]], + ['logtomemory_13',['logToMemory',['../src_2main_8cpp.html#a7df146b43e503e23146e698154d5096d',1,'main.cpp']]], + ['loop_14',['loop',['../src_2main_8cpp.html#afe461d27b9c48d5921c00d521181f12f',1,'main.cpp']]], + ['lora_20wifi_20telemetry_20selection_15',['XBEE, MQTT, LORA, WIFI telemetry selection',['../index.html#step8',1,'']]] +]; diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js new file mode 100644 index 0000000..9d72034 --- /dev/null +++ b/docs/html/search/all_a.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['main_2ecpp_0',['main.cpp',['../src_2main_8cpp.html',1,'']]], + ['mainchutedeploy_1',['mainChuteDeploy',['../src_2main_8cpp.html#a9074d493ccf55d0cfa3acd2d173f665a',1,'main.cpp']]], + ['major_20features_2',['Major features',['../index.html#step1',1,'']]], + ['max_5fcmd_5flength_3',['MAX_CMD_LENGTH',['../src_2main_8cpp.html#a2e69b1ee7e19bfbe378c886f88e60fac',1,'main.cpp']]], + ['max_5fcsv_5flength_4',['MAX_CSV_LENGTH',['../src_2main_8cpp.html#a3aad00c42368296b28f72f623c446925',1,'main.cpp']]], + ['modes_5',['SAFE and FLIGHT modes',['../index.html#step7',1,'']]], + ['modularity_6',['Modularity',['../index.html#step2',1,'']]], + ['mpu6050_7',['MPU6050',['../class_m_p_u6050.html',1,'']]], + ['mqtt_20lora_20wifi_20telemetry_20selection_8',['XBEE, MQTT, LORA, WIFI telemetry selection',['../index.html#step8',1,'']]] +]; diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js new file mode 100644 index 0000000..af55539 --- /dev/null +++ b/docs/html/search/all_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['n4_20flight_20software_0',['N4 Flight Software',['../index.html',1,'']]], + ['nak_1',['NAK',['../src_2main_8cpp.html#a7ff3e502ffb5d509612c6c6741de45cc',1,'main.cpp']]], + ['nak_5finterval_2',['NAK_INTERVAL',['../src_2main_8cpp.html#a394162e74bbeb9bf67d3009cc38e0466',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/all_9.js b/docs/html/search/all_c.js similarity index 100% rename from n4-flight-software/html/search/all_9.js rename to docs/html/search/all_c.js diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js new file mode 100644 index 0000000..8522f32 --- /dev/null +++ b/docs/html/search/all_d.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['parseserialnumeric_0',['ParseSerialNumeric',['../src_2main_8cpp.html#a102c6561be41c1aafb3bd6da443deed7',1,'main.cpp']]], + ['peripherals_1',['Hardware, pin assignment and peripherals',['../index.html#step13',1,'']]], + ['pin_20assignment_2',['pin-assignment',['../md_n4-flight-software_2src_2pin-assignment.html',1,'']]], + ['pin_20assignment_20and_20peripherals_3',['Hardware, pin assignment and peripherals',['../index.html#step13',1,'']]], + ['previous_5flog_5ftime_4',['previous_log_time',['../src_2main_8cpp.html#ac03f1f50d9e1452593353033c5b2b1b0',1,'main.cpp']]], + ['procedures_5',['Integration and Testing Procedures',['../index.html#step14',1,'']]] +]; diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js new file mode 100644 index 0000000..3b514e5 --- /dev/null +++ b/docs/html/search/all_e.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['readaccelerationtask_0',['readAccelerationTask',['../src_2main_8cpp.html#a64be9ebbabd58a9b6d32b92ce607f2a6',1,'main.cpp']]], + ['readaltimetertask_1',['readAltimeterTask',['../src_2main_8cpp.html#a5947e71102388e9d5bfd09f8e97d668c',1,'main.cpp']]], + ['readgpstask_2',['readGPSTask',['../src_2main_8cpp.html#aa8ea491ed98b16bb5292ad184537f0b5',1,'main.cpp']]], + ['readme_3',['README',['../md_n4-flight-software_2_r_e_a_d_m_e.html',1,'']]], + ['readxacceleration_4',['readXAcceleration',['../class_m_p_u6050.html#a63bb7b9f83eca4c2debdd0dfa7991865',1,'MPU6050']]], + ['readyacceleration_5',['readYAcceleration',['../class_m_p_u6050.html#ab34bd3131afe39a6f5178f46ec63a0e7',1,'MPU6050']]], + ['readzacceleration_6',['readZAcceleration',['../class_m_p_u6050.html#a18bf4368cc536ba0da3d41bdd4241be8',1,'MPU6050']]], + ['receive_5ftest_5fdata_7',['RECEIVE_TEST_DATA',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09da078eb5ef5383567cdf7a9b36f49289d6',1,'main.cpp']]], + ['receivetestdataserialevent_8',['receiveTestDataSerialEvent',['../src_2main_8cpp.html#a61040c538622d7ad222068e37d96b52a',1,'main.cpp']]], + ['recv_5fdata_5fled_9',['recv_data_led',['../src_2main_8cpp.html#a7047c2926a0671d98c6f80a4015f2c14',1,'main.cpp']]], + ['red_5fled_10',['red_led',['../src_2main_8cpp.html#a450aab1d5c2ac17dd8a8fd346a47cf16',1,'main.cpp']]], + ['requirements_11',['System requirements',['../index.html#step10',1,'']]] +]; diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js new file mode 100644 index 0000000..17cc1ea --- /dev/null +++ b/docs/html/search/all_f.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['safe_20and_20flight_20modes_0',['SAFE and FLIGHT modes',['../index.html#step7',1,'']]], + ['sd_5fcs_5fpin_1',['SD_CS_PIN',['../src_2main_8cpp.html#adcf3e4d2276ee4d10b23c05e4e7da0c3',1,'main.cpp']]], + ['selection_2',['XBEE, MQTT, LORA, WIFI telemetry selection',['../index.html#step8',1,'']]], + ['set_5frun_5fmode_5fpin_3',['SET_RUN_MODE_PIN',['../src_2main_8cpp.html#abea45f8bc016d99f82b468ae77916e64',1,'main.cpp']]], + ['set_5ftest_5fmode_5fpin_4',['SET_TEST_MODE_PIN',['../src_2main_8cpp.html#ac0121f71eae2488320c2cd36a4843976',1,'main.cpp']]], + ['setup_5',['setup',['../src_2main_8cpp.html#a4fc01d736fe50cf5b977f755b675f11d',1,'main.cpp']]], + ['software_6',['N4 Flight Software',['../index.html',1,'']]], + ['soh_7',['SOH',['../src_2main_8cpp.html#ab3796cca360697d3658162dba5965e28',1,'main.cpp']]], + ['soh_5frecvd_5fflag_8',['SOH_recvd_flag',['../src_2main_8cpp.html#a6a02e76e786465c8d2fe8ba9ad3393da',1,'main.cpp']]], + ['state_5fmachine_9',['State_machine',['../class_state__machine.html',1,'']]], + ['state_5fmachine_2ecpp_10',['state_machine.cpp',['../include_2state__machine_8cpp.html',1,'(Global Namespace)'],['../test_2state__machine_8cpp.html',1,'(Global Namespace)']]], + ['states_2eh_11',['states.h',['../states_8h.html',1,'']]], + ['switchleds_12',['SwitchLEDs',['../src_2main_8cpp.html#a5f3e40ff0b3b6f2c247fadc41b0a5896',1,'main.cpp']]], + ['system_20logging_13',['System Logging',['../index.html#step3',1,'']]], + ['system_20requirements_14',['System requirements',['../index.html#step10',1,'']]], + ['systemlogger_15',['SystemLogger',['../class_system_logger.html',1,'']]] +]; diff --git a/n4-flight-software/html/search/classes_0.js b/docs/html/search/classes_0.js similarity index 100% rename from n4-flight-software/html/search/classes_0.js rename to docs/html/search/classes_0.js diff --git a/n4-flight-software/html/search/classes_1.js b/docs/html/search/classes_1.js similarity index 100% rename from n4-flight-software/html/search/classes_1.js rename to docs/html/search/classes_1.js diff --git a/n4-flight-software/html/search/classes_2.js b/docs/html/search/classes_2.js similarity index 100% rename from n4-flight-software/html/search/classes_2.js rename to docs/html/search/classes_2.js diff --git a/n4-flight-software/html/search/classes_3.js b/docs/html/search/classes_3.js similarity index 100% rename from n4-flight-software/html/search/classes_3.js rename to docs/html/search/classes_3.js diff --git a/n4-flight-software/html/search/classes_4.js b/docs/html/search/classes_4.js similarity index 100% rename from n4-flight-software/html/search/classes_4.js rename to docs/html/search/classes_4.js diff --git a/n4-flight-software/html/search/classes_5.js b/docs/html/search/classes_5.js similarity index 100% rename from n4-flight-software/html/search/classes_5.js rename to docs/html/search/classes_5.js diff --git a/n4-flight-software/html/search/classes_6.js b/docs/html/search/classes_6.js similarity index 100% rename from n4-flight-software/html/search/classes_6.js rename to docs/html/search/classes_6.js diff --git a/n4-flight-software/html/search/classes_7.js b/docs/html/search/classes_7.js similarity index 100% rename from n4-flight-software/html/search/classes_7.js rename to docs/html/search/classes_7.js diff --git a/n4-flight-software/html/search/classes_8.js b/docs/html/search/classes_8.js similarity index 100% rename from n4-flight-software/html/search/classes_8.js rename to docs/html/search/classes_8.js diff --git a/n4-flight-software/html/search/close.svg b/docs/html/search/close.svg similarity index 100% rename from n4-flight-software/html/search/close.svg rename to docs/html/search/close.svg diff --git a/docs/html/search/defines_0.js b/docs/html/search/defines_0.js new file mode 100644 index 0000000..da972c8 --- /dev/null +++ b/docs/html/search/defines_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ack_0',['ACK',['../src_2main_8cpp.html#a6f6489887e08bff4887d0bc5dcf214d8',1,'main.cpp']]] +]; diff --git a/docs/html/search/defines_1.js b/docs/html/search/defines_1.js new file mode 100644 index 0000000..62b1d10 --- /dev/null +++ b/docs/html/search/defines_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['can_0',['CAN',['../src_2main_8cpp.html#a427a40e102258055c72607bf7b604549',1,'main.cpp']]] +]; diff --git a/docs/html/search/defines_2.js b/docs/html/search/defines_2.js new file mode 100644 index 0000000..b880d48 --- /dev/null +++ b/docs/html/search/defines_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['eot_0',['EOT',['../src_2main_8cpp.html#aa3210a5256085e136fed7897ae93a756',1,'main.cpp']]] +]; diff --git a/docs/html/search/defines_3.js b/docs/html/search/defines_3.js new file mode 100644 index 0000000..52dae1d --- /dev/null +++ b/docs/html/search/defines_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['max_5fcmd_5flength_0',['MAX_CMD_LENGTH',['../src_2main_8cpp.html#a2e69b1ee7e19bfbe378c886f88e60fac',1,'main.cpp']]], + ['max_5fcsv_5flength_1',['MAX_CSV_LENGTH',['../src_2main_8cpp.html#a3aad00c42368296b28f72f623c446925',1,'main.cpp']]] +]; diff --git a/docs/html/search/defines_4.js b/docs/html/search/defines_4.js new file mode 100644 index 0000000..5d90669 --- /dev/null +++ b/docs/html/search/defines_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['nak_0',['NAK',['../src_2main_8cpp.html#a7ff3e502ffb5d509612c6c6741de45cc',1,'main.cpp']]], + ['nak_5finterval_1',['NAK_INTERVAL',['../src_2main_8cpp.html#a394162e74bbeb9bf67d3009cc38e0466',1,'main.cpp']]] +]; diff --git a/docs/html/search/defines_5.js b/docs/html/search/defines_5.js new file mode 100644 index 0000000..3494f56 --- /dev/null +++ b/docs/html/search/defines_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['soh_0',['SOH',['../src_2main_8cpp.html#ab3796cca360697d3658162dba5965e28',1,'main.cpp']]] +]; diff --git a/docs/html/search/defines_6.js b/docs/html/search/defines_6.js new file mode 100644 index 0000000..027bd90 --- /dev/null +++ b/docs/html/search/defines_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['transmit_5ftelemetry_5fbit_0',['TRANSMIT_TELEMETRY_BIT',['../src_2main_8cpp.html#a3101d6fdbdc9f9b1d5395471a32e23c9',1,'main.cpp']]] +]; diff --git a/docs/html/search/enums_0.js b/docs/html/search/enums_0.js new file mode 100644 index 0000000..f5ced8d --- /dev/null +++ b/docs/html/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['test_5fstate_0',['TEST_STATE',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09d',1,'main.cpp']]] +]; diff --git a/docs/html/search/enumvalues_0.js b/docs/html/search/enumvalues_0.js new file mode 100644 index 0000000..505c520 --- /dev/null +++ b/docs/html/search/enumvalues_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['handshake_0',['HANDSHAKE',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09dacc6ddcaa36bd57e5aec12749cb5ce29c',1,'main.cpp']]] +]; diff --git a/docs/html/search/enumvalues_1.js b/docs/html/search/enumvalues_1.js new file mode 100644 index 0000000..732942f --- /dev/null +++ b/docs/html/search/enumvalues_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['receive_5ftest_5fdata_0',['RECEIVE_TEST_DATA',['../src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09da078eb5ef5383567cdf7a9b36f49289d6',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/files_0.js b/docs/html/search/files_0.js similarity index 100% rename from n4-flight-software/html/search/files_0.js rename to docs/html/search/files_0.js diff --git a/n4-flight-software/html/search/files_1.js b/docs/html/search/files_1.js similarity index 100% rename from n4-flight-software/html/search/files_1.js rename to docs/html/search/files_1.js diff --git a/n4-flight-software/html/search/files_2.js b/docs/html/search/files_2.js similarity index 57% rename from n4-flight-software/html/search/files_2.js rename to docs/html/search/files_2.js index bb110cd..67ab91a 100644 --- a/n4-flight-software/html/search/files_2.js +++ b/docs/html/search/files_2.js @@ -1,4 +1,5 @@ var searchData= [ - ['state_5fmachine_2ecpp_0',['state_machine.cpp',['../include_2state__machine_8cpp.html',1,'(Global Namespace)'],['../test_2state__machine_8cpp.html',1,'(Global Namespace)']]] + ['state_5fmachine_2ecpp_0',['state_machine.cpp',['../include_2state__machine_8cpp.html',1,'(Global Namespace)'],['../test_2state__machine_8cpp.html',1,'(Global Namespace)']]], + ['states_2eh_1',['states.h',['../states_8h.html',1,'']]] ]; diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js new file mode 100644 index 0000000..649b112 --- /dev/null +++ b/docs/html/search/functions_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['blink_5f200ms_0',['blink_200ms',['../src_2main_8cpp.html#a4139203bf745c4d38fd73bab228d571e',1,'main.cpp']]], + ['bmpinit_1',['BMPInit',['../src_2main_8cpp.html#a80d57b1ee5cb9d474465d3f8485f5bbc',1,'main.cpp']]], + ['buzz_2',['buzz',['../src_2main_8cpp.html#a28b1eb955e6e2f5e83599536f6bf4d2f',1,'main.cpp']]] +]; diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js new file mode 100644 index 0000000..83b1274 --- /dev/null +++ b/docs/html/search/functions_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['checkflightstate_0',['checkFlightState',['../src_2main_8cpp.html#a152aa3ad3c21993eb70968de75219174',1,'main.cpp']]], + ['checkruntesttoggle_1',['checkRunTestToggle',['../src_2main_8cpp.html#a36d26be00724540c08411ce54b01a49b',1,'main.cpp']]], + ['cleartelemetryqueuetask_2',['clearTelemetryQueueTask',['../src_2main_8cpp.html#a2eee545cf4af91a694e63ac4940276a4',1,'main.cpp']]], + ['converttimestamp_3',['convertTimestamp',['../custom-time_8h.html#a3e93bbd5d89dde887f93f6264db8a49f',1,'custom-time.cpp']]] +]; diff --git a/n4-flight-software/html/search/functions_2.js b/docs/html/search/functions_2.js similarity index 51% rename from n4-flight-software/html/search/functions_2.js rename to docs/html/search/functions_2.js index 2d7e5a2..22f19ff 100644 --- a/n4-flight-software/html/search/functions_2.js +++ b/docs/html/search/functions_2.js @@ -1,5 +1,6 @@ var searchData= [ ['datalogger_0',['DataLogger',['../class_data_logger.html#a9ddfc501b4bd4f004f11854c3552d574',1,'DataLogger']]], - ['debugtoterminaltask_1',['debugToTerminalTask',['../src_2main_8cpp.html#aaa1a5716bd567e8c37465dabe33e6396',1,'main.cpp']]] + ['debugtoterminaltask_1',['debugToTerminalTask',['../src_2main_8cpp.html#aaa1a5716bd567e8c37465dabe33e6396',1,'main.cpp']]], + ['droguechutedeploy_2',['drogueChuteDeploy',['../src_2main_8cpp.html#aee373e9d6ea48f0b376bdaa1c2970510',1,'main.cpp']]] ]; diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js new file mode 100644 index 0000000..adf15db --- /dev/null +++ b/docs/html/search/functions_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['filterimu_0',['filterImu',['../class_m_p_u6050.html#aed4696b264b467844771ef28b274541b',1,'MPU6050']]], + ['flightstatecallback_1',['flightStateCallback',['../src_2main_8cpp.html#a6648d201a9f47aa836d36e5339e78ef3',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/functions_4.js b/docs/html/search/functions_4.js similarity index 100% rename from n4-flight-software/html/search/functions_4.js rename to docs/html/search/functions_4.js diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js new file mode 100644 index 0000000..e5e81d2 --- /dev/null +++ b/docs/html/search/functions_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['handshakeserialevent_0',['handshakeSerialEvent',['../src_2main_8cpp.html#a41453ccb33ef6b57e513b16e92dd130e',1,'main.cpp']]] +]; diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js new file mode 100644 index 0000000..0b601d5 --- /dev/null +++ b/docs/html/search/functions_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['initgpio_0',['initGPIO',['../src_2main_8cpp.html#ae8297bf2b99a2ad67af6f9a421ea4b16',1,'main.cpp']]], + ['initxmodem_1',['InitXMODEM',['../src_2main_8cpp.html#abf447a0860a5fec74fecf8654172fec0',1,'main.cpp']]] +]; diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js new file mode 100644 index 0000000..1f17d99 --- /dev/null +++ b/docs/html/search/functions_7.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['listdir_0',['listDir',['../src_2main_8cpp.html#a8841578fe91cace6206676f0e751cab5',1,'main.cpp']]], + ['loggerequals_1',['loggerEquals',['../class_data_logger.html#acb9bf3c62db1f28016d68d51efe25d43',1,'DataLogger']]], + ['loggerformat_2',['loggerFormat',['../class_data_logger.html#a5e9756481c9c74167ba32ad7a479e8b3',1,'DataLogger']]], + ['loggerinfo_3',['loggerInfo',['../class_data_logger.html#a9a968317a7e3bb763d8cd551063e7348',1,'DataLogger']]], + ['loggerinit_4',['loggerInit',['../class_data_logger.html#a0cf2853582b7f2194eb0024d3d6d4944',1,'DataLogger']]], + ['loggerread_5',['loggerRead',['../class_data_logger.html#a5a0deefb9372f1577636014a59025e6f',1,'DataLogger']]], + ['loggerspaces_6',['loggerSpaces',['../class_data_logger.html#aa2e189964fbebc28dc2a327fdccc5684',1,'DataLogger']]], + ['loggertest_7',['loggerTest',['../class_data_logger.html#ae8a69bf0cc965365057e93a164ca9239',1,'DataLogger']]], + ['loggerwrite_8',['loggerWrite',['../class_data_logger.html#a411ac6fd751d3a87cef0375fccaad028',1,'DataLogger']]], + ['logtomemory_9',['logToMemory',['../src_2main_8cpp.html#a7df146b43e503e23146e698154d5096d',1,'main.cpp']]], + ['loop_10',['loop',['../src_2main_8cpp.html#afe461d27b9c48d5921c00d521181f12f',1,'main.cpp']]] +]; diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js new file mode 100644 index 0000000..c9f7166 --- /dev/null +++ b/docs/html/search/functions_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mainchutedeploy_0',['mainChuteDeploy',['../src_2main_8cpp.html#a9074d493ccf55d0cfa3acd2d173f665a',1,'main.cpp']]] +]; diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js new file mode 100644 index 0000000..9ba8c01 --- /dev/null +++ b/docs/html/search/functions_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['parseserialnumeric_0',['ParseSerialNumeric',['../src_2main_8cpp.html#a102c6561be41c1aafb3bd6da443deed7',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/functions_6.js b/docs/html/search/functions_a.js similarity index 77% rename from n4-flight-software/html/search/functions_6.js rename to docs/html/search/functions_a.js index ddea2ff..599547f 100644 --- a/n4-flight-software/html/search/functions_6.js +++ b/docs/html/search/functions_a.js @@ -5,5 +5,6 @@ var searchData= ['readgpstask_2',['readGPSTask',['../src_2main_8cpp.html#aa8ea491ed98b16bb5292ad184537f0b5',1,'main.cpp']]], ['readxacceleration_3',['readXAcceleration',['../class_m_p_u6050.html#a63bb7b9f83eca4c2debdd0dfa7991865',1,'MPU6050']]], ['readyacceleration_4',['readYAcceleration',['../class_m_p_u6050.html#ab34bd3131afe39a6f5178f46ec63a0e7',1,'MPU6050']]], - ['readzacceleration_5',['readZAcceleration',['../class_m_p_u6050.html#a18bf4368cc536ba0da3d41bdd4241be8',1,'MPU6050']]] + ['readzacceleration_5',['readZAcceleration',['../class_m_p_u6050.html#a18bf4368cc536ba0da3d41bdd4241be8',1,'MPU6050']]], + ['receivetestdataserialevent_6',['receiveTestDataSerialEvent',['../src_2main_8cpp.html#a61040c538622d7ad222068e37d96b52a',1,'main.cpp']]] ]; diff --git a/docs/html/search/functions_b.js b/docs/html/search/functions_b.js new file mode 100644 index 0000000..17240f1 --- /dev/null +++ b/docs/html/search/functions_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['setup_0',['setup',['../src_2main_8cpp.html#a4fc01d736fe50cf5b977f755b675f11d',1,'main.cpp']]], + ['switchleds_1',['SwitchLEDs',['../src_2main_8cpp.html#a5f3e40ff0b3b6f2c247fadc41b0a5896',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/mag.svg b/docs/html/search/mag.svg similarity index 100% rename from n4-flight-software/html/search/mag.svg rename to docs/html/search/mag.svg diff --git a/n4-flight-software/html/search/mag_d.svg b/docs/html/search/mag_d.svg similarity index 100% rename from n4-flight-software/html/search/mag_d.svg rename to docs/html/search/mag_d.svg diff --git a/n4-flight-software/html/search/mag_sel.svg b/docs/html/search/mag_sel.svg similarity index 100% rename from n4-flight-software/html/search/mag_sel.svg rename to docs/html/search/mag_sel.svg diff --git a/n4-flight-software/html/search/mag_seld.svg b/docs/html/search/mag_seld.svg similarity index 100% rename from n4-flight-software/html/search/mag_seld.svg rename to docs/html/search/mag_seld.svg diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js new file mode 100644 index 0000000..368e5da --- /dev/null +++ b/docs/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['assignment_0',['pin-assignment',['../md_n4-flight-software_2src_2pin-assignment.html',1,'']]] +]; diff --git a/docs/html/search/pages_1.js b/docs/html/search/pages_1.js new file mode 100644 index 0000000..a526e00 --- /dev/null +++ b/docs/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['flight_20software_0',['N4 Flight Software',['../index.html',1,'']]] +]; diff --git a/docs/html/search/pages_2.js b/docs/html/search/pages_2.js new file mode 100644 index 0000000..4d1304e --- /dev/null +++ b/docs/html/search/pages_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['n4_20flight_20software_0',['N4 Flight Software',['../index.html',1,'']]] +]; diff --git a/docs/html/search/pages_3.js b/docs/html/search/pages_3.js new file mode 100644 index 0000000..98eb50f --- /dev/null +++ b/docs/html/search/pages_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pin_20assignment_0',['pin-assignment',['../md_n4-flight-software_2src_2pin-assignment.html',1,'']]] +]; diff --git a/docs/html/search/pages_4.js b/docs/html/search/pages_4.js new file mode 100644 index 0000000..f60a18e --- /dev/null +++ b/docs/html/search/pages_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['readme_0',['README',['../md_n4-flight-software_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/docs/html/search/pages_5.js b/docs/html/search/pages_5.js new file mode 100644 index 0000000..603a84a --- /dev/null +++ b/docs/html/search/pages_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['software_0',['N4 Flight Software',['../index.html',1,'']]] +]; diff --git a/docs/html/search/pages_6.js b/docs/html/search/pages_6.js new file mode 100644 index 0000000..98eb50f --- /dev/null +++ b/docs/html/search/pages_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pin_20assignment_0',['pin-assignment',['../md_n4-flight-software_2src_2pin-assignment.html',1,'']]] +]; diff --git a/docs/html/search/pages_7.js b/docs/html/search/pages_7.js new file mode 100644 index 0000000..f60a18e --- /dev/null +++ b/docs/html/search/pages_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['readme_0',['README',['../md_n4-flight-software_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/docs/html/search/pages_8.js b/docs/html/search/pages_8.js new file mode 100644 index 0000000..f831d08 --- /dev/null +++ b/docs/html/search/pages_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['software_20documentation_0',['N4 Flight Software Documentation',['../md__r_e_a_d_m_e.html',1,'']]] +]; diff --git a/n4-flight-software/html/search/search.css b/docs/html/search/search.css similarity index 100% rename from n4-flight-software/html/search/search.css rename to docs/html/search/search.css diff --git a/n4-flight-software/html/search/search.js b/docs/html/search/search.js similarity index 100% rename from n4-flight-software/html/search/search.js rename to docs/html/search/search.js diff --git a/n4-flight-software/html/search/searchdata.js b/docs/html/search/searchdata.js similarity index 52% rename from n4-flight-software/html/search/searchdata.js rename to docs/html/search/searchdata.js index 8779ec9..fed4bd0 100644 --- a/n4-flight-software/html/search/searchdata.js +++ b/docs/html/search/searchdata.js @@ -1,11 +1,14 @@ var indexSectionsWithContent = { - 0: "abcdfgilmoprst", + 0: "abcdefghilmnoprstvwx", 1: "acdfglmst", 2: "cms", - 3: "bcdfglrs", - 4: "acfilopt", - 5: "r" + 3: "bcdfghilmprs", + 4: "acfgiloprstv", + 5: "t", + 6: "hr", + 7: "acemnst", + 8: "afnprs" }; var indexSectionNames = @@ -15,7 +18,10 @@ var indexSectionNames = 2: "files", 3: "functions", 4: "variables", - 5: "pages" + 5: "enums", + 6: "enumvalues", + 7: "defines", + 8: "pages" }; var indexSectionLabels = @@ -25,6 +31,9 @@ var indexSectionLabels = 2: "Files", 3: "Functions", 4: "Variables", - 5: "Pages" + 5: "Enumerations", + 6: "Enumerator", + 7: "Macros", + 8: "Pages" }; diff --git a/n4-flight-software/html/search/variables_0.js b/docs/html/search/variables_0.js similarity index 100% rename from n4-flight-software/html/search/variables_0.js rename to docs/html/search/variables_0.js diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js new file mode 100644 index 0000000..bd4a330 --- /dev/null +++ b/docs/html/search/variables_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['current_5flog_5ftime_0',['current_log_time',['../src_2main_8cpp.html#a318b23db9cedde5ea8466af114f0c203',1,'main.cpp']]], + ['current_5fstate_1',['current_state',['../src_2main_8cpp.html#ac559654865b2d48ea0b77b1a1f4a097b',1,'main.cpp']]], + ['current_5ftest_5fstate_2',['current_test_state',['../src_2main_8cpp.html#a9dc783a2c139e60a49e643aed8b741b9',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/variables_2.js b/docs/html/search/variables_2.js similarity index 77% rename from n4-flight-software/html/search/variables_2.js rename to docs/html/search/variables_2.js index 841b83a..10496f6 100644 --- a/n4-flight-software/html/search/variables_2.js +++ b/docs/html/search/variables_2.js @@ -5,5 +5,6 @@ var searchData= ['file_5fsize_5f4m_2',['FILE_SIZE_4M',['../src_2main_8cpp.html#aef692c53edfa11997d3470f8ed1d6a26',1,'main.cpp']]], ['file_5fsize_5f512k_3',['FILE_SIZE_512K',['../src_2main_8cpp.html#aa9614a793fcf876f8e55a118d21d2d77',1,'main.cpp']]], ['filename_4',['filename',['../src_2main_8cpp.html#a6c2affe0788e6ba12dce7a51e1bd35c3',1,'main.cpp']]], - ['flash_5fled_5fpin_5',['flash_led_pin',['../src_2main_8cpp.html#ab506410443108766020e011a3c9293af',1,'main.cpp']]] + ['flash_5fcs_5fpin_5',['flash_cs_pin',['../src_2main_8cpp.html#a974c70ac5c2f6156bf0e7fafd973d803',1,'main.cpp']]], + ['flash_5fled_5fpin_6',['flash_led_pin',['../src_2main_8cpp.html#ab506410443108766020e011a3c9293af',1,'main.cpp']]] ]; diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js new file mode 100644 index 0000000..feeaa8c --- /dev/null +++ b/docs/html/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['green_5fled_0',['green_led',['../src_2main_8cpp.html#ac4026e93b77dbb4130e8114a3ce0f669',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/all_6.js b/docs/html/search/variables_4.js similarity index 100% rename from n4-flight-software/html/search/all_6.js rename to docs/html/search/variables_4.js diff --git a/n4-flight-software/html/search/variables_4.js b/docs/html/search/variables_5.js similarity index 100% rename from n4-flight-software/html/search/variables_4.js rename to docs/html/search/variables_5.js diff --git a/n4-flight-software/html/search/variables_5.js b/docs/html/search/variables_6.js similarity index 100% rename from n4-flight-software/html/search/variables_5.js rename to docs/html/search/variables_6.js diff --git a/n4-flight-software/html/search/all_a.js b/docs/html/search/variables_7.js similarity index 100% rename from n4-flight-software/html/search/all_a.js rename to docs/html/search/variables_7.js diff --git a/docs/html/search/variables_8.js b/docs/html/search/variables_8.js new file mode 100644 index 0000000..9446b1b --- /dev/null +++ b/docs/html/search/variables_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['recv_5fdata_5fled_0',['recv_data_led',['../src_2main_8cpp.html#a7047c2926a0671d98c6f80a4015f2c14',1,'main.cpp']]], + ['red_5fled_1',['red_led',['../src_2main_8cpp.html#a450aab1d5c2ac17dd8a8fd346a47cf16',1,'main.cpp']]] +]; diff --git a/docs/html/search/variables_9.js b/docs/html/search/variables_9.js new file mode 100644 index 0000000..839b425 --- /dev/null +++ b/docs/html/search/variables_9.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['sd_5fcs_5fpin_0',['SD_CS_PIN',['../src_2main_8cpp.html#adcf3e4d2276ee4d10b23c05e4e7da0c3',1,'main.cpp']]], + ['set_5frun_5fmode_5fpin_1',['SET_RUN_MODE_PIN',['../src_2main_8cpp.html#abea45f8bc016d99f82b468ae77916e64',1,'main.cpp']]], + ['set_5ftest_5fmode_5fpin_2',['SET_TEST_MODE_PIN',['../src_2main_8cpp.html#ac0121f71eae2488320c2cd36a4843976',1,'main.cpp']]], + ['soh_5frecvd_5fflag_3',['SOH_recvd_flag',['../src_2main_8cpp.html#a6a02e76e786465c8d2fe8ba9ad3393da',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/search/variables_7.js b/docs/html/search/variables_a.js similarity index 100% rename from n4-flight-software/html/search/variables_7.js rename to docs/html/search/variables_a.js diff --git a/docs/html/search/variables_b.js b/docs/html/search/variables_b.js new file mode 100644 index 0000000..6631942 --- /dev/null +++ b/docs/html/search/variables_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value_0',['value',['../src_2main_8cpp.html#ac4f474c82e82cbb89ca7c36dd52be0ed',1,'main.cpp']]] +]; diff --git a/n4-flight-software/html/sensors_8h_source.html b/docs/html/sensors_8h_source.html similarity index 77% rename from n4-flight-software/html/sensors_8h_source.html rename to docs/html/sensors_8h_source.html index c69203e..7b634d3 100644 --- a/n4-flight-software/html/sensors_8h_source.html +++ b/docs/html/sensors_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: include/sensors.h Source File +N4 Flight Software: n4-flight-software/include/sensors.h Source File + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    sensors.h
    @@ -104,10 +113,13 @@
    10
    11#endif
    - - + + diff --git a/n4-flight-software/html/splitbar.png b/docs/html/splitbar.png similarity index 100% rename from n4-flight-software/html/splitbar.png rename to docs/html/splitbar.png diff --git a/n4-flight-software/html/splitbard.png b/docs/html/splitbard.png similarity index 100% rename from n4-flight-software/html/splitbard.png rename to docs/html/splitbard.png diff --git a/docs/html/src_2main_8cpp.html b/docs/html/src_2main_8cpp.html new file mode 100644 index 0000000..d2b7bb2 --- /dev/null +++ b/docs/html/src_2main_8cpp.html @@ -0,0 +1,1573 @@ + + + + + + + +N4 Flight Software: n4-flight-software/src/main.cpp File Reference + + + + + + + + + + + + + + + +
    +
    +
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    main.cpp File Reference
    +
    +
    + +

    This contains the main driver code for the flight computer. +More...

    +
    #include <Arduino.h>
    +#include <Wire.h>
    +#include <WiFi.h>
    +#include <PubSubClient.h>
    +#include <TinyGPSPlus.h>
    +#include <SFE_BMP180.h>
    +#include <FS.h>
    +#include <SD.h>
    +#include <SPIFFS.h>
    +#include "sensors.h"
    +#include "defs.h"
    +#include "mpu.h"
    +#include "SerialFlash.h"
    +#include "logger.h"
    +#include "data-types.h"
    +#include "custom-time.h"
    +#include "states.h"
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Macros

    +#define BAUDRATE   115200
     
    #define NAK_INTERVAL   4000
     
    #define SOH   0x01
     
    #define EOT   0x04
     
    #define ACK   0x06
     
    #define NAK   0x15
     
    #define CAN   0x18
     
    #define MAX_CMD_LENGTH   10
     
    #define MAX_CSV_LENGTH   256
     
    +#define FORMAT_SPIFFS_IF_FAILED   1
     
    #define TRANSMIT_TELEMETRY_BIT   ((EventBits_t) 0x01 << 0)
     
    +#define CHECK_FLIGHT_STATE_BIT   ((EventBits_t) 0x01 << 1)
     
    +#define LOG_TO_MEMORY_BIT   ((EventBits_t) 0x01 << 2)
     
    +#define TRANSMIT_XBEE_BIT   ((EventBits_t) 0x01 << 3)
     
    +#define DEBUG_TO_TERM_BIT   ((EventBits_t) 0x01 << 4)
     
    +#define ALTITUDE   1525.0
     
    + + + + +

    +Enumerations

    enum  TEST_STATE { HANDSHAKE = 0 +, RECEIVE_TEST_DATA +, CONFIRM_TEST_DATA + }
     This enum holds the states during flight computer test mode. More...
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void drogueChuteDeploy ()
     fires the pyro-charge to deploy the drogue chute Turn on the drogue chute ejection circuit by running the GPIO HIGH for a preset No. of seconds.
    + Default no. of seconds to remain HIGH is 5
     
    void mainChuteDeploy ()
     fires the pyro-charge to deploy the main chute Turn on the main chute ejection circuit by running the GPIO HIGH for a preset No. of seconds.
    + Default no. of seconds to remain HIGH is 5
     
    +PubSubClient mqtt_client (wifi_client)
     
    void listDir (fs::FS &fs, const char *dirname, uint8_t levels)
     
    void initGPIO ()
     Inititialize the GPIOs.
     
    +void InitSPIFFS ()
     
    +void initSD ()
     
    void SwitchLEDs (uint8_t red_state, uint8_t green_state)
     Switch the LEDS states.
     
    void InitXMODEM ()
     Initiate XMODEM protocol by sending a NAK command every 4 seconds until the transmitter returns an ACK signal.
     
    +void SerialEvent ()
     
    +void ParseSerial (char *)
     
    void checkRunTestToggle ()
     Sample the RUN/TEST toggle pins to check whether the fligh tcomputer is in test mode or run mode. If in TEST mode, define the TEST flag If in RUN mode, define the RUN flag TEST_MODE Pin and RUN_MODE pin are both pulled HIGH. When you set the jumper, you pull that pin to LOW.
     
    +void readFile (fs::FS &fs, const char *path)
     
    +void writeFile (fs::FS &fs, const char *path, const char *message)
     
    +void appendFile (fs::FS &fs, const char *path, const char *message)
     
    +void deleteFile (fs::FS &fs, const char *path)
     
    +void readTestDataFile ()
     
    void buzz ()
     Buzz the buzzer for a given buzz_interval This function is non-blocking.
     
    void blink_200ms (uint8_t led_pin)
     implements non-blocking blink
     
    +void ParseSerialBuffer (char *buffer)
     
    void ParseSerialNumeric (int value)
     Parse the received serial command if it is a digit We are only interested in numeric values being sent by the transmitter to us, the receiver.
     
    void handshakeSerialEvent ()
     Receive serial message during handshake.
     
    void receiveTestDataSerialEvent ()
     Receive serial message during RECEIVE_TEST_DATA state Data received in this state is the actual test data. It is saved into the test flash memory.
     
    void BMPInit ()
     Initialize BMP180 barometric sensor.
     
    void GPSInit ()
     Initialize the GPS connected on Serial2.
     
    void readAccelerationTask (void *pvParameter)
     Read acceleration data from the accelerometer.
     
    void readAltimeterTask (void *pvParameters)
     Read ar pressure data from the barometric sensor onboard.
     
    void readGPSTask (void *pvParameters)
     Read the GPS location data and altitude and append to telemetry packet for transmission.
     
    void clearTelemetryQueueTask (void *pvParameters)
     dequeue data from telemetry queue after all the tasks have consumed the data
     
    void checkFlightState (void *pvParameters)
     Check and update the current state of flight - refer to states.h.
     
    void flightStateCallback (void *pvParameters)
     performs flight actions based on the current flight state If the flight state neccessisates an operation, we perfom it here For example if the flight state is apogee, we perfom MAIN_CHUTE ejection
     
    void debugToTerminalTask (void *pvParameters)
     debug flight/test data to terminal, this task is called if the DEBUG_TO_TERMINAL is set to 1 (see defs.h)
     
    void logToMemory (void *pvParameter)
     log the data to the external flash memory
     
    void setup ()
     Setup - perfom initialization of all hardware subsystems, create queues, create queue handles initialize system check table.
     
    void loop ()
     Main loop.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    uint8_t operation_mode = 0
     
    uint8_t current_state = FLIGHT_STATE::PRE_FLIGHT_GROUND
     
    +WiFiClient wifi_client
     
    +TinyGPSPlus gps
     
    +uint8_t RUN_MODE = 0
     
    +uint8_t TEST_MODE = 0
     
    uint8_t SOH_recvd_flag = 0
     
    +unsigned long last_NAK_time = 0
     
    +unsigned long current_NAK_time = 0
     
    +char SOH_CHR [6] = "SOH"
     
    +char serial_buffer [MAX_CMD_LENGTH]
     
    +int16_t serial_index = 0
     
    +char test_data_buffer [MAX_CSV_LENGTH]
     
    +int16_t test_data_serial_index = 0
     
    uint8_t recv_data_led = 2
     
    uint8_t red_led = 15
     
    uint8_t green_led = 4
     
    +uint8_t buzzer = 33
     
    uint8_t SET_TEST_MODE_PIN = 14
     
    uint8_t SET_RUN_MODE_PIN = 13
     
    uint8_t SD_CS_PIN = 26
     
    uint8_t current_test_state = TEST_STATE::HANDSHAKE
     
    +const char * test_data_file = "/data.csv"
     
    +unsigned long last_buzz = 0
     
    +unsigned long current_buzz = 0
     
    +unsigned long buzz_interval = 200
     
    +uint8_t buzzer_state = LOW
     
    +unsigned long last_blink = 0
     
    +unsigned long current_blink = 0
     
    +unsigned long blink_interval = 200
     
    +uint8_t led_state = LOW
     
    int value = 0
     Parse the received serial command if it is a string.
     
    +uint8_t drogue_pyro = 25
     
    +uint8_t main_pyro = 12
     
    uint8_t flash_cs_pin = 5
     
    +uint8_t remote_switch = 27
     
    uint8_t flash_led_pin = 39
     
    char filename [] = "flight.bin"
     
    uint32_t FILE_SIZE_512K = 524288L
     
    uint32_t FILE_SIZE_1M = 1048576L
     
    uint32_t FILE_SIZE_4M = 4194304L
     
    SerialFlashFile file
     
    unsigned long long previous_log_time = 0
     
    unsigned long long current_log_time = 0
     
    uint16_t log_sample_interval = 10
     
    +DataLogger data_logger (flash_cs_pin, flash_led_pin, filename, file, FILE_SIZE_4M)
     
    +long long current_time = 0
     
    +long long previous_time = 0
     
    +EventGroupHandle_t tasksDataReceiveEventGroup
     
    accel_type_t acc_data
     
    +gyro_type_t gyro_data
     
    +gps_type_t gps_data
     
    +altimeter_type_t altimeter_data
     
    +telemetry_type_t telemetry_packet
     
    MPU6050 imu (0x68, 16, 1000)
     
    +SFE_BMP180 altimeter
     
    +char status
     
    +double T
     
    +double P
     
    +double p0
     
    +double a
     
    QueueHandle_t telemetry_data_qHandle
     
    +QueueHandle_t accel_data_qHandle
     
    +QueueHandle_t altimeter_data_qHandle
     
    +QueueHandle_t gps_data_qHandle
     
    +

    Detailed Description

    +

    This contains the main driver code for the flight computer.

    +
    Author
    Edwin Mwiti
    +
    Version
    0.1
    +
    Date
    July 15 2024
    +

    0x5765206D6179206D616B65206F757220706C616E73202C 0x62757420476F642068617320746865206C61737420776F7264

    +

    Macro Definition Documentation

    + +

    ◆ ACK

    + +
    +
    + + + + +
    #define ACK   0x06
    +
    +

    positive acknowledgement

    + +
    +
    + +

    ◆ CAN

    + +
    +
    + + + + +
    #define CAN   0x18
    +
    +

    cancel

    + +
    +
    + +

    ◆ EOT

    + +
    +
    + + + + +
    #define EOT   0x04
    +
    +

    end of transmission

    + +
    +
    + +

    ◆ MAX_CMD_LENGTH

    + +
    +
    + + + + +
    #define MAX_CMD_LENGTH   10
    +
    +

    Maximum length of the XMODEM command string that can be received

    + +
    +
    + +

    ◆ MAX_CSV_LENGTH

    + +
    +
    + + + + +
    #define MAX_CSV_LENGTH   256
    +
    +

    Maximum length of the csv string that can be received

    + +
    +
    + +

    ◆ NAK

    + +
    +
    + + + + +
    #define NAK   0x15
    +
    +

    negative acknowledgement

    + +
    +
    + +

    ◆ NAK_INTERVAL

    + +
    +
    + + + + +
    #define NAK_INTERVAL   4000
    +
    +

    Interval in which to send the NAK command to the transmitter

    + +
    +
    + +

    ◆ SOH

    + +
    +
    + + + + +
    #define SOH   0x01
    +
    +

    start of header

    + +
    +
    + +

    ◆ TRANSMIT_TELEMETRY_BIT

    + +
    +
    + + + + +
    #define TRANSMIT_TELEMETRY_BIT   ((EventBits_t) 0x01 << 0)
    +
    +

    Task synchronization variables

    + +
    +
    +

    Enumeration Type Documentation

    + +

    ◆ TEST_STATE

    + +
    +
    + + + + +
    enum TEST_STATE
    +
    + +

    This enum holds the states during flight computer test mode.

    +
    + + + +
    Enumerator
    HANDSHAKE 

    state to establish initial communication with transmitter

    +
    RECEIVE_TEST_DATA 

    sets the flight computer to receive test data over serial

    +
    + +
    +
    +

    Function Documentation

    + +

    ◆ blink_200ms()

    + +
    +
    + + + + + + + +
    void blink_200ms (uint8_t led_pin)
    +
    + +

    implements non-blocking blink

    +
    + +
    +
    + +

    ◆ BMPInit()

    + +
    +
    + + + + + + + +
    void BMPInit ()
    +
    + +

    Initialize BMP180 barometric sensor.

    +
    +
    Returns
    TODO: 1 if init OK, 0 otherwise
    + +
    +
    + +

    ◆ buzz()

    + +
    +
    + + + + + + + +
    void buzz ()
    +
    + +

    Buzz the buzzer for a given buzz_interval This function is non-blocking.

    +
    + +
    +
    + +

    ◆ checkFlightState()

    + +
    +
    + + + + + + + +
    void checkFlightState (void * pvParameters)
    +
    + +

    Check and update the current state of flight - refer to states.h.

    +
    +
    Parameters
    + + +
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    +
    Returns
    Updates the telemetry data flight state value
    + +
    +
    + +

    ◆ checkRunTestToggle()

    + +
    +
    + + + + + + + +
    void checkRunTestToggle ()
    +
    + +

    Sample the RUN/TEST toggle pins to check whether the fligh tcomputer is in test mode or run mode. If in TEST mode, define the TEST flag If in RUN mode, define the RUN flag TEST_MODE Pin and RUN_MODE pin are both pulled HIGH. When you set the jumper, you pull that pin to LOW.

    +
    + +
    +
    + +

    ◆ clearTelemetryQueueTask()

    + +
    +
    + + + + + + + +
    void clearTelemetryQueueTask (void * pvParameters)
    +
    + +

    dequeue data from telemetry queue after all the tasks have consumed the data

    +
    +
    Parameters
    + + +
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    +
    Returns
    none
    + +
    +
    + +

    ◆ debugToTerminalTask()

    + +
    +
    + + + + + + + +
    void debugToTerminalTask (void * pvParameters)
    +
    + +

    debug flight/test data to terminal, this task is called if the DEBUG_TO_TERMINAL is set to 1 (see defs.h)

    +
    +
    Parameters
    + + +
    pvParameter- A value that is passed as the paramater to the created task. If pvParameter is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    + +
    +
    + +

    ◆ drogueChuteDeploy()

    + +
    +
    + + + + + + + +
    void drogueChuteDeploy ()
    +
    + +

    fires the pyro-charge to deploy the drogue chute Turn on the drogue chute ejection circuit by running the GPIO HIGH for a preset No. of seconds.
    + Default no. of seconds to remain HIGH is 5

    +
    + +
    +
    + +

    ◆ flightStateCallback()

    + +
    +
    + + + + + + + +
    void flightStateCallback (void * pvParameters)
    +
    + +

    performs flight actions based on the current flight state If the flight state neccessisates an operation, we perfom it here For example if the flight state is apogee, we perfom MAIN_CHUTE ejection

    +
    +
    Parameters
    + + +
    pvParameter- A value that is passed as the paramater to the created task. If pvParameter is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    + +
    +
    + +

    ◆ GPSInit()

    + +
    +
    + + + + + + + +
    void GPSInit ()
    +
    + +

    Initialize the GPS connected on Serial2.

    +
    +
    Returns
    1 if init OK, 0 otherwise
    + +
    +
    + +

    ◆ handshakeSerialEvent()

    + +
    +
    + + + + + + + +
    void handshakeSerialEvent ()
    +
    + +

    Receive serial message during handshake.

    +
    + +
    +
    + +

    ◆ initGPIO()

    + +
    +
    + + + + + + + +
    void initGPIO ()
    +
    + +

    Inititialize the GPIOs.

    +
    + +
    +
    + +

    ◆ InitXMODEM()

    + +
    +
    + + + + + + + +
    void InitXMODEM ()
    +
    + +

    Initiate XMODEM protocol by sending a NAK command every 4 seconds until the transmitter returns an ACK signal.

    +

    XMODEM serial function definition

    +
    +
    Parameters
    + + +
    none
    +
    +
    + +
    +
    + +

    ◆ listDir()

    + +
    +
    + + + + + + + + + + + + + + + + +
    void listDir (fs::FS & fs,
    const char * dirname,
    uint8_t levels )
    +
    +

    XMODEM serial function prototypes

    + +
    +
    + +

    ◆ logToMemory()

    + +
    +
    + + + + + + + +
    void logToMemory (void * pvParameter)
    +
    + +

    log the data to the external flash memory

    +
    +
    Parameters
    + + +
    pvParameter- A value that is passed as the paramater to the created task. If pvParameter is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    + +
    +
    + +

    ◆ loop()

    + +
    +
    + + + + + + + +
    void loop ()
    +
    + +

    Main loop.

    +
    + +
    +
    + +

    ◆ mainChuteDeploy()

    + +
    +
    + + + + + + + +
    void mainChuteDeploy ()
    +
    + +

    fires the pyro-charge to deploy the main chute Turn on the main chute ejection circuit by running the GPIO HIGH for a preset No. of seconds.
    + Default no. of seconds to remain HIGH is 5

    +
    + +
    +
    + +

    ◆ ParseSerialNumeric()

    + +
    +
    + + + + + + + +
    void ParseSerialNumeric (int value)
    +
    + +

    Parse the received serial command if it is a digit We are only interested in numeric values being sent by the transmitter to us, the receiver.

    +
    + +
    +
    + +

    ◆ readAccelerationTask()

    + +
    +
    + + + + + + + +
    void readAccelerationTask (void * pvParameter)
    +
    + +

    Read acceleration data from the accelerometer.

    +
    +
    Parameters
    + + +
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    +
    Returns
    Updates accelerometer data struct on the telemetry queue
    + +
    +
    + +

    ◆ readAltimeterTask()

    + +
    +
    + + + + + + + +
    void readAltimeterTask (void * pvParameters)
    +
    + +

    Read ar pressure data from the barometric sensor onboard.

    +
    +
    Parameters
    + + +
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    +
    Returns
    Sends altimeter data to altimeter queue
    + +
    +
    + +

    ◆ readGPSTask()

    + +
    +
    + + + + + + + +
    void readGPSTask (void * pvParameters)
    +
    + +

    Read the GPS location data and altitude and append to telemetry packet for transmission.

    +
    +
    Parameters
    + + +
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    +
    +
    + +
    +
    + +

    ◆ receiveTestDataSerialEvent()

    + +
    +
    + + + + + + + +
    void receiveTestDataSerialEvent ()
    +
    + +

    Receive serial message during RECEIVE_TEST_DATA state Data received in this state is the actual test data. It is saved into the test flash memory.

    +
    + +
    +
    + +

    ◆ setup()

    + +
    +
    + + + + + + + +
    void setup ()
    +
    + +

    Setup - perfom initialization of all hardware subsystems, create queues, create queue handles initialize system check table.

    +
    + +
    +
    + +

    ◆ SwitchLEDs()

    + +
    +
    + + + + + + + + + + + +
    void SwitchLEDs (uint8_t red_state,
    uint8_t green_state )
    +
    + +

    Switch the LEDS states.

    +
    + +
    +
    +

    Variable Documentation

    + +

    ◆ acc_data

    + +
    +
    + + + + +
    accel_type_t acc_data
    +
    +

    ///////////////////////// DATA TYPES /////////////////////////

    + +
    +
    + +

    ◆ current_log_time

    + +
    +
    + + + + +
    unsigned long long current_log_time = 0
    +
    +

    What is the processor time right now?

    + +
    +
    + +

    ◆ current_state

    + +
    +
    + + + + +
    uint8_t current_state = FLIGHT_STATE::PRE_FLIGHT_GROUND
    +
    +

    The starting state - we start at PRE_FLIGHT_GROUND state

    + +
    +
    + +

    ◆ current_test_state

    + +
    +
    + + + + +
    uint8_t current_test_state = TEST_STATE::HANDSHAKE
    +
    +

    Define current state the flight computer is in

    + +
    +
    + +

    ◆ file

    + +
    +
    + + + + +
    SerialFlashFile file
    +
    +

    object representing file object for flash memory

    + +
    +
    + +

    ◆ FILE_SIZE_1M

    + +
    +
    + + + + +
    uint32_t FILE_SIZE_1M = 1048576L
    +
    +

    1MB

    + +
    +
    + +

    ◆ FILE_SIZE_4M

    + +
    +
    + + + + +
    uint32_t FILE_SIZE_4M = 4194304L
    +
    +

    4MB

    + +
    +
    + +

    ◆ FILE_SIZE_512K

    + +
    +
    + + + + +
    uint32_t FILE_SIZE_512K = 524288L
    +
    +

    512KB

    + +
    +
    + +

    ◆ filename

    + +
    +
    + + + + +
    char filename[] = "flight.bin"
    +
    +

    data log filename - Filename must be less than 20 chars, including the file extension

    + +
    +
    + +

    ◆ flash_cs_pin

    + +
    +
    + + + + +
    uint8_t flash_cs_pin = 5
    +
    +

    External flash memory chip select pin

    + +
    +
    + +

    ◆ flash_led_pin

    + +
    +
    + + + + +
    uint8_t flash_led_pin = 39
    +
    +

    LED pin connected to indicate flash memory formatting
    +

    + +
    +
    + +

    ◆ green_led

    + +
    +
    + + + + +
    uint8_t green_led = 4
    +
    +

    Green LED pin

    + +
    +
    + +

    ◆ imu

    + +
    +
    + + + + + + + + + + + + + + + + +
    MPU6050 imu(0x68, 16, 1000) (0x68 ,
    16 ,
    1000  )
    +
    +

    ///////////////////////// END OF DATA VARIABLES ///////////////////////// create an MPU6050 object 0x68 is the address of the MPU set gyro to max deg to 1000 deg/sec set accel fs reading to 16g

    + +
    +
    + +

    ◆ log_sample_interval

    + +
    +
    + + + + +
    uint16_t log_sample_interval = 10
    +
    +

    After how long should we sample and log data to flash memory?

    + +
    +
    + +

    ◆ operation_mode

    + +
    +
    + + + + +
    uint8_t operation_mode = 0
    +
    +

    Tells whether software is in safe or flight mode - FLIGHT_MODE=1, SAFE_MODE=0

    + +
    +
    + +

    ◆ previous_log_time

    + +
    +
    + + + + +
    unsigned long long previous_log_time = 0
    +
    +

    The last time we logged data to memory

    + +
    +
    + +

    ◆ recv_data_led

    + +
    +
    + + + + +
    uint8_t recv_data_led = 2
    +
    +

    External flash memory chip select pin

    + +
    +
    + +

    ◆ red_led

    + +
    +
    + + + + +
    uint8_t red_led = 15
    +
    +

    Red LED pin

    + +
    +
    + +

    ◆ SD_CS_PIN

    + +
    +
    + + + + +
    uint8_t SD_CS_PIN = 26
    +
    +

    Chip select pin for SD card

    + +
    +
    + +

    ◆ SET_RUN_MODE_PIN

    + +
    +
    + + + + +
    uint8_t SET_RUN_MODE_PIN = 13
    +
    +

    Pin to set the flight computer to RUN mode

    + +
    +
    + +

    ◆ SET_TEST_MODE_PIN

    + +
    +
    + + + + +
    uint8_t SET_TEST_MODE_PIN = 14
    +
    +

    Pin to set the flight computer to TEST mode

    + +
    +
    + +

    ◆ SOH_recvd_flag

    + +
    +
    + + + + +
    uint8_t SOH_recvd_flag = 0
    +
    +

    Transmitter acknowledged?
    +

    + +
    +
    + +

    ◆ telemetry_data_qHandle

    + +
    +
    + + + + +
    QueueHandle_t telemetry_data_qHandle
    +
    +

    ///////////////////////// END OF PERIPHERALS INIT /////////////////////////

    + +
    +
    + +

    ◆ value

    + +
    +
    + + + + +
    int value = 0
    +
    + +

    Parse the received serial command if it is a string.

    +
    + +
    +
    +
    +
    + + + + diff --git a/docs/html/src_2main_8cpp.js b/docs/html/src_2main_8cpp.js new file mode 100644 index 0000000..c970326 --- /dev/null +++ b/docs/html/src_2main_8cpp.js @@ -0,0 +1,65 @@ +var src_2main_8cpp = +[ + [ "ACK", "src_2main_8cpp.html#a6f6489887e08bff4887d0bc5dcf214d8", null ], + [ "CAN", "src_2main_8cpp.html#a427a40e102258055c72607bf7b604549", null ], + [ "EOT", "src_2main_8cpp.html#aa3210a5256085e136fed7897ae93a756", null ], + [ "MAX_CMD_LENGTH", "src_2main_8cpp.html#a2e69b1ee7e19bfbe378c886f88e60fac", null ], + [ "MAX_CSV_LENGTH", "src_2main_8cpp.html#a3aad00c42368296b28f72f623c446925", null ], + [ "NAK", "src_2main_8cpp.html#a7ff3e502ffb5d509612c6c6741de45cc", null ], + [ "NAK_INTERVAL", "src_2main_8cpp.html#a394162e74bbeb9bf67d3009cc38e0466", null ], + [ "SOH", "src_2main_8cpp.html#ab3796cca360697d3658162dba5965e28", null ], + [ "TRANSMIT_TELEMETRY_BIT", "src_2main_8cpp.html#a3101d6fdbdc9f9b1d5395471a32e23c9", null ], + [ "TEST_STATE", "src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09d", [ + [ "HANDSHAKE", "src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09dacc6ddcaa36bd57e5aec12749cb5ce29c", null ], + [ "RECEIVE_TEST_DATA", "src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09da078eb5ef5383567cdf7a9b36f49289d6", null ], + [ "CONFIRM_TEST_DATA", "src_2main_8cpp.html#a7010bdd588d627529b5948acb89dc09da45b2e590181d2cc1c7626bea6a9b6810", null ] + ] ], + [ "blink_200ms", "src_2main_8cpp.html#a4139203bf745c4d38fd73bab228d571e", null ], + [ "BMPInit", "src_2main_8cpp.html#a80d57b1ee5cb9d474465d3f8485f5bbc", null ], + [ "buzz", "src_2main_8cpp.html#a28b1eb955e6e2f5e83599536f6bf4d2f", null ], + [ "checkFlightState", "src_2main_8cpp.html#a152aa3ad3c21993eb70968de75219174", null ], + [ "checkRunTestToggle", "src_2main_8cpp.html#a36d26be00724540c08411ce54b01a49b", null ], + [ "clearTelemetryQueueTask", "src_2main_8cpp.html#a2eee545cf4af91a694e63ac4940276a4", null ], + [ "debugToTerminalTask", "src_2main_8cpp.html#aaa1a5716bd567e8c37465dabe33e6396", null ], + [ "drogueChuteDeploy", "src_2main_8cpp.html#aee373e9d6ea48f0b376bdaa1c2970510", null ], + [ "flightStateCallback", "src_2main_8cpp.html#a6648d201a9f47aa836d36e5339e78ef3", null ], + [ "GPSInit", "src_2main_8cpp.html#a6f220446b54026b1217f93a3a9c04c1f", null ], + [ "handshakeSerialEvent", "src_2main_8cpp.html#a41453ccb33ef6b57e513b16e92dd130e", null ], + [ "initGPIO", "src_2main_8cpp.html#ae8297bf2b99a2ad67af6f9a421ea4b16", null ], + [ "InitXMODEM", "src_2main_8cpp.html#abf447a0860a5fec74fecf8654172fec0", null ], + [ "listDir", "src_2main_8cpp.html#a8841578fe91cace6206676f0e751cab5", null ], + [ "logToMemory", "src_2main_8cpp.html#a7df146b43e503e23146e698154d5096d", null ], + [ "loop", "src_2main_8cpp.html#afe461d27b9c48d5921c00d521181f12f", null ], + [ "mainChuteDeploy", "src_2main_8cpp.html#a9074d493ccf55d0cfa3acd2d173f665a", null ], + [ "ParseSerialNumeric", "src_2main_8cpp.html#a102c6561be41c1aafb3bd6da443deed7", null ], + [ "readAccelerationTask", "src_2main_8cpp.html#a64be9ebbabd58a9b6d32b92ce607f2a6", null ], + [ "readAltimeterTask", "src_2main_8cpp.html#a5947e71102388e9d5bfd09f8e97d668c", null ], + [ "readGPSTask", "src_2main_8cpp.html#aa8ea491ed98b16bb5292ad184537f0b5", null ], + [ "receiveTestDataSerialEvent", "src_2main_8cpp.html#a61040c538622d7ad222068e37d96b52a", null ], + [ "setup", "src_2main_8cpp.html#a4fc01d736fe50cf5b977f755b675f11d", null ], + [ "SwitchLEDs", "src_2main_8cpp.html#a5f3e40ff0b3b6f2c247fadc41b0a5896", null ], + [ "acc_data", "src_2main_8cpp.html#a5db507f1ef37ed2d76f24c064e4e6a85", null ], + [ "current_log_time", "src_2main_8cpp.html#a318b23db9cedde5ea8466af114f0c203", null ], + [ "current_state", "src_2main_8cpp.html#ac559654865b2d48ea0b77b1a1f4a097b", null ], + [ "current_test_state", "src_2main_8cpp.html#a9dc783a2c139e60a49e643aed8b741b9", null ], + [ "file", "src_2main_8cpp.html#ada14cbbf98490eb3cb49b5d1cb0c0056", null ], + [ "FILE_SIZE_1M", "src_2main_8cpp.html#a1ba4fed8e0dad7fbe3e7de830a2e9f6c", null ], + [ "FILE_SIZE_4M", "src_2main_8cpp.html#aef692c53edfa11997d3470f8ed1d6a26", null ], + [ "FILE_SIZE_512K", "src_2main_8cpp.html#aa9614a793fcf876f8e55a118d21d2d77", null ], + [ "filename", "src_2main_8cpp.html#a6c2affe0788e6ba12dce7a51e1bd35c3", null ], + [ "flash_cs_pin", "src_2main_8cpp.html#a974c70ac5c2f6156bf0e7fafd973d803", null ], + [ "flash_led_pin", "src_2main_8cpp.html#ab506410443108766020e011a3c9293af", null ], + [ "green_led", "src_2main_8cpp.html#ac4026e93b77dbb4130e8114a3ce0f669", null ], + [ "imu", "src_2main_8cpp.html#aea39bb6bc24075cef46a6b4d55071082", null ], + [ "log_sample_interval", "src_2main_8cpp.html#affaa6e6cce540b233b04e558e3d164b2", null ], + [ "operation_mode", "src_2main_8cpp.html#a59b33f351d47779eaaff510227075be1", null ], + [ "previous_log_time", "src_2main_8cpp.html#ac03f1f50d9e1452593353033c5b2b1b0", null ], + [ "recv_data_led", "src_2main_8cpp.html#a7047c2926a0671d98c6f80a4015f2c14", null ], + [ "red_led", "src_2main_8cpp.html#a450aab1d5c2ac17dd8a8fd346a47cf16", null ], + [ "SD_CS_PIN", "src_2main_8cpp.html#adcf3e4d2276ee4d10b23c05e4e7da0c3", null ], + [ "SET_RUN_MODE_PIN", "src_2main_8cpp.html#abea45f8bc016d99f82b468ae77916e64", null ], + [ "SET_TEST_MODE_PIN", "src_2main_8cpp.html#ac0121f71eae2488320c2cd36a4843976", null ], + [ "SOH_recvd_flag", "src_2main_8cpp.html#a6a02e76e786465c8d2fe8ba9ad3393da", null ], + [ "telemetry_data_qHandle", "src_2main_8cpp.html#a0ed5ea94df7417ea494d69ca56aab490", null ], + [ "value", "src_2main_8cpp.html#ac4f474c82e82cbb89ca7c36dd52be0ed", null ] +]; \ No newline at end of file diff --git a/docs/html/states_8h.html b/docs/html/states_8h.html new file mode 100644 index 0000000..506b2c0 --- /dev/null +++ b/docs/html/states_8h.html @@ -0,0 +1,139 @@ + + + + + + + +N4 Flight Software: n4-flight-software/src/states.h File Reference + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    states.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Enumerations

    enum  FLIGHT_STATE {
    +  PRE_FLIGHT_GROUND = 0 +, POWERED_FLIGHT +, COASTING +, APOGEE +,
    +  DROGUE_DEPLOY +, DROGUE_DESCENT +, MAIN_DEPLOY +, MAIN_DESCENT +,
    +  POST_FLIGHT_GROUND +
    + }
     
    +

    Detailed Description

    +

    This file describes the flight states

    +
    +
    + + + + diff --git a/docs/html/states_8h_source.html b/docs/html/states_8h_source.html new file mode 100644 index 0000000..0d6d40a --- /dev/null +++ b/docs/html/states_8h_source.html @@ -0,0 +1,131 @@ + + + + + + + +N4 Flight Software: n4-flight-software/src/states.h Source File + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    N4 Flight Software N4 +
    +
    Flight software used for the N4 flight computers
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    states.h
    +
    +
    +Go to the documentation of this file.
    1
    +
    6#ifndef STATES_H
    +
    7#define STATES_H
    +
    8
    +
    9typedef enum {
    +
    10 PRE_FLIGHT_GROUND = 0,
    +
    11 POWERED_FLIGHT,
    +
    12 COASTING,
    +
    13 APOGEE,
    +
    14 DROGUE_DEPLOY,
    +
    15 DROGUE_DESCENT,
    +
    16 MAIN_DEPLOY,
    +
    17 MAIN_DESCENT,
    +
    18 POST_FLIGHT_GROUND
    +
    19} FLIGHT_STATE;
    +
    20
    +
    21#endif
    +
    +
    + + + + diff --git a/n4-flight-software/html/struct_acceleration___data-members.html b/docs/html/struct_acceleration___data-members.html similarity index 82% rename from n4-flight-software/html/struct_acceleration___data-members.html rename to docs/html/struct_acceleration___data-members.html index 24ee2ff..bf123de 100644 --- a/n4-flight-software/html/struct_acceleration___data-members.html +++ b/docs/html/struct_acceleration___data-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Acceleration_Data Member List
    @@ -97,10 +110,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    pitch (defined in Acceleration_Data)Acceleration_Data
    roll (defined in Acceleration_Data)Acceleration_Data
    - - + + diff --git a/n4-flight-software/html/struct_acceleration___data.html b/docs/html/struct_acceleration___data.html similarity index 83% rename from n4-flight-software/html/struct_acceleration___data.html rename to docs/html/struct_acceleration___data.html index aaeaa46..fa3e5b6 100644 --- a/n4-flight-software/html/struct_acceleration___data.html +++ b/docs/html/struct_acceleration___data.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Attributes | @@ -115,13 +128,16 @@

    Detailed Description

    ///////////////////////// DATA TYPES /////////////////////////


    The documentation for this struct was generated from the following file:
    - -
    + + diff --git a/n4-flight-software/html/struct_altimeter___data-members.html b/docs/html/struct_altimeter___data-members.html similarity index 82% rename from n4-flight-software/html/struct_altimeter___data-members.html rename to docs/html/struct_altimeter___data-members.html index fd5ea52..7f28ad5 100644 --- a/n4-flight-software/html/struct_altimeter___data-members.html +++ b/docs/html/struct_altimeter___data-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Altimeter_Data Member List
    @@ -97,10 +110,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    temperature (defined in Altimeter_Data)Altimeter_Data
    velocity (defined in Altimeter_Data)Altimeter_Data
    - - + + diff --git a/n4-flight-software/html/struct_altimeter___data.html b/docs/html/struct_altimeter___data.html similarity index 82% rename from n4-flight-software/html/struct_altimeter___data.html rename to docs/html/struct_altimeter___data.html index 7e8536b..c904d91 100644 --- a/n4-flight-software/html/struct_altimeter___data.html +++ b/docs/html/struct_altimeter___data.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Attributes | @@ -111,13 +124,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this struct was generated from the following file: - - + + diff --git a/n4-flight-software/html/struct_filtered___data-members.html b/docs/html/struct_filtered___data-members.html similarity index 78% rename from n4-flight-software/html/struct_filtered___data-members.html rename to docs/html/struct_filtered___data-members.html index 4eae6bd..856ea82 100644 --- a/n4-flight-software/html/struct_filtered___data-members.html +++ b/docs/html/struct_filtered___data-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Filtered_Data Member List
    @@ -93,10 +106,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    x_acceleration (defined in Filtered_Data)Filtered_Data
    - - + + diff --git a/n4-flight-software/html/struct_filtered___data.html b/docs/html/struct_filtered___data.html similarity index 77% rename from n4-flight-software/html/struct_filtered___data.html rename to docs/html/struct_filtered___data.html index e49b372..be03c8d 100644 --- a/n4-flight-software/html/struct_filtered___data.html +++ b/docs/html/struct_filtered___data.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Attributes | @@ -99,13 +112,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this struct was generated from the following file: - - + + diff --git a/n4-flight-software/html/struct_g_p_s___data-members.html b/docs/html/struct_g_p_s___data-members.html similarity index 81% rename from n4-flight-software/html/struct_g_p_s___data-members.html rename to docs/html/struct_g_p_s___data-members.html index 85a2cda..493f70e 100644 --- a/n4-flight-software/html/struct_g_p_s___data-members.html +++ b/docs/html/struct_g_p_s___data-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    GPS_Data Member List
    @@ -96,10 +109,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    longitude (defined in GPS_Data)GPS_Data
    time (defined in GPS_Data)GPS_Data
    - - + + diff --git a/n4-flight-software/html/struct_g_p_s___data.html b/docs/html/struct_g_p_s___data.html similarity index 81% rename from n4-flight-software/html/struct_g_p_s___data.html rename to docs/html/struct_g_p_s___data.html index 2da0a93..b7f838f 100644 --- a/n4-flight-software/html/struct_g_p_s___data.html +++ b/docs/html/struct_g_p_s___data.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Attributes | @@ -108,13 +121,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this struct was generated from the following file: - - + + diff --git a/n4-flight-software/html/struct_gyroscope___data-members.html b/docs/html/struct_gyroscope___data-members.html similarity index 80% rename from n4-flight-software/html/struct_gyroscope___data-members.html rename to docs/html/struct_gyroscope___data-members.html index 18b7bf5..924306d 100644 --- a/n4-flight-software/html/struct_gyroscope___data-members.html +++ b/docs/html/struct_gyroscope___data-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Gyroscope_Data Member List
    @@ -95,10 +108,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    gy (defined in Gyroscope_Data)Gyroscope_Data
    gz (defined in Gyroscope_Data)Gyroscope_Data
    - - + + diff --git a/n4-flight-software/html/struct_gyroscope___data.html b/docs/html/struct_gyroscope___data.html similarity index 80% rename from n4-flight-software/html/struct_gyroscope___data.html rename to docs/html/struct_gyroscope___data.html index 020087d..476faf3 100644 --- a/n4-flight-software/html/struct_gyroscope___data.html +++ b/docs/html/struct_gyroscope___data.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Attributes | @@ -105,13 +118,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this struct was generated from the following file: - - + + diff --git a/n4-flight-software/html/struct_telemetry___data-members.html b/docs/html/struct_telemetry___data-members.html similarity index 83% rename from n4-flight-software/html/struct_telemetry___data-members.html rename to docs/html/struct_telemetry___data-members.html index abdbab6..907cfb1 100644 --- a/n4-flight-software/html/struct_telemetry___data-members.html +++ b/docs/html/struct_telemetry___data-members.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Telemetry_Data Member List
    @@ -99,10 +112,12 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    record_number (defined in Telemetry_Data)Telemetry_Data
    state (defined in Telemetry_Data)Telemetry_Data
    - - + + diff --git a/n4-flight-software/html/struct_telemetry___data.html b/docs/html/struct_telemetry___data.html similarity index 84% rename from n4-flight-software/html/struct_telemetry___data.html rename to docs/html/struct_telemetry___data.html index f2c0b57..b41e46d 100644 --- a/n4-flight-software/html/struct_telemetry___data.html +++ b/docs/html/struct_telemetry___data.html @@ -11,6 +11,8 @@ + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    -
    -
    Public Attributes | @@ -117,13 +130,16 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
     

    The documentation for this struct was generated from the following file: - - + + diff --git a/n4-flight-software/html/sync_off.png b/docs/html/sync_off.png similarity index 100% rename from n4-flight-software/html/sync_off.png rename to docs/html/sync_off.png diff --git a/n4-flight-software/html/sync_on.png b/docs/html/sync_on.png similarity index 100% rename from n4-flight-software/html/sync_on.png rename to docs/html/sync_on.png diff --git a/n4-flight-software/html/tab_a.png b/docs/html/tab_a.png similarity index 100% rename from n4-flight-software/html/tab_a.png rename to docs/html/tab_a.png diff --git a/n4-flight-software/html/tab_ad.png b/docs/html/tab_ad.png similarity index 100% rename from n4-flight-software/html/tab_ad.png rename to docs/html/tab_ad.png diff --git a/n4-flight-software/html/tab_b.png b/docs/html/tab_b.png similarity index 100% rename from n4-flight-software/html/tab_b.png rename to docs/html/tab_b.png diff --git a/n4-flight-software/html/tab_bd.png b/docs/html/tab_bd.png similarity index 100% rename from n4-flight-software/html/tab_bd.png rename to docs/html/tab_bd.png diff --git a/n4-flight-software/html/tab_h.png b/docs/html/tab_h.png similarity index 100% rename from n4-flight-software/html/tab_h.png rename to docs/html/tab_h.png diff --git a/n4-flight-software/html/tab_hd.png b/docs/html/tab_hd.png similarity index 100% rename from n4-flight-software/html/tab_hd.png rename to docs/html/tab_hd.png diff --git a/n4-flight-software/html/tab_s.png b/docs/html/tab_s.png similarity index 100% rename from n4-flight-software/html/tab_s.png rename to docs/html/tab_s.png diff --git a/n4-flight-software/html/tab_sd.png b/docs/html/tab_sd.png similarity index 100% rename from n4-flight-software/html/tab_sd.png rename to docs/html/tab_sd.png diff --git a/n4-flight-software/html/tabs.css b/docs/html/tabs.css similarity index 100% rename from n4-flight-software/html/tabs.css rename to docs/html/tabs.css diff --git a/n4-flight-software/html/test_2state__machine_8cpp.html b/docs/html/test_2state__machine_8cpp.html similarity index 72% rename from n4-flight-software/html/test_2state__machine_8cpp.html rename to docs/html/test_2state__machine_8cpp.html index 8553e1d..c4f5711 100644 --- a/n4-flight-software/html/test_2state__machine_8cpp.html +++ b/docs/html/test_2state__machine_8cpp.html @@ -5,12 +5,14 @@ -N4 Flight Software: test/state_machine.cpp File Reference +N4 Flight Software: n4-flight-software/test/state_machine.cpp File Reference + + @@ -24,10 +26,11 @@ + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    state_machine.cpp File Reference
    @@ -101,10 +110,13 @@
    Date
    2023-03-28
    - - + + diff --git a/n4-flight-software/html/test_2state__machine_8h_source.html b/docs/html/test_2state__machine_8h_source.html similarity index 81% rename from n4-flight-software/html/test_2state__machine_8h_source.html rename to docs/html/test_2state__machine_8h_source.html index d8be6aa..6c5b742 100644 --- a/n4-flight-software/html/test_2state__machine_8h_source.html +++ b/docs/html/test_2state__machine_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: test/state_machine.h Source File +N4 Flight Software: n4-flight-software/test/state_machine.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    state_machine.h
    @@ -112,10 +121,13 @@
    18#endif
    Definition state_machine.h:6
    - - + + diff --git a/n4-flight-software/html/test__class_8h_source.html b/docs/html/test__class_8h_source.html similarity index 78% rename from n4-flight-software/html/test__class_8h_source.html rename to docs/html/test__class_8h_source.html index 77bb050..799ec14 100644 --- a/n4-flight-software/html/test__class_8h_source.html +++ b/docs/html/test__class_8h_source.html @@ -5,12 +5,14 @@ -N4 Flight Software: test/test_class.h Source File +N4 Flight Software: n4-flight-software/test/test_class.h Source File + + @@ -24,10 +26,11 @@
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    + @@ -50,17 +53,29 @@ + +
    + +
    +
    +
    +
    - -
    -
    test_class.h
    @@ -106,10 +115,13 @@
    10}
    Definition test_class.h:1
    - - + + diff --git a/flight-computer-pin-assignment-version-1.xlsx b/flight-computer-pin-assignment-version-1.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..b55745b28aee5f213fb7777171426eaeced78a06 GIT binary patch literal 11690 zcmeHt1y>zg()Pif;CgU(4^D!+yCk?B+}(p)a0!s$?rwqL5*&g%1b2r3-??{Y-ppn0 z_X}pa*Xq4`bwAbJyX&c{T~$i5P|#QaSO7c#03ZVha|e#uLI42JFaQ8103K3T)Xvt~ z)Ye&F&BNZ*=^eAXjWuZwG$id803`VS|84)pGf<{BXxqh#)~>n#M(nFbcy?$>2|Ta` zs7tvEm+Bs`McJ^8Py5S<#!Okg8vYxVvh|oQ^@RXl`2w}J$lFb8=6h{LN&}?A=yJz1 z!AGgj;(>W(8qu{MBe}ldp`4t+PSwN7H7yu1gUFxBsc^XJ5IJ_foh$5#l!m<#rD~`D zSps=CcOW>}r41=d=YnU%;~u2KL?E-G+194a&Y?kB`N@e$ojLI)nhvX4sk!c+M0$T{ z66?#mY72ZmQIfZo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F57Ksa&c| zmdM#ybgG?@xY3X{Oe-v175X?xC@@J~g@SfA^XN;A+H+Bg7i0YImL;H^Yk{gd7{1Mo zxJ?DEvIV!dJNDq#2ka@UXJxkhrs;T|=#sL<>NDCtT!Au!+LPf|Nrj@F6`B}&qjpiv z&qEHUX!8zx2>DIO<&)!Dbpz(a9~1p=7azlHKU>y%vNbbdtmsK;NC zA9h`zL;Rb2x9wCKYjI}ppU*!2k`>`2BRtxoX@KOuMy2Am9*~5RaB{x@F$YO#_MOJW zZyiV`-cF@g!d2Ki*J?3f$9^CLtEleApXb}<;RBx*CYitRn~3)2T&oqhyj*~H9~1@J z*OpFbCtDGWXXF@ZwiRa5ar&W7t3ai*eQoo>{$enow;}QtB|^@494o-lgJRMx+F`Mo zt9&2iRBCPU{qJI3wRM@WmSvOU`c?5cZz=<*+|IgSQ&?E=m)Gx7W+(X)l`DHxRCPT^ zL(?lTiLRqVn#8dv2#dsY{Zx&O^@HDKvJPNht|SuSwSa8DEnCzpAITtl`mKE*qSJdJ#u=qGvl&lz6e$0QT!|6Uz`lDs@Jrmwral#sYAeg!V( F{}%;&SQ-ET literal 0 HcmV?d00001 diff --git a/mainpage-backup b/mainpage-backup new file mode 100644 index 0000000..e69de29 diff --git a/mainpage.txt b/mainpage.txt new file mode 100644 index 0000000..803c19c --- /dev/null +++ b/mainpage.txt @@ -0,0 +1,132 @@ + +/*! @mainpage + * + * @section intro_sec Introduction + * + * Welcome to N4 Flight software docs. + * N4 Flight software is the code used to run N4 rockets at Nakuja Rocket Project. This code is built using FreeRTOS on the Arduino-ESP32 framework. It is designed to run either on AI-Thinker NodeMCU-ESP32 boards or ESP32-DOIT-DEVKIT V1. + + * @section step1 Major features + * This firmare has been improved tremendously from the previous versions and includes the following features: + + * @subsection step2 Modularity + * - Most of the code is now contained in separate files each perfoming its own singular task to ensure code maintainability and testing. + + * @subsection step3 System Logging + * - We have built a system logger to keep track of each and every operation that the flight computer undertakes. This can be be retrieved later and reviewed for post-flight analysis + +* @subsection step4 HIL Testing Engine +* - A hardware-in-the-loop testing engine has been built into the flight software to allow us to "Test Like We Fly". This allows the flight computer to be tested and debugged way before flight day. Using an improvised XMODEM algorithm, we are able to upload test flight data and run necessary integration tests. +* @note See Integration and Testing Procedures for more info + +* @subsection step5 Flight data logging +* - Flight data logging has been improved. Using an onboard SPI Flash memory, we are able log sensor data and flight states. +* +* @subsection step6 Data dump interface +* - A data dumping hardware interface has been added to ease the retrieval of data post flight data. +* +* @subsection step7 SAFE and FLIGHT modes +* - To prevent misfires during intergration and testing, this firmware implements SAFE_MODE that among others operations, disables the pyro-charges before POWERED_FLIGHT. +* +* @subsection step8 XBEE, MQTT, LORA, WIFI telemetry selection +* - For backward and forward compatibility, we implement a method to allow choice of data telemetry protocol being used. +* +* @subsection step9 Double ejection +* - We implement drogue and main chute ejection algorithms for successful vehicle recovery +* + * @section install_sec Building, Compilation and Downloading. + * + * + * @subsection step10 System requirements + * + * The following must be installed to build this release: + * 1. PlatformIO Core. Download the core here: [PlatformIO Core](https://docs.platformio.org/en/latest/core/installation/index.html) + * 2. PlatformIO IDE (recommended on VS Code but you can use IDE of your choice). To install PlatformIO IDE, follow the steps listed here: [PlatformIO IDE](https://platformio.org/platformio-ide) + * 3. Serial Monitor tool e.g. Putty, Ai-Thinker Serial, RealTerm etc + + * @subsection step11 Building the code + + * - Clone the repo on your local machine + * @code{.sh} + * git clone https://github.com/nakujaproject/N4-Flight-Software.git + * @endcode + + * @note You can also download the folder as a zip file and extract it to a folder of your choice. But we recommend cloning it so you can keep up to date with the remote changes. + * + + * - Change the directory to @code{.sh}N4-Flight-Software\n4-flight-software @endcode. This is the folder containing @code{.sh}platformio.ini @endcode + + * - Install code dependencies + * @code{.sh} + * pio pkg install + * @endcode + * + * - Build + * @code{.sh} + * pio run + * @endcode + + * - Connect your flight computer using a USB cable and make sure it is seen by your PC. It should be listed under Device Manager>Ports, if you are on windows + + * @note If your ESP32 is note recognized, you have to install USB-TO-TTL chip driver manually. For ESP32 Boards using CH340 chip, download the driver here [CH340 Driver-SparkFun](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all). Run the driver and it will be automatically installed on your machine. For ESP32 Boards using CP2102 chip, follow the procedure here [CP2102-driver-POLOLU](https://www.pololu.com/docs/0J7/all). Run the driver and it will be automatically installed on your machine. + + * - Upload and run + * Close any open serial ports connected to that ESP32 and run the command below + * @code{.sh} + * pio run -t upload + * @endcode + * The firmware will be uploaded to the flight computer + + * @section step13 Hardware, pin assignment and peripherals + * @note In development + + * @section step14 Integration and Testing Procedures + * @note In development + + * @section step15 Pre-flight software checks + * The following checks MUST be performed pre-flight to ensure the software operates as designed: + 1. test mode pin toggle + 2. telemetry protocol selection + 3. clientID (rocket ID) + 4. arming check + 5. DEBUG_to_terminal check - defs.h + 6. LOG_TO_MEMORY - defs.h + + + * @section step16 Contributors + * Our thanks go to the following current and previous avionics team members for their contribution: +1. Edwin Mwiti +2. Junn Hope +3. Jones Kisaka +4. Ruth +5. Safa Osman +6. Tabby Achieng +7. Sharlyn +8. Pat +9. Emmanuel +10. Fortune +11. Newton +12. Rodney +13. Sammy +14. Michael Kimani +15. George Bange +16. Maisha +17. Naomi Chesang +18. Brian Munene +19. Samson Onyambu +20. Cate Kabura +21. Amos Korir +22. Graig Kipkorir +23. Jerry Mumo +24. Esther Mamai +25. Martin Simbona +36. Jeff Mboya +37. Washington Kamadi +38. Ian Muchiri +39. Kibandi +40. Emmanuel Obara +41. Victoria + +* Ad Astra!! + + */ diff --git a/n4-flight-software/data-logger.py b/n4-flight-software/data-logger.py index 451f90f..a1529e7 100644 --- a/n4-flight-software/data-logger.py +++ b/n4-flight-software/data-logger.py @@ -7,8 +7,6 @@ import csv import atexit - - port = "COM4" baud_rate = 115200 diff --git a/n4-flight-software/html/files.html b/n4-flight-software/html/files.html deleted file mode 100644 index 16e189b..0000000 --- a/n4-flight-software/html/files.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -N4 Flight Software: File List - - - - - - - - - - - - - -
    -
    -
    -
    N4 Flight Software +
    N4 Flight Software N4
    -
    Flight software used on N4 flight computers for the Nakuja Project
    +
    Flight software used for the N4 flight computers
    - - - - - -
    -
    N4 Flight Software -
    -
    Flight software used on N4 flight computers for the Nakuja Project
    -
    - - - - - - - - - - -
    - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    File List
    -
    -
    -
    Here is a list of all documented files with brief descriptions:
    -
    [detail level 12]
    - - - - - - - - - - - - - - - - - - - - - -
      include
     defs.h
     kalman.h
     sensors.h
     state_machine.cpp
     state_machine.h
      src
     custom-time.hThis file defeines functions needed for time conversions for data logging
     data-types.h
     gps.h
     logger.h
     main.cppThis contains the main driver code for the flight computer
     mpu.h
     states.h
      system-logger
     SystemLogger.h
     SystemLogLevels.h
      test
     state_machine.cpp
     state_machine.h
     test_class.h
    -
    -
    - - -
    - - diff --git a/n4-flight-software/html/globals.html b/n4-flight-software/html/globals.html deleted file mode 100644 index f6160b0..0000000 --- a/n4-flight-software/html/globals.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -N4 Flight Software: File Members - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    N4 Flight Software -
    -
    Flight software used on N4 flight computers for the Nakuja Project
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all documented file members with links to the documentation:
    -
    - - -
    - - diff --git a/n4-flight-software/html/search/all_0.js b/n4-flight-software/html/search/all_0.js deleted file mode 100644 index 86c65d1..0000000 --- a/n4-flight-software/html/search/all_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['acc_5fdata_0',['acc_data',['../src_2main_8cpp.html#a5db507f1ef37ed2d76f24c064e4e6a85',1,'main.cpp']]], - ['acceleration_5fdata_1',['Acceleration_Data',['../struct_acceleration___data.html',1,'']]], - ['altimeter_5fdata_2',['Altimeter_Data',['../struct_altimeter___data.html',1,'']]] -]; diff --git a/n4-flight-software/html/search/all_1.js b/n4-flight-software/html/search/all_1.js deleted file mode 100644 index 7f51dfa..0000000 --- a/n4-flight-software/html/search/all_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['bmpinit_0',['BMPInit',['../src_2main_8cpp.html#a80d57b1ee5cb9d474465d3f8485f5bbc',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/all_2.js b/n4-flight-software/html/search/all_2.js deleted file mode 100644 index 6bcfc9b..0000000 --- a/n4-flight-software/html/search/all_2.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['converttimestamp_0',['convertTimestamp',['../custom-time_8h.html#a3e93bbd5d89dde887f93f6264db8a49f',1,'custom-time.cpp']]], - ['cs_5fpin_1',['cs_pin',['../src_2main_8cpp.html#aed65b23a4e5c39c4267c5730833e70db',1,'main.cpp']]], - ['current_5flog_5ftime_2',['current_log_time',['../src_2main_8cpp.html#a318b23db9cedde5ea8466af114f0c203',1,'main.cpp']]], - ['custom_2dtime_2eh_3',['custom-time.h',['../custom-time_8h.html',1,'']]], - ['customgps_4',['CustomGPS',['../class_custom_g_p_s.html',1,'']]] -]; diff --git a/n4-flight-software/html/search/all_3.js b/n4-flight-software/html/search/all_3.js deleted file mode 100644 index c7b2acd..0000000 --- a/n4-flight-software/html/search/all_3.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['datalogger_0',['DataLogger',['../class_data_logger.html',1,'DataLogger'],['../class_data_logger.html#a9ddfc501b4bd4f004f11854c3552d574',1,'DataLogger::DataLogger()']]], - ['debugtoterminaltask_1',['debugToTerminalTask',['../src_2main_8cpp.html#aaa1a5716bd567e8c37465dabe33e6396',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/all_4.js b/n4-flight-software/html/search/all_4.js deleted file mode 100644 index abdbb3c..0000000 --- a/n4-flight-software/html/search/all_4.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['file_0',['file',['../src_2main_8cpp.html#ada14cbbf98490eb3cb49b5d1cb0c0056',1,'main.cpp']]], - ['file_5fsize_5f1m_1',['FILE_SIZE_1M',['../src_2main_8cpp.html#a1ba4fed8e0dad7fbe3e7de830a2e9f6c',1,'main.cpp']]], - ['file_5fsize_5f4m_2',['FILE_SIZE_4M',['../src_2main_8cpp.html#aef692c53edfa11997d3470f8ed1d6a26',1,'main.cpp']]], - ['file_5fsize_5f512k_3',['FILE_SIZE_512K',['../src_2main_8cpp.html#aa9614a793fcf876f8e55a118d21d2d77',1,'main.cpp']]], - ['filename_4',['filename',['../src_2main_8cpp.html#a6c2affe0788e6ba12dce7a51e1bd35c3',1,'main.cpp']]], - ['filtered_5fdata_5',['Filtered_Data',['../struct_filtered___data.html',1,'']]], - ['filterimu_6',['filterImu',['../class_m_p_u6050.html#aed4696b264b467844771ef28b274541b',1,'MPU6050']]], - ['flash_5fled_5fpin_7',['flash_led_pin',['../src_2main_8cpp.html#ab506410443108766020e011a3c9293af',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/all_7.js b/n4-flight-software/html/search/all_7.js deleted file mode 100644 index 43efa66..0000000 --- a/n4-flight-software/html/search/all_7.js +++ /dev/null @@ -1,15 +0,0 @@ -var searchData= -[ - ['log_5fsample_5finterval_0',['log_sample_interval',['../src_2main_8cpp.html#affaa6e6cce540b233b04e558e3d164b2',1,'main.cpp']]], - ['loggerconsole_1',['LoggerConsole',['../class_logger_console.html',1,'']]], - ['loggerequals_2',['loggerEquals',['../class_data_logger.html#acb9bf3c62db1f28016d68d51efe25d43',1,'DataLogger']]], - ['loggerformat_3',['loggerFormat',['../class_data_logger.html#a5e9756481c9c74167ba32ad7a479e8b3',1,'DataLogger']]], - ['loggerinfo_4',['loggerInfo',['../class_data_logger.html#a9a968317a7e3bb763d8cd551063e7348',1,'DataLogger']]], - ['loggerinit_5',['loggerInit',['../class_data_logger.html#a0cf2853582b7f2194eb0024d3d6d4944',1,'DataLogger']]], - ['loggerread_6',['loggerRead',['../class_data_logger.html#a5a0deefb9372f1577636014a59025e6f',1,'DataLogger']]], - ['loggerspaces_7',['loggerSpaces',['../class_data_logger.html#aa2e189964fbebc28dc2a327fdccc5684',1,'DataLogger']]], - ['loggertest_8',['loggerTest',['../class_data_logger.html#ae8a69bf0cc965365057e93a164ca9239',1,'DataLogger']]], - ['loggerwrite_9',['loggerWrite',['../class_data_logger.html#a411ac6fd751d3a87cef0375fccaad028',1,'DataLogger']]], - ['logtomemory_10',['logToMemory',['../src_2main_8cpp.html#a7df146b43e503e23146e698154d5096d',1,'main.cpp']]], - ['loop_11',['loop',['../src_2main_8cpp.html#afe461d27b9c48d5921c00d521181f12f',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/all_8.js b/n4-flight-software/html/search/all_8.js deleted file mode 100644 index 0156340..0000000 --- a/n4-flight-software/html/search/all_8.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['main_2ecpp_0',['main.cpp',['../src_2main_8cpp.html',1,'']]], - ['mpu6050_1',['MPU6050',['../class_m_p_u6050.html',1,'']]] -]; diff --git a/n4-flight-software/html/search/all_b.js b/n4-flight-software/html/search/all_b.js deleted file mode 100644 index 7601686..0000000 --- a/n4-flight-software/html/search/all_b.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['readaccelerationtask_0',['readAccelerationTask',['../src_2main_8cpp.html#a64be9ebbabd58a9b6d32b92ce607f2a6',1,'main.cpp']]], - ['readaltimetertask_1',['readAltimeterTask',['../src_2main_8cpp.html#a5947e71102388e9d5bfd09f8e97d668c',1,'main.cpp']]], - ['readgpstask_2',['readGPSTask',['../src_2main_8cpp.html#aa8ea491ed98b16bb5292ad184537f0b5',1,'main.cpp']]], - ['readme_3',['README',['../md__r_e_a_d_m_e.html',1,'']]], - ['readxacceleration_4',['readXAcceleration',['../class_m_p_u6050.html#a63bb7b9f83eca4c2debdd0dfa7991865',1,'MPU6050']]], - ['readyacceleration_5',['readYAcceleration',['../class_m_p_u6050.html#ab34bd3131afe39a6f5178f46ec63a0e7',1,'MPU6050']]], - ['readzacceleration_6',['readZAcceleration',['../class_m_p_u6050.html#a18bf4368cc536ba0da3d41bdd4241be8',1,'MPU6050']]] -]; diff --git a/n4-flight-software/html/search/all_c.js b/n4-flight-software/html/search/all_c.js deleted file mode 100644 index 0c7da3d..0000000 --- a/n4-flight-software/html/search/all_c.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['setup_0',['setup',['../src_2main_8cpp.html#a4fc01d736fe50cf5b977f755b675f11d',1,'main.cpp']]], - ['state_5fmachine_1',['State_machine',['../class_state__machine.html',1,'']]], - ['state_5fmachine_2ecpp_2',['state_machine.cpp',['../include_2state__machine_8cpp.html',1,'(Global Namespace)'],['../test_2state__machine_8cpp.html',1,'(Global Namespace)']]], - ['systemlogger_3',['SystemLogger',['../class_system_logger.html',1,'']]] -]; diff --git a/n4-flight-software/html/search/all_d.js b/n4-flight-software/html/search/all_d.js deleted file mode 100644 index ad62adb..0000000 --- a/n4-flight-software/html/search/all_d.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['telemetry_5fdata_0',['Telemetry_Data',['../struct_telemetry___data.html',1,'']]], - ['telemetry_5fdata_5fqhandle_1',['telemetry_data_qHandle',['../src_2main_8cpp.html#a0ed5ea94df7417ea494d69ca56aab490',1,'main.cpp']]], - ['test_2',['Test',['../class_test.html',1,'']]] -]; diff --git a/n4-flight-software/html/search/functions_0.js b/n4-flight-software/html/search/functions_0.js deleted file mode 100644 index 7f51dfa..0000000 --- a/n4-flight-software/html/search/functions_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['bmpinit_0',['BMPInit',['../src_2main_8cpp.html#a80d57b1ee5cb9d474465d3f8485f5bbc',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/functions_1.js b/n4-flight-software/html/search/functions_1.js deleted file mode 100644 index e0c1062..0000000 --- a/n4-flight-software/html/search/functions_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['converttimestamp_0',['convertTimestamp',['../custom-time_8h.html#a3e93bbd5d89dde887f93f6264db8a49f',1,'custom-time.cpp']]] -]; diff --git a/n4-flight-software/html/search/functions_3.js b/n4-flight-software/html/search/functions_3.js deleted file mode 100644 index 15b0d14..0000000 --- a/n4-flight-software/html/search/functions_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['filterimu_0',['filterImu',['../class_m_p_u6050.html#aed4696b264b467844771ef28b274541b',1,'MPU6050']]] -]; diff --git a/n4-flight-software/html/search/functions_5.js b/n4-flight-software/html/search/functions_5.js deleted file mode 100644 index cab8be8..0000000 --- a/n4-flight-software/html/search/functions_5.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['loggerequals_0',['loggerEquals',['../class_data_logger.html#acb9bf3c62db1f28016d68d51efe25d43',1,'DataLogger']]], - ['loggerformat_1',['loggerFormat',['../class_data_logger.html#a5e9756481c9c74167ba32ad7a479e8b3',1,'DataLogger']]], - ['loggerinfo_2',['loggerInfo',['../class_data_logger.html#a9a968317a7e3bb763d8cd551063e7348',1,'DataLogger']]], - ['loggerinit_3',['loggerInit',['../class_data_logger.html#a0cf2853582b7f2194eb0024d3d6d4944',1,'DataLogger']]], - ['loggerread_4',['loggerRead',['../class_data_logger.html#a5a0deefb9372f1577636014a59025e6f',1,'DataLogger']]], - ['loggerspaces_5',['loggerSpaces',['../class_data_logger.html#aa2e189964fbebc28dc2a327fdccc5684',1,'DataLogger']]], - ['loggertest_6',['loggerTest',['../class_data_logger.html#ae8a69bf0cc965365057e93a164ca9239',1,'DataLogger']]], - ['loggerwrite_7',['loggerWrite',['../class_data_logger.html#a411ac6fd751d3a87cef0375fccaad028',1,'DataLogger']]], - ['logtomemory_8',['logToMemory',['../src_2main_8cpp.html#a7df146b43e503e23146e698154d5096d',1,'main.cpp']]], - ['loop_9',['loop',['../src_2main_8cpp.html#afe461d27b9c48d5921c00d521181f12f',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/functions_7.js b/n4-flight-software/html/search/functions_7.js deleted file mode 100644 index ce242ef..0000000 --- a/n4-flight-software/html/search/functions_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['setup_0',['setup',['../src_2main_8cpp.html#a4fc01d736fe50cf5b977f755b675f11d',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/pages_0.js b/n4-flight-software/html/search/pages_0.js deleted file mode 100644 index 72b4213..0000000 --- a/n4-flight-software/html/search/pages_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['readme_0',['README',['../md__r_e_a_d_m_e.html',1,'']]] -]; diff --git a/n4-flight-software/html/search/variables_1.js b/n4-flight-software/html/search/variables_1.js deleted file mode 100644 index fb585db..0000000 --- a/n4-flight-software/html/search/variables_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['cs_5fpin_0',['cs_pin',['../src_2main_8cpp.html#aed65b23a4e5c39c4267c5730833e70db',1,'main.cpp']]], - ['current_5flog_5ftime_1',['current_log_time',['../src_2main_8cpp.html#a318b23db9cedde5ea8466af114f0c203',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/variables_3.js b/n4-flight-software/html/search/variables_3.js deleted file mode 100644 index f3e47d6..0000000 --- a/n4-flight-software/html/search/variables_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['imu_0',['imu',['../src_2main_8cpp.html#aea39bb6bc24075cef46a6b4d55071082',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/search/variables_6.js b/n4-flight-software/html/search/variables_6.js deleted file mode 100644 index 83bf198..0000000 --- a/n4-flight-software/html/search/variables_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['previous_5flog_5ftime_0',['previous_log_time',['../src_2main_8cpp.html#ac03f1f50d9e1452593353033c5b2b1b0',1,'main.cpp']]] -]; diff --git a/n4-flight-software/html/src_2main_8cpp.html b/n4-flight-software/html/src_2main_8cpp.html deleted file mode 100644 index af085fe..0000000 --- a/n4-flight-software/html/src_2main_8cpp.html +++ /dev/null @@ -1,692 +0,0 @@ - - - - - - - -N4 Flight Software: src/main.cpp File Reference - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    N4 Flight Software -
    -
    Flight software used on N4 flight computers for the Nakuja Project
    -
    -
    - - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    - -
    main.cpp File Reference
    -
    -
    - -

    This contains the main driver code for the flight computer. -More...

    -
    #include <Arduino.h>
    -#include <Wire.h>
    -#include <WiFi.h>
    -#include <PubSubClient.h>
    -#include "sensors.h"
    -#include "defs.h"
    -#include "mpu.h"
    -#include <SFE_BMP180.h>
    -#include "SerialFlash.h"
    -#include "logger.h"
    -#include "data-types.h"
    -#include "custom-time.h"
    -#include <TinyGPSPlus.h>
    -
    - - - -

    -Macros

    -#define ALTITUDE   1525.0
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    -PubSubClient mqtt_client (wifi_client)
     
    void BMPInit ()
     Initialize BMP180 barometric sensor.
     
    void GPSInit ()
     Initialize the GPS connected on Serial2.
     
    void readAccelerationTask (void *pvParameter)
     Read aceleration data from the accelerometer.
     
    void readAltimeterTask (void *pvParameters)
     Read ar pressure data from the barometric sensor onboard.
     
    void readGPSTask (void *pvParameters)
     Read the GPS location data and altitude and append to telemetry packet for transmission.
     
    void debugToTerminalTask (void *pvParameters)
     debug flight/test data to terminal, this task is called if the DEBUG_TO_TERMINAL is set to 1 (see defs.h)
     
    void logToMemory (void *pvParameter)
     log the data to the external flash memory
     
    void setup ()
     Setup - perfom initialization of all hardware subsystems, create queues, create queue handles initialize system check table.
     
    void loop ()
     Main loop.
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Variables

    uint8_t operation_mode = 0
     
    -WiFiClient wifi_client
     
    -TinyGPSPlus gps
     
    uint8_t cs_pin = 5
     
    uint8_t flash_led_pin = 4
     
    char filename [] = "flight.bin"
     
    uint32_t FILE_SIZE_512K = 524288L
     
    uint32_t FILE_SIZE_1M = 1048576L
     
    uint32_t FILE_SIZE_4M = 4194304L
     
    SerialFlashFile file
     
    unsigned long long previous_log_time = 0
     
    unsigned long long current_log_time = 0
     
    uint16_t log_sample_interval = 10
     
    -DataLogger data_logger (cs_pin, flash_led_pin, filename, file, FILE_SIZE_4M)
     
    -long long current_time = 0
     
    -long long previous_time = 0
     
    accel_type_t acc_data
     
    -gyro_type_t gyro_data
     
    -gps_type_t gps_data
     
    -altimeter_type_t altimeter_data
     
    -telemetry_type_t telemetry_packet
     
    MPU6050 imu (0x68, 16, 1000)
     
    -SFE_BMP180 altimeter
     
    -char status
     
    -double T
     
    -double P
     
    -double p0
     
    -double a
     
    QueueHandle_t telemetry_data_qHandle
     
    -QueueHandle_t accel_data_qHandle
     
    -QueueHandle_t altimeter_data_qHandle
     
    -QueueHandle_t gps_data_qHandle
     
    -

    Detailed Description

    -

    This contains the main driver code for the flight computer.

    -
    Author
    Edwin Mwiti
    -
    Version
    0.1
    -
    Date
    July 15 2024
    -

    0x5765206D6179206D616B65206F757220706C616E73202C 0x62757420476F642068617320746865206C61737420776F7264

    -

    Function Documentation

    - -

    ◆ BMPInit()

    - -
    -
    - - - - - - - -
    void BMPInit ()
    -
    - -

    Initialize BMP180 barometric sensor.

    -
    -
    Returns
    TODO: 1 if init OK, 0 otherwise
    - -
    -
    - -

    ◆ debugToTerminalTask()

    - -
    -
    - - - - - - - -
    void debugToTerminalTask (void * pvParameters)
    -
    - -

    debug flight/test data to terminal, this task is called if the DEBUG_TO_TERMINAL is set to 1 (see defs.h)

    -
    -
    Parameters
    - - -
    pvParameter- A value that is passed as the paramater to the created task. If pvParameter is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    -
    -
    - -
    -
    - -

    ◆ GPSInit()

    - -
    -
    - - - - - - - -
    void GPSInit ()
    -
    - -

    Initialize the GPS connected on Serial2.

    -
    -
    Returns
    1 if init OK, 0 otherwise
    - -
    -
    - -

    ◆ logToMemory()

    - -
    -
    - - - - - - - -
    void logToMemory (void * pvParameter)
    -
    - -

    log the data to the external flash memory

    -
    -
    Parameters
    - - -
    pvParameter- A value that is passed as the paramater to the created task. If pvParameter is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    -
    -
    - -
    -
    - -

    ◆ loop()

    - -
    -
    - - - - - - - -
    void loop ()
    -
    - -

    Main loop.

    -
    - -
    -
    - -

    ◆ readAccelerationTask()

    - -
    -
    - - - - - - - -
    void readAccelerationTask (void * pvParameter)
    -
    - -

    Read aceleration data from the accelerometer.

    -
    -
    Parameters
    - - -
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    -
    -
    -
    Returns
    Updates accelerometer data struct on the telemetry queue
    - -
    -
    - -

    ◆ readAltimeterTask()

    - -
    -
    - - - - - - - -
    void readAltimeterTask (void * pvParameters)
    -
    - -

    Read ar pressure data from the barometric sensor onboard.

    -
    -
    Parameters
    - - -
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    -
    -
    -
    Returns
    Sends altimeter data to altimeter queue
    - -
    -
    - -

    ◆ readGPSTask()

    - -
    -
    - - - - - - - -
    void readGPSTask (void * pvParameters)
    -
    - -

    Read the GPS location data and altitude and append to telemetry packet for transmission.

    -
    -
    Parameters
    - - -
    pvParameters- A value that is passed as the paramater to the created task. If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - so it is not valid to pass the address of a stack variable.
    -
    -
    - -
    -
    - -

    ◆ setup()

    - -
    -
    - - - - - - - -
    void setup ()
    -
    - -

    Setup - perfom initialization of all hardware subsystems, create queues, create queue handles initialize system check table.

    -
    - -
    -
    -

    Variable Documentation

    - -

    ◆ acc_data

    - -
    -
    - - - - -
    accel_type_t acc_data
    -
    -

    ///////////////////////// DATA VARIABLES /////////////////////////

    - -
    -
    - -

    ◆ cs_pin

    - -
    -
    - - - - -
    uint8_t cs_pin = 5
    -
    -

    External flash memory chip select pin

    - -
    -
    - -

    ◆ current_log_time

    - -
    -
    - - - - -
    unsigned long long current_log_time = 0
    -
    -

    What is the processor time right now?

    - -
    -
    - -

    ◆ file

    - -
    -
    - - - - -
    SerialFlashFile file
    -
    -

    object representing file object for flash memory

    - -
    -
    - -

    ◆ FILE_SIZE_1M

    - -
    -
    - - - - -
    uint32_t FILE_SIZE_1M = 1048576L
    -
    -

    1MB

    - -
    -
    - -

    ◆ FILE_SIZE_4M

    - -
    -
    - - - - -
    uint32_t FILE_SIZE_4M = 4194304L
    -
    -

    4MB

    - -
    -
    - -

    ◆ FILE_SIZE_512K

    - -
    -
    - - - - -
    uint32_t FILE_SIZE_512K = 524288L
    -
    -

    512KB

    - -
    -
    - -

    ◆ filename

    - -
    -
    - - - - -
    char filename[] = "flight.bin"
    -
    -

    data log filename - Filename must be less than 20 chars, including the file extension

    - -
    -
    - -

    ◆ flash_led_pin

    - -
    -
    - - - - -
    uint8_t flash_led_pin = 4
    -
    -

    LED pin connected to indicate flash memory formatting
    -

    - -
    -
    - -

    ◆ imu

    - -
    -
    - - - - - - - - - - - - - - - - -
    MPU6050 imu(0x68, 16, 1000) (0x68 ,
    16 ,
    1000  )
    -
    -

    ///////////////////////// END OF DATA VARIABLES ///////////////////////// create an MPU6050 object set gyro to max deg to 1000 deg/sec set accel fs reading to 16g

    - -
    -
    - -

    ◆ log_sample_interval

    - -
    -
    - - - - -
    uint16_t log_sample_interval = 10
    -
    -

    After how long should we sample and log data to flash memory?

    - -
    -
    - -

    ◆ operation_mode

    - -
    -
    - - - - -
    uint8_t operation_mode = 0
    -
    -

    Tells whether software is in safe or flight mode - FLIGHT_MODE=1, SAFE_MODE=0

    - -
    -
    - -

    ◆ previous_log_time

    - -
    -
    - - - - -
    unsigned long long previous_log_time = 0
    -
    -

    The last time we logged data to memory

    - -
    -
    - -

    ◆ telemetry_data_qHandle

    - -
    -
    - - - - -
    QueueHandle_t telemetry_data_qHandle
    -
    -

    ///////////////////////// END OF PERIPHERALS INIT /////////////////////////

    - -
    -
    -
    - - -
    - - diff --git a/n4-flight-software/include/defs.h b/n4-flight-software/include/defs.h index 476bdcc..26a9c97 100644 --- a/n4-flight-software/include/defs.h +++ b/n4-flight-software/include/defs.h @@ -53,10 +53,23 @@ // const char* SSID = "Galaxy"; // const char* PASSWORD = "luwa2131"; +<<<<<<< Updated upstream +======= +// defines the various thresholds that need to be achieved in the state machine +#define APOGEE_ALTITUDE 0.0f // meters +#define DROGUE_DEPLOY_MIN_ALTITUDE 200.0f // meters +#define MAIN_CHUTE_DEPLOY_ALTITUDE 450.0f // meters +#define DECELERATION_CHECK_DURATION 100 // milliseconds + +/*Defines safe mode and flight mode*/ +#define FLIGHT_MODE 1 +#define SAFE_MODE 0 + +>>>>>>> Stashed changes /* ROCKET FLIGHT STATES */ #define PRE_FLIGHT 0 -#define POWERED_FLIGHT 1 -#define COASTING 2 +#define FLIGHT_MODE_POWERED 1 +#define COASTING_STATE 2 #define APOGEE 3 #define BALLISTIC_DESCENT 4 #define PARACHUTE_DESCENT 5 diff --git a/n4-flight-software/include/functions.h b/n4-flight-software/include/functions.h index 1a5606b..d3024a2 100644 --- a/n4-flight-software/include/functions.h +++ b/n4-flight-software/include/functions.h @@ -22,5 +22,7 @@ float getAcceleration(); float getVelocity(); +void readAltimeterTask(); + #endif \ No newline at end of file diff --git a/n4-flight-software/src/.main.cpp.un~ b/n4-flight-software/src/.main.cpp.un~ new file mode 100644 index 0000000000000000000000000000000000000000..eb4b319f5ba0492b56ea214e27c51ce7b33e8727 GIT binary patch literal 18625 zcmeI4U2IfE6vww;v{ewLB8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um|oBH^ibPtM$hceRdV)FLREPh>Fo;YG1!9VYSek2 zutEy?l-jb+JVz|gc~R^E-YDQ(a6}T`xVmAU<~8S`Ao!#t6`|YwqZI7--JYnLC1L&< zwPSsP=+#v@OSIh*ZT>;b|C11%FAYI-k^QM6{j+|J0|z&Jif#{xGBZcw!Koz@<_wE< z2KUX>sa1T|f@_wC&c+qdM;lATREqgo>1(VWY**s1oPawfeEgKqPrEQe8u^?Wv(Bu) zW7cppu*L~Iu!c09wFI$w)=Ti;wodWgv(9CK&Bl%-hX5%WSn)2amPnX0I@THE_fs)q z^#n$+Qf~v6r%`qSWPX#Q)<~N(8rB)puZ&4IIf`jEGplnv5bUOogDy5$9jNn;2P>qI z8`PF{BHH~16UEYXT^tYRD&cq?oz<~om>=$TxY+q{Z=jRE&$OZ7als17rRfW4+Y+_6 ix^66h%j)u92W_{wI-*?(JVo|EF|IajM`ca><=Vdv{Mdg0 literal 0 HcmV?d00001 diff --git a/n4-flight-software/src/.states.cpp.un~ b/n4-flight-software/src/.states.cpp.un~ new file mode 100644 index 0000000000000000000000000000000000000000..b3d582ad46005fa6b8423b965e6ca27d2a7747e9 GIT binary patch literal 5715 zcmeI$ze@u#6bJD1YOUIeKTbt-DT+%Mr*2XZsTh>n7jg1&E>l*ggcq1o~vB$taOybtfhtZkO6tL4;AT{!p2jrVxx*Hv|7 z^6mNY?BsQ#Uhn_tOPp>^g%3X;ZiEoS)DT0BP6Vj$Rb%wJiDK<|yaR6?k$+MP9Mz-4 zD>ND36e6gfY~TJ26l;~JVay>wW|@2mGxtbLZYxY+>0rkI8JOgp ztfnR!TV;oB$^bEC{$mQwqzcC;dod6Y##ix}NRKn~KP;1IrDV7-{Ly|h@QsC&K1`_#q zM=^l}^E&X}GU;p>?}_Q+Hzts9Ca`p~)8IXxBbc+*ge;g0V!Gr^ykfu8%ALJj{xx!udzoR?R0 z>6Ps2Qi`SWAjgl|0@WEY+81kkLNW&$a)Y!R?ig|32!g + +extern char tstamp[]; // to hold a human readable timestamp +void convertTimestamp(unsigned long); + +#endif \ No newline at end of file diff --git a/n4-flight-software/src/data-types.h b/n4-flight-software/src/data_types.h similarity index 100% rename from n4-flight-software/src/data-types.h rename to n4-flight-software/src/data_types.h diff --git a/n4-flight-software/src/img_1.png b/n4-flight-software/src/img_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b60188bde3191cb15f11e638be8bfdd19a71ea67 GIT binary patch literal 35158 zcmeFZXIPZmmM#kF5)}avECd7uBo`n#gGy3zrpQ_($&zzW6p#{-oI%MM3Mg_Ap~yjm zB4;Rau*gNcAG+4w?ml~;+kH-V-yeN{D9=Oj%^GveG2ZcxFu(UIO0onuC~n~3;1E1} zDy4>lbJ+y=hjZ-`@SBz`o&g*jKb&V$k2Ty3*C%aU@`d~SUbLccO+~2`WgX5ons%c& z^&(8~4-$Z?ixE?M{H=HKx}J!5EAgD*0Sjo{lsG?_3@KvtpN9yxJZZV~T57sPAWi~F zNAZ027CtflmD}FUQ_s&xVK4pONrI)ox1R12c=}`2!D+Z4LijECqx<~=>jaC+@Sv;z z(-sIr(g7NrSzU{i27d1PLy3VOnxrt`|C}_)6&##LcYgjw9y18{%E8u-@!f#1KHq&m ztIgBH(v6<_^(Qz#DuK_OOpD+q@d$0_Q%(5cUK~@YutVsplPBM+%W!6hRKb^)Nrl02yq@IaUY7)ZaOk_=jI?I^@c?=v>{S!&`{>qSTfpZ+UO#U?g_tFkSdr zOr&SJX(@zMvYX`Ogj5!7{?X#D`aYTtVj#yW(O^Pj{siaM^Rm$66 zhM{k(Mzg1|fs*^Vy&qDc&`B&*FbbDdbD0E#wIG+im|mQKG#L!5T~)f8U>KGvkN{QH_Rihf z{+!MZI_)p*xuMLz6s$%4@N^rYQR%hmu{ZbxdF>Msu$d`2owd{OSc7XgXCNeu92^zEXaGcH1iH^6(8u?JW#1!|)_hWaRPaq)AsR)0fWFV?Y^4UJ#Zrhbt=HE-v0GQwiY>v(!@=S+do6^PxFNHp@F;DP_m%AiSzB z1h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+jIUmw1 zlxEwNq2%>+!4>EuxYQ@-EP^Rg+d1ZF6I)(CU|&qj7i?;o zv{e6$;e_2XZO-a5{N+|JBH-InPlmA#M0;f}A379`ZxMeMah7PZ*J(0Lnl-VUKXUk} zw&IVsHC31&ZT`j$W_p0NZdQ1EmV5Z9bG`VdHa9xAd zb)n7`?k&HDHW)@+U^+`5C3I%2=w?UWYC^vYZ)Tmf^N4%z@AOB)->bB}eSi|r4d_{QZ zsn1SLQ`8b_C^3W3C0ek12K^@YfM~ZfUSD8ZL_Lp%?a?0Yoo@tw=R0?W!RJ9`Otv9x z4_I+nJw9yeYe2i}Zd!@iYVXR;76fN3_jTpg-U$Zg(rR%lt8$b;;)I6hm04ddqb3qW zUaHh$biG&;<0NQiO5{A^h}ymH(aqH#-z;b_G^=-U&G%-2QW&SD!l+1i2W{c{B0C|4 zX32PVsYIT5elDp$17G7OjkliT$8ptF)-QHA*{zl+ZV=Lt8%PHZ@6vNu&lkquZZVs@ zsA<1`|LyI@;JIjY!r)cVWDWhH7R$qK9Uw38+pRX>ikNmvyWt_}H1SSo6Y07Jj^b%Y zWLk9mKmng<(I9ZA09U-5mTcd-2kNa~lpV#UX_+y0`yAB^c|2Rl9U$`nRG?47v?hk+ z^ezwichX|SHo~#gm246FIY9X?;RG^$Sg7~ToNm#rXZ@C}{0avVSeK-joM@4-zVH74 Dl=)uq literal 0 HcmV?d00001 diff --git a/n4-flight-software/src/logger.cpp b/n4-flight-software/src/logger.cpp index a3e35b6..83f958c 100644 --- a/n4-flight-software/src/logger.cpp +++ b/n4-flight-software/src/logger.cpp @@ -3,7 +3,7 @@ */ #include "logger.h" -#include "data-types.h" +#include "data_types.h" telemetry_type_t t; char pckt_buff[50]; diff --git a/n4-flight-software/src/logger.h b/n4-flight-software/src/logger.h index a2070f5..e0ae8a3 100644 --- a/n4-flight-software/src/logger.h +++ b/n4-flight-software/src/logger.h @@ -16,7 +16,7 @@ #include #include -#include "data-types.h" +#include "data_types.h" class DataLogger { private: diff --git a/n4-flight-software/src/main.cpp b/n4-flight-software/src/main.cpp index dfd839b..50d8cb1 100644 --- a/n4-flight-software/src/main.cpp +++ b/n4-flight-software/src/main.cpp @@ -15,17 +15,29 @@ #include #include #include // TODO: ADD A MQTT SWITCH - TO USE MQTT OR NOT +#include +#include +#include +#include +#include #include "sensors.h" #include "defs.h" #include "mpu.h" -#include #include "SerialFlash.h" #include "logger.h" -#include "data-types.h" -#include "custom-time.h" -#include +#include "data_types.h" +#include "custom_time.h" +#include "states.h" +#include "system_logger.h" +#include "system_log_levels.h" + +/* function prototypes definition */ +void drogueChuteDeploy(); +void mainChuteDeploy(); -uint8_t operation_mode = 0; /*!< Tells whether software is in safe or flight mode - FLIGHT_MODE=1, SAFE_MODE=0 */ +/* state machine variables*/ +uint8_t operation_mode = 0; /*!< Tells whether software is in safe or flight mode - FLIGHT_MODE=1, SAFE_MODE=0 */ +uint8_t current_state = FLIGHT_STATE::PRE_FLIGHT_GROUND; /*!< The starting state - we start at PRE_FLIGHT_GROUND state */ /* create Wi-Fi Client */ WiFiClient wifi_client; @@ -36,9 +48,481 @@ PubSubClient mqtt_client(wifi_client); /* GPS object */ TinyGPSPlus gps; +/* system logger */ +SystemLogger system_logger; +const char* system_log_file = "/sys_log.log"; +LOG_LEVEL level = INFO; +const char* rocket_ID = "rocket-1"; /*!< Unique ID of the rocket. Change to the needed rocket name before uploading */ + +////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// FLIGHT COMPUTER TESTING SYSTEM ///////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////// + +uint8_t RUN_MODE = 0; +uint8_t TEST_MODE = 0; + +#define BAUDRATE 115200 +#define NAK_INTERVAL 4000 /*!< Interval in which to send the NAK command to the transmitter */ + +// Flags +uint8_t SOH_recvd_flag = 0; /*!< Transmitter acknowledged? */ + +unsigned long last_NAK_time = 0; +unsigned long current_NAK_time = 0; +char SOH_CHR[6] = "SOH"; + +/* define XMODEM commands in HEX */ +#define SOH 0x01 /*!< start of header */ +#define EOT 0x04 /*!< end of transmission */ +#define ACK 0x06 /*!< positive acknowledgement */ +#define NAK 0x15 /*!< negative acknowledgement */ +#define CAN 0x18 /*!< cancel */ + +#define MAX_CMD_LENGTH 10 /*!< Maximum length of the XMODEM command string that can be received */ +#define MAX_CSV_LENGTH 256 /*!< Maximum length of the csv string that can be received */ + +// buffer to store the XMODEM commands +char serial_buffer[MAX_CMD_LENGTH]; +int16_t serial_index = 0; + +// buffer to store the CSV test data +char test_data_buffer[MAX_CSV_LENGTH]; +int16_t test_data_serial_index = 0; + +// pin definitions +uint8_t recv_data_led = 2; /*!< External flash memory chip select pin */ +uint8_t red_led = 15; /*!< Red LED pin */ +uint8_t green_led = 4; /*!< Green LED pin */ +uint8_t buzzer = 33; +uint8_t SET_TEST_MODE_PIN = 14; /*!< Pin to set the flight computer to TEST mode */ +uint8_t SET_RUN_MODE_PIN = 13; /*!< Pin to set the flight computer to RUN mode */ +uint8_t SD_CS_PIN = 26; /*!< Chip select pin for SD card */ + + +/*!***************************************************************************** + * @brief This enum holds the states during flight computer test mode + *******************************************************************************/ +enum TEST_STATE { + HANDSHAKE = 0, /*!< state to establish initial communication with transmitter */ + RECEIVE_TEST_DATA, /*!< sets the flight computer to receive test data over serial */ + CONFIRM_TEST_DATA +}; + +uint8_t current_test_state = TEST_STATE::HANDSHAKE; /*!< Define current state the flight computer is in */ + +/** + * XMODEM serial function prototypes + * + */ +void listDir(fs::FS &fs, const char * dirname, uint8_t levels); +void initGPIO(); +void InitSPIFFS(); +void initSD(); // TODO: return a bool +void SwitchLEDs(uint8_t, uint8_t); +void InitXMODEM(); +void SerialEvent(); +void ParseSerial(char*); +void checkRunTestToggle(); + +//////////////////// SPIFFS FILE OPERATIONS /////////////////////////// + +#define FORMAT_SPIFFS_IF_FAILED 1 +const char* test_data_file = "/data.csv"; + +void listDir(fs::FS &fs, const char * dirname, uint8_t levels){ + Serial.printf("Listing directory: %s\r\n", dirname); + File root = fs.open(dirname); + if(!root){ + debugln("- failed to open directory"); + return; + } + if(!root.isDirectory()){ + debugln(" - not a directory"); + return; + } + File file = root.openNextFile(); + while(file){ + if(file.isDirectory()){ + debug(" DIR : "); + debugln(file.name()); + if(levels){ + listDir(fs, file.name(), levels -1); + } + } else { + debug(" FILE: "); + debug(file.name()); + debug("\tSIZE: "); + debugln(file.size()); + } + file = root.openNextFile(); + } +} + +void readFile(fs::FS &fs, const char * path){ + Serial.printf("Reading file: %s\r\n", path); + File file = fs.open(path); + if(!file || file.isDirectory()){ + debugln("- failed to open file for reading"); + return; + } + debugln("- read from file:"); + while(file.available()){ + Serial.write(file.read()); + } + file.close(); +} + +void writeFile(fs::FS &fs, const char * path, const char * message){ + Serial.printf("Writing file: %s\r\n", path); + File file = fs.open(path, FILE_WRITE); + if(!file){ + debugln("- failed to open file for writing"); + return; + } + if(file.print(message)){ + debugln("- file written"); + } else { + debugln("- write failed"); + } + file.close(); +} + +void appendFile(fs::FS &fs, const char * path, const char * message){ + Serial.printf("Appending to file: %s\r\n", path); + File file = fs.open(path, FILE_APPEND); + if(!file){ + debugln("- failed to open file for appending"); + return; + } + if(file.print(message)){ + debugln("- message appended"); + } else { + debugln("- append failed"); + } + file.close(); +} + +void deleteFile(fs::FS &fs, const char * path){ + Serial.printf("Deleting file: %s\r\n", path); + if(fs.remove(path)){ + debugln("- file deleted"); + } else { + debugln("- delete failed"); + } +} + +void readTestDataFile() { + File logFile = SPIFFS.open(test_data_file, "r"); + if (logFile) { + debugln("Log file contents:"); + while (logFile.available()) { + Serial.write(logFile.read()); + } + logFile.close(); + } else { + debugln("Failed to open log file for reading."); + } +} + +void InitSPIFFS() { + if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)) { + debugln("SPIFFS mount failed"); // TODO: Set a flag for test GUI + return; + } else { + debugln("SPIFFS init success"); + } +} + +void initSD() { + if(!SD.begin(SD_CS_PIN)) { + delay(100); + debugln(F("[SD Card mounting failed]")); + return; + } else { + debugln(F("[SD card Init OK!")); + } + + uint8_t cardType = SD.cardType(); + if(cardType == CARD_NONE) { + debugln("[No SD card attached]"); + return; + } + + // initialize test data file + File file = SD.open("/data.csv", FILE_WRITE); // TODO: change file name to const char* + + if(!file) { + debugln("[File does not exist. Creating file]"); + writeFile(SD, "/data.csv", "SSID, SECURITY, CHANNEL, LAT, LONG, TIME \r\n"); + } else { + debugln("[Data file already exists]"); + } + + file.close(); + +} + +//////////////////// END OF SPIFFS FILE OPERATIONS /////////////////////////// + +/*!**************************************************************************** + * @brief Inititialize the GPIOs + *******************************************************************************/ +void initGPIO() { + pinMode(red_led, OUTPUT); + pinMode(green_led, OUTPUT); + pinMode(SET_TEST_MODE_PIN, INPUT); + pinMode(SET_RUN_MODE_PIN, INPUT); + pinMode(buzzer, OUTPUT); + + // set LEDs to a known starting state + digitalWrite(red_led, LOW); + digitalWrite(green_led, LOW); +} + +/*!**************************************************************************** + * @brief Switch the LEDS states + *******************************************************************************/ +void SwitchLEDs(uint8_t red_state, uint8_t green_state) { + digitalWrite(red_led, red_state); + digitalWrite(green_led, green_state); +} + +// non blocking timings +unsigned long last_buzz = 0; +unsigned long current_buzz = 0; +unsigned long buzz_interval = 200; +uint8_t buzzer_state = LOW; + +unsigned long last_blink = 0; +unsigned long current_blink = 0; +unsigned long blink_interval = 200; +uint8_t led_state = LOW; + +/*!**************************************************************************** + * @brief Buzz the buzzer for a given buzz_interval + * This function is non-blocking + *******************************************************************************/ +void buzz() { + current_buzz = millis(); + if((current_buzz - last_buzz) > buzz_interval) { + if(buzzer_state == LOW) { + buzzer_state = HIGH; + } else { + buzzer_state = LOW; + } + + digitalWrite(buzzer, buzzer_state); + + last_buzz = current_buzz; + } + +} + +/*!**************************************************************************** + * @brief implements non-blocking blink + *******************************************************************************/ +void blink_200ms(uint8_t led_pin) { + current_blink = millis(); + if((current_blink - last_blink) > blink_interval) { + if(led_state == LOW) { + led_state = HIGH; + } else if(led_state == HIGH) { + led_state = LOW; + } + + digitalWrite(led_pin, led_state); + last_blink = current_blink; + } +} + +/*!**************************************************************************** + * @brief Sample the RUN/TEST toggle pins to check whether the fligh tcomputer is in test mode + * or run mode. + * If in TEST mode, define the TEST flag + * If in RUN mode, define the RUN flag + * TEST_MODE Pin and RUN_MODE pin are both pulled HIGH. When you set the jumper, you pull that pin to + * LOW. + *******************************************************************************/ +void checkRunTestToggle() { + + if( (digitalRead(SET_RUN_MODE_PIN) == 0) && (digitalRead(SET_TEST_MODE_PIN) == 1) ) { + // run mode + RUN_MODE = 1; + TEST_MODE = 0; + SwitchLEDs(TEST_MODE, RUN_MODE); + } + + if((digitalRead(SET_RUN_MODE_PIN) == 1) && (digitalRead(SET_TEST_MODE_PIN) == 0)){ + // test mode + RUN_MODE = 0; + TEST_MODE = 1; + + SwitchLEDs(TEST_MODE, RUN_MODE); + } + + // here the jumper has been removed. we are neither in the TEST or RUN mode + // INVALID STATE + if((digitalRead(SET_RUN_MODE_PIN) == 1) && (digitalRead(SET_TEST_MODE_PIN) == 1)) { + TEST_MODE = 0; + RUN_MODE = 0; + SwitchLEDs(!TEST_MODE, !RUN_MODE); + } + +} + + + +/** + * XMODEM serial function definition + */ + +/*!**************************************************************************** + * @brief Initiate XMODEM protocol by sending a NAK command every 4 seconds until the transmitter returns an ACK signal + * @param none + *******************************************************************************/ +void InitXMODEM() { + + // call the trasmitter + Serial.begin(BAUDRATE); + debug(NAK); + debug("\n"); + Serial.flush(); + +} + +/*!**************************************************************************** + * @brief Parse the received serial command if it is a string + *******************************************************************************/ +int value = 0; +void ParseSerialBuffer(char* buffer) { + + if(strcmp(buffer, SOH_CHR) == 0) { + // if(buffer == SOH){ + + debugln(F("")); + SOH_recvd_flag = 1; + digitalWrite(red_led, HIGH); + debugln(F(" Waiting for data...")); + + // put the MCU in data receive state + current_test_state = TEST_STATE::RECEIVE_TEST_DATA; + SwitchLEDs(0, 1); + + } else { + debugln("Unknown"); + } + +} + +/*!**************************************************************************** + * @brief Parse the received serial command if it is a digit + We are only interested in numeric values being sent by the transmitter to us, the receiver + *******************************************************************************/ +void ParseSerialNumeric(int value) { + debug("Receive val: "); + debugln(value); + + if(value == 1) // SOH: numeric 1 + { + debugln(""); + SOH_recvd_flag = 1; + debugln(" Waiting for data"); + + // put the MCU in data receive state + // any serial data after this will be the actual test data being received + SwitchLEDs(0, 1); // red off, green on + current_test_state = TEST_STATE::RECEIVE_TEST_DATA; + + } else if(value == 4) { + // EOT: numeric 4 + debugln("Unknown"); + } +} + +/*!**************************************************************************** + * @brief Receive serial message during handshake + *******************************************************************************/ +void handshakeSerialEvent() { + SwitchLEDs(1,0); + while (Serial.available()) { + char ch = Serial.read(); + + if(isDigit(ch)) { // character between 0 an 9 + // accumulate value + value = value*ch + (ch - '0'); + } else if (ch == '\n') { + debug("SerEvent: "); + debugln(value); + ParseSerialNumeric(value); + value = 0; // reset value for the next transmission burst + } + + + // if(serial_index < MAX_CMD_LENGTH && (ch != '\n') ) { // use newline to signal end of command + // serial_buffer[serial_index++] = ch; + // } else { + // // here when buffer is full or a newline is received + // debugln(serial_buffer); + // ParseSerial(serial_buffer); + // serial_buffer[serial_index] = 0; // terminate the string with a 0 + // serial_index = 0; + + // } + + } +} + +/*!**************************************************************************** + * @brief Receive serial message during RECEIVE_TEST_DATA state + * Data received in this state is the actual test data. It is saved into the test flash memory + * + *******************************************************************************/ +void receiveTestDataSerialEvent() { + while(Serial.available()) { + char ch = Serial.read(); + Serial.write(ch); + + // each CSV string ends with a newline + if(test_data_serial_index < MAX_CSV_LENGTH && (ch != '\n') ) { + test_data_buffer[test_data_serial_index++] = ch; + + } else { + // buffer is full or newline is received + test_data_buffer[test_data_serial_index] = 0; // NUL terminator + test_data_serial_index = 0; + + // HERE - LOG THE CSV STRING TO EXTERNAL FLASH MEMORY + //debugln(test_data_buffer); + // open file in append mode + File data_file = SPIFFS.open(test_data_file, "a"); + if(data_file) { + data_file.print(test_data_buffer); + data_file.println(); // start a new line + data_file.close(); + } else { + debugln(""); + } + } + + } +} + + +////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// END OF FLIGHT COMPUTER TESTING SYSTEM ////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////// + + + +//=================== MAIN SYSTEM ================= +uint8_t drogue_pyro = 25; +uint8_t main_pyro = 12; +uint8_t flash_cs_pin = 5; /*!< External flash memory chip select pin */ +uint8_t remote_switch = 27; + + /* Flight data logging */ -uint8_t cs_pin = 5; /*!< External flash memory chip select pin */ -uint8_t flash_led_pin = 4; /*!< LED pin connected to indicate flash memory formatting */ +uint8_t flash_led_pin = 39; /*!< LED pin connected to indicate flash memory formatting */ char filename[] = "flight.bin"; /*!< data log filename - Filename must be less than 20 chars, including the file extension */ uint32_t FILE_SIZE_512K = 524288L; /*!< 512KB */ uint32_t FILE_SIZE_1M = 1048576L; /*!< 1MB */ @@ -48,16 +532,28 @@ unsigned long long previous_log_time = 0; /*!< The last time we logged data to unsigned long long current_log_time = 0; /*!< What is the processor time right now? */ uint16_t log_sample_interval = 10; /*!< After how long should we sample and log data to flash memory? */ -DataLogger data_logger(cs_pin, flash_led_pin, filename, file, FILE_SIZE_4M); +DataLogger data_logger(flash_cs_pin, flash_led_pin, filename, file, FILE_SIZE_4M); /* position integration variables */ long long current_time = 0; long long previous_time = 0; /** - * ///////////////////////// DATA VARIABLES ///////////////////////// -*/ + * Task synchronization variables + */ +// event group bits +#define TRANSMIT_TELEMETRY_BIT ((EventBits_t) 0x01 << 0) // for bit 0 +#define CHECK_FLIGHT_STATE_BIT ((EventBits_t) 0x01 << 1) // for bit 1 +#define LOG_TO_MEMORY_BIT ((EventBits_t) 0x01 << 2) // for bit 2 +#define TRANSMIT_XBEE_BIT ((EventBits_t) 0x01 << 3) // for bit 3 +#define DEBUG_TO_TERM_BIT ((EventBits_t) 0x01 << 4) // for bit 4 +// event group type for task syncronization +EventGroupHandle_t tasksDataReceiveEventGroup; + +/** + * ///////////////////////// DATA TYPES ///////////////////////// +*/ accel_type_t acc_data; gyro_type_t gyro_data; gps_type_t gps_data; @@ -69,10 +565,13 @@ telemetry_type_t telemetry_packet; */ -///////////////////////// PERIPHERALS INIT ///////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// PERIPHERALS INIT ///////////////// +////////////////////////////////////////////////////////////////////////////////////////////// /** * create an MPU6050 object + * 0x68 is the address of the MPU * set gyro to max deg to 1000 deg/sec * set accel fs reading to 16g */ @@ -82,7 +581,7 @@ MPU6050 imu(0x68, 16, 1000); SFE_BMP180 altimeter; char status; double T, P, p0, a; -#define ALTITUDE 1525.0 // altitude of iPIC building, JKUAT, Juja. +#define ALTITUDE 1525.0 // altitude of iPIC building, JKUAT, Juja. TODO: Change to launch site altitude /*!**************************************************************************** * @brief Initialize BMP180 barometric sensor @@ -91,34 +590,29 @@ double T, P, p0, a; *******************************************************************************/ void BMPInit() { if(altimeter.begin()) { - Serial.println("BMP init success"); + debugln("[+]BMP init OK."); // TODO: update system table } else { - Serial.println("BMP init failed"); + debugln("[+]BMP init failed"); } } - /*!**************************************************************************** * @brief Initialize the GPS connected on Serial2 * @return 1 if init OK, 0 otherwise * *******************************************************************************/ void GPSInit() { - // create the GPS object - debugln("Initializing the GPS..."); // TODO: log to system logger Serial2.begin(GPS_BAUD_RATE); delay(100); // wait for GPS to init + + debugln("[+]GPS init OK!"); // TODO: Proper GPS init check } /** * ///////////////////////// END OF PERIPHERALS INIT ///////////////////////// */ - -// create data types to hold the sensor data - - /* create queue to store altimeter data * store pressure and altitude * */ @@ -153,10 +647,13 @@ QueueHandle_t gps_data_qHandle; // mqtt_client.setServer(MQTT_SERVER, MQTT_PORT); // } + +////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////// ACCELERATION AND ROCKET ATTITUDE DETERMINATION ///////////////// +////////////////////////////////////////////////////////////////////////////////////////////// /*!**************************************************************************** - * @brief Read aceleration data from the accelerometer + * @brief Read acceleration data from the accelerometer * @param pvParameters - A value that is passed as the paramater to the created task. * If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - * so it is not valid to pass the address of a stack variable. @@ -186,7 +683,9 @@ void readAccelerationTask(void* pvParameter) { } -///////////////////////// ALTITUDE AND VELOCITY DETERMINATION ///////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// ALTITUDE AND VELOCITY DETERMINATION ///////////////// +////////////////////////////////////////////////////////////////////////////////////////////// /*!**************************************************************************** * @brief Read ar pressure data from the barometric sensor onboard @@ -218,9 +717,9 @@ void readAltimeterTask(void* pvParameters){ status = altimeter.getTemperature(T); if(status != 0) { // print out the measurement - // Serial.print("temperature: "); - // Serial.print(T, 2); - // Serial.print(" \xB0 C, "); + // debug("temperature: "); + // debug(T, 2); + // debug(" \xB0 C, "); // start pressure measurement // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait). @@ -240,9 +739,9 @@ void readAltimeterTask(void* pvParameters){ status = altimeter.getPressure(P, T); if(status != 0) { // print out the measurement - // Serial.print("absolute pressure: "); - // Serial.print(P, 2); - // Serial.print(" mb, "); // in millibars + // debug("absolute pressure: "); + // debug(P, 2); + // debug(" mb, "); // in millibars p0 = altimeter.sealevel(P,ALTITUDE); // If you want to determine your altitude from the pressure reading, @@ -251,24 +750,24 @@ void readAltimeterTask(void* pvParameters){ // Result: a = altitude in m. a = altimeter.altitude(P, p0); - // Serial.print("computed altitude: "); - // Serial.print(a, 0); - // Serial.print(" meters, "); + // debug("computed altitude: "); + // debug(a, 0); + // debug(" meters, "); } else { - Serial.println("error retrieving pressure measurement\n"); + debugln("error retrieving pressure measurement\n"); } } else { - Serial.println("error starting pressure measurement\n"); + debugln("error starting pressure measurement\n"); } } else { - Serial.println("error retrieving temperature measurement\n"); + debugln("error retrieving temperature measurement\n"); } } else { - Serial.println("error starting temperature measurement\n"); + debugln("error starting temperature measurement\n"); } // delay(2000); @@ -350,6 +849,154 @@ void readGPSTask(void* pvParameters){ } +/*!**************************************************************************** + * @brief dequeue data from telemetry queue after all the tasks have consumed the data + * @param pvParameters - A value that is passed as the paramater to the created task. + * If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - + * so it is not valid to pass the address of a stack variable. + * @return none + * + *******************************************************************************/ +void clearTelemetryQueueTask(void* pvParameters) { + telemetry_type_t data_item; // data item to dequeue + + const EventBits_t xBitsToWaitFor = (TRANSMIT_TELEMETRY_BIT | CHECK_FLIGHT_STATE_BIT | LOG_TO_MEMORY_BIT); // todo: ADD TRANSMIT_TO_XBEE AND DEBUG TO_TERMINAL + EventBits_t xEventGroupValue; + + while (1) { + xEventGroupValue = xEventGroupWaitBits( + tasksDataReceiveEventGroup, // event group to use + xBitsToWaitFor, // bit combo to wait for + pdTRUE, // clear all bits on exit + pdTRUE, // Wait for all bits (AND) + portMAX_DELAY // wait indefinitely + ); + + // Clear the data item from telemetry queue + xQueueReceive(telemetry_data_qHandle, &data_item, portMAX_DELAY); + + // check if all data consuming tasks have received the data + // check TRANSMIT_TELEMETRY TASK + if(xEventGroupValue & TRANSMIT_TELEMETRY_BIT != 0) { + // TODO: MUST LOG TO SYSTEM LOGGER + debugln("[transmit telemetry task receive data OK!]"); + } + + // check CHECK_FLIGHT_STATE_TASK + if(xEventGroupValue & CHECK_FLIGHT_STATE_BIT != 0) { + // TODO: MUST LOG TO SYSTEM LOGGER + debugln("[check state task receive data OK!]"); + } + + // check LOG_TO_MEMORY task + if(xEventGroupValue & LOG_TO_MEMORY_BIT != 0) { + // TODO: MUST LOG TO SYSTEM LOGGER + debugln("[log to memory task receive data OK!]"); + } + + //TODO: XBEE, DEBUG TO TERM + + } + +} + +/*!**************************************************************************** + * @brief Check and update the current state of flight - refer to states.h + * @param pvParameters - A value that is passed as the paramater to the created task. + * If pvParameters is set to the address of a variable then the variable must still exist when the created task executes - + * so it is not valid to pass the address of a stack variable. + * @return Updates the telemetry data flight state value + * + *******************************************************************************/ +void checkFlightState(void* pvParameters) { + // get the flight state from the telemetry task + telemetry_type_t sensor_data; + + while (1) { + uint8_t s = xQueuePeek(telemetry_data_qHandle, &sensor_data, portMAX_DELAY); + xEventGroupSetBits(tasksDataReceiveEventGroup, CHECK_FLIGHT_STATE_BIT); // signal that we have received flight data + + + // check the flight state based on the conditions + // this is a dummy condition + if(sensor_data.acc_data.ax < 5 && sensor_data.acc_data.ay > 2){ + // change flight state to POWERED FLIGHT + current_state = FLIGHT_STATE::POWERED_FLIGHT; + } + // else if() {} + } + +} + +/*!**************************************************************************** + * @brief performs flight actions based on the current flight state + * If the flight state neccessisates an operation, we perfom it here + * For example if the flight state is apogee, we perfom MAIN_CHUTE ejection + * + * @param pvParameter - A value that is passed as the paramater to the created task. + * If pvParameter is set to the address of a variable then the variable must still exist when the created task executes - + * so it is not valid to pass the address of a stack variable. + * + *******************************************************************************/ +void flightStateCallback(void* pvParameters) { + while(1) { + switch (current_state) { + // PRE_FLIGHT_GROUND + case FLIGHT_STATE::PRE_FLIGHT_GROUND: + debugln("PRE-FLIGHT STATE"); + break; + + // POWERED_FLIGHT + case FLIGHT_STATE::POWERED_FLIGHT: + debugln("POWERED FLIGHT STATE"); + break; + + // COASTING + case FLIGHT_STATE::COASTING: + debugln("COASTING"); + break; + + // APOGEE + case FLIGHT_STATE::APOGEE: + debugln("APOGEE"); + break; + + // DROGUE_DEPLOY + case FLIGHT_STATE::DROGUE_DEPLOY: + debugln("DROGUE DEPLOY"); + drogueChuteDeploy(); + break; + + // DROGUE_DESCENT + case FLIGHT_STATE::DROGUE_DESCENT: + debugln("DROGUE DESCENT"); + break; + + // MAIN_DEPLOY + case FLIGHT_STATE::MAIN_DEPLOY: + debugln("MAIN CHUTE DEPLOY"); + mainChuteDeploy(); + break; + + // MAIN_DESCENT + case FLIGHT_STATE::MAIN_DESCENT: + debugln("MAIN CHUTE DESCENT"); + break; + + // POST_FLIGHT_GROUND + case FLIGHT_STATE::POST_FLIGHT_GROUND: + debugln("POST FLIGHT GROUND"); + break; + + // MAINTAIN AT PRE_FLIGHT_GROUND IF NO STATE IS SPECIFIED - NOT GONNA HAPPEN BUT BETTER SAFE THAN SORRY + default: + debugln(current_state); + break; + + } + } +} + /*!**************************************************************************** * @brief debug flight/test data to terminal, this task is called if the DEBUG_TO_TERMINAL is set to 1 (see defs.h) @@ -362,7 +1009,7 @@ void debugToTerminalTask(void* pvParameters){ telemetry_type_t rcvd_data; // accelration received from acceleration_queue while(true){ - if(xQueueReceive(telemetry_data_qHandle, &rcvd_data, portMAX_DELAY) == pdPASS){ + if(xQueuePeek(telemetry_data_qHandle, &rcvd_data, portMAX_DELAY) == pdPASS){ // debug CSV to terminal // debug(rcvd_data.acc_data.ax); debug(","); // debug(rcvd_data.acc_data.ay); debug(","); @@ -403,6 +1050,9 @@ void debugToTerminalTask(void* pvParameters){ // }else{ // /* no queue */ // } + + xEventGroupSetBits(tasksDataReceiveEventGroup, DEBUG_TO_TERM_BIT); // signal that we have received flight data + } } @@ -418,7 +1068,9 @@ void logToMemory(void* pvParameter) { telemetry_type_t received_packet; while(1) { - xQueueReceive(telemetry_data_qHandle, &received_packet, portMAX_DELAY); + xQueuePeek(telemetry_data_qHandle, &received_packet, portMAX_DELAY); + xEventGroupSetBits(tasksDataReceiveEventGroup, LOG_TO_MEMORY_BIT); // signal that we have received flight data + // received_packet.record_number++; // is it time to record? @@ -534,37 +1186,72 @@ void logToMemory(void* pvParameter) { // } + /*!**************************************************************************** - * @brief Setup - perfom initialization of all hardware subsystems, create queues, create queue handles + * @brief fires the pyro-charge to deploy the drogue chute + * Turn on the drogue chute ejection circuit by running the GPIO + * HIGH for a preset No. of seconds. + * Default no. of seconds to remain HIGH is 5 + * + *******************************************************************************/ +void drogueChuteDeploy() { + debugln("DROGUE CHUTE DEPLOYED"); +} + +/*!**************************************************************************** + * @brief fires the pyro-charge to deploy the main chute + * Turn on the main chute ejection circuit by running the GPIO + * HIGH for a preset No. of seconds. + * Default no. of seconds to remain HIGH is 5 + * + *******************************************************************************/ +void mainChuteDeploy() { + debugln("MAIN CHUTE DEPLOYED"); +} + + +/*!**************************************************************************** + * @brief Setup - perform initialization of all hardware subsystems, create queues, create queue handles * initialize system check table * *******************************************************************************/ void setup(){ /* initialize serial */ - Serial.begin(115200); + Serial.begin(BAUDRATE); + delay(100); - uint8_t app_id = xPortGetCoreID(); - BaseType_t th; // task creation handle + /* initialize the system logger */ + InitSPIFFS(); - /* initialize the data logging system - logs to flash memory */ - data_logger.loggerInit(); + /* mode 0 resets the system log file by clearing all the current contents */ +// system_logger.logToFile(SPIFFS, 0, rocket_ID, level, system_log_file, "Game Time!"); // TODO: DEBUG - /* connect to WiFi*/ - // connectToWifi(); - - ///////////////////////// PERIPHERALS INIT ///////////////////////// + debugln(); + debugln(F("==============================================")); + debugln(F("========= INITIALIZING PERIPHERALS ===========")); + debugln(F("==============================================")); imu.init(); BMPInit(); GPSInit(); + initGPIO(); - //============================================================== + debugln(); + debugln(F("==============================================")); + debugln(F("===== INITIALIZING DATA LOGGING SYSTEM =======")); + debugln(F("==============================================")); + initSD(); + data_logger.loggerInit(); + uint8_t app_id = xPortGetCoreID(); + BaseType_t th; // task creation handle // mqtt_client.setBufferSize(MQTT_BUFFER_SIZE); // mqtt_client.setServer(MQTT_SERVER, MQTT_PORT); - debugln("==============Creating queues=============="); // TODO: LOG TO SYSTEM LOGGER + debugln(); + debugln(F("==============================================")); + debugln(F("============== CREATING QUEUES ===============")); + debugln(F("==============================================")); - ///////////////////// create data queues //////////////////// // this queue holds the data from MPU 6050 - this data is filtered already accel_data_qHandle = xQueueCreate(GYROSCOPE_QUEUE_LENGTH, sizeof(accel_type_t)); @@ -582,122 +1269,128 @@ void setup(){ /* check if the queues were created successfully */ if(accel_data_qHandle == NULL){ - debugln("[-]accel data queue creation failed!"); + debugln("[-]accel data queue creation failed"); } else{ - debugln("[+]Accelleration data queue creation success"); + debugln("[+]Acceleration data queue creation OK."); } if(altimeter_data_qHandle == NULL){ - debugln("[-]Altimeter data queue creation failed!"); + debugln("[-]Altimeter data queue creation failed"); } else{ - debugln("[+]Altimeter data queue creation success"); + debugln("[+]Altimeter data queue creation OK."); } if(gps_data_qHandle == NULL){ - debugln("[-]GPS data queue creation failed!"); + debugln("[-]GPS data queue creation failed"); } else{ - debugln("[+]GPS data queue creation success"); + debugln("[+]GPS data queue creation OK."); } if(telemetry_data_qHandle == NULL) { - debugln("Telemetry queue created"); + debugln("[-]Telemetry data queue creation failed"); } else { - debugln("Failed to create telemetry queue"); + debugln("[+]Telemetry data queue creation OK."); } // if(filtered_data_queue == NULL){ // debugln("[-]Filtered data queue creation failed!"); // } else{ - // debugln("[+]Filtered data queue creation success"); + // debugln("[+]Filtered data queue creation OK."); // } // if(flight_states_queue == NULL){ // debugln("[-]Flight states queue creation failed!"); // } else{ - // debugln("[+]Flight states queue creation success"); + // debugln("[+]Flight states queue creation OK."); // } - //====================== TASK CREATION ========================== + debugln(); + debugln(F("==============================================")); + debugln(F("============== CREATING TASKS ===============")); + debugln(F("==============================================")); + /* Create tasks * All tasks have a stack size of 1024 words - not bytes! * ESP32 is 32 bit, therefore 32bits x 1024 = 4096 bytes * So the stack size is 4096 bytes - * */ + * + * TASK CREATION PARAMETERS + * function that executes this task + * Function name - for debugging + * Stack depth in words + * parameter to be passed to the task + * Task priority - in this case 1 + * task handle that can be passed to other tasks to reference the task + * + * / debugln("==============Creating tasks=============="); /* TASK 1: READ ACCELERATION DATA */ - th = xTaskCreatePinnedToCore( - readAccelerationTask, - "readGyroscope", - STACK_SIZE*2, - NULL, - 1, - NULL, - app_id - ); - - if(th == pdPASS) { - Serial.println("Read acceleration task created"); - } else { - Serial.println("Read acceleration task creation failed"); - } + th = xTaskCreatePinnedToCore(readAccelerationTask, "readGyroscope", STACK_SIZE*2, NULL, 1, NULL,app_id); + if(th == pdPASS) { + debugln("[+]Read acceleration task created"); + } else { + debugln("[-]Read acceleration task creation failed"); + } /* TASK 2: READ ALTIMETER DATA */ - th = xTaskCreatePinnedToCore( - readAltimeterTask, /* function that executes this task*/ - "readAltimeter", /* Function name - for debugging */ - STACK_SIZE*2, /* Stack depth in words */ - NULL, /* parameter to be passed to the task */ - 2, /* Task priority - in this case 1 */ - NULL, /* task handle that can be passed to other tasks to reference the task */ - app_id - ); - + th = xTaskCreatePinnedToCore(readAltimeterTask,"readAltimeter",STACK_SIZE*2,NULL,2,NULL,app_id); if(th == pdPASS) { - debugln("Read altimeter task created successfully"); + debugln("[+]Read altimeter task created OK."); } else { - debugln("Failed to create read altimeter task"); + debugln("[-]Failed to create read altimeter task"); } /* TASK 3: READ GPS DATA */ - th = xTaskCreatePinnedToCore( - readGPSTask, - "readGPS", - STACK_SIZE*2, - NULL, - 1, - NULL, - app_id - ); + th = xTaskCreatePinnedToCore(readGPSTask, "readGPS", STACK_SIZE*2, NULL,1,NULL, app_id); if(th == pdPASS) { - debugln("GPS task created"); + debugln("[+]GPS task created OK."); } else { - debugln("Failed to create GPS task"); - } - - #if DEBUG_TO_TERMINAL // set SEBUG_TO_TERMINAL to 0 to prevent serial debug data to serial monitor - /* TASK 4: DISPLAY DATA ON SERIAL MONITOR - FOR DEBUGGING */ - th = xTaskCreatePinnedToCore( - debugToTerminalTask, - "displayData", - STACK_SIZE, - NULL, - 1, - NULL, - app_id - ); + debugln("[-]Failed to create GPS task"); + } + + /* TASK 4: CLEAR TELEMETRY QUEUE ITEM */ + th = xTaskCreatePinnedToCore(clearTelemetryQueueTask,"clearTelemetryQueueTask",STACK_SIZE*2,NULL,1, NULL,app_id); + + if(th == pdPASS) { + debugln("[+]clearTelemetryQueueTask task created OK."); + } else { + debugln("[-]Failed to create clearTelemetryQueueTask task"); + } + + /* TASK 5: CHECK FLIGHT STATE TASK */ + th = xTaskCreatePinnedToCore(checkFlightState,"checkFlightState",STACK_SIZE*2,NULL,1, NULL,app_id); + if(th == pdPASS) { + debugln("[+]checkFlightState task created OK."); + } else { + debugln("[-}Failed to create checkFlightState task"); + } + //// + + /* TASK 6: FLIGHT STATE CALLBACK TASK */ + th = xTaskCreatePinnedToCore(flightStateCallback,"flightStateCallback",STACK_SIZE*2,NULL,1, NULL,app_id); + if(th == pdPASS) { + debugln("[+]flightStateCallback task created OK."); + } else { + debugln("[-}Failed to create flightStateCallback task"); + } + + #if DEBUG_TO_TERMINAL // set DEBUG_TO_TERMINAL to 0 to prevent serial debug data to serial monitor + + /* TASK 7: DISPLAY DATA ON SERIAL MONITOR - FOR DEBUGGING */ + th = xTaskCreatePinnedToCore(debugToTerminalTask,"debugToTerminalTask",STACK_SIZE,NULL,1,NULL,app_id); if(th == pdPASS) { - Serial.println("Task created"); + debugln("[+}debugToTerminalTaskTask created"); } else { - Serial.println("Task not created"); + debugln("[-}Task not created"); } #endif // DEBUG_TO_TERMINAL_TASK - /* TASK 4: TRANSMIT TELEMETRY DATA */ + /* TASK 8: TRANSMIT TELEMETRY DATA */ // if(xTaskCreate( // transmitTelemetry, // "transmit_telemetry", @@ -708,11 +1401,11 @@ void setup(){ // ) != pdPASS){ // debugln("[-]Transmit task failed to create"); // }else{ - // debugln("[+]Transmit task created success"); + // debugln("[+]Transmit task created OK."); // } - #if LOG_TO_MEMORY // set LOG_TO_MEMORY to 1 to allow loggin to memory - /* TASK 4: LOG DATA TO MEMORY */ + #if LOG_TO_MEMORY // set LOG_TO_MEMORY to 1 to allow logging to memory + /* TASK 9: LOG DATA TO MEMORY */ if(xTaskCreate( logToMemory, "logToMemory", @@ -722,8 +1415,9 @@ void setup(){ NULL ) != pdPASS){ debugln("[-]logToMemory task failed to create"); + }else{ - debugln("[+]logToMemory task created success"); + debugln("[+]logToMemory task created OK."); } #endif // LOG_TO_MEMORY @@ -737,9 +1431,31 @@ void setup(){ // ) != pdPASS){ // debugln("[-]FSM task failed to create"); // }else{ - // debugln("[+]FSM task created success"); + // debugln("[+]FSM task created OK."); // } + // create event group to sync flight data consumption + // see N4 flight software docs for more info + debugln(); + debugln(F("==============================================")); + debugln(F("===== CREATING DATA CONSUMER EVENT GROUP ====")); + debugln(F("==============================================")); + + tasksDataReceiveEventGroup = xEventGroupCreate(); + if(tasksDataReceiveEventGroup == NULL) { + debugln("[-] data consumer event group failed to create"); + } else { + debugln("[+] data consumer event group created OK."); + } + + // check whether we are in test mode or running mode + checkRunTestToggle(); + if(TEST_MODE) { + debugln(); + debugln(F("==============================================")); + debugln(F("=========FLIGHT COMPUTER TESTING MODE=========")); + debugln(F("==============================================")); + } } @@ -760,4 +1476,4 @@ void loop(){ // mqtt_client.loop(); -} \ No newline at end of file +} diff --git a/n4-flight-software/src/mpu.cpp b/n4-flight-software/src/mpu.cpp index 21000bd..233e70e 100644 --- a/n4-flight-software/src/mpu.cpp +++ b/n4-flight-software/src/mpu.cpp @@ -1,4 +1,5 @@ #include "mpu.h" +#include // constructor MPU6050::MPU6050(uint8_t address, uint32_t accel_fs_range, uint32_t gyro_fs_range) { @@ -46,10 +47,12 @@ void MPU6050::init() { Wire.write(SET_ACCEL_FS_16G); } Wire.endTransmission(true); + + Serial.println(F("[+]MPU6050 init OK.")); } /** - * Read X axix acceleration + * Read X axiS acceleration */ float MPU6050::readXAcceleration() { Wire.beginTransmission(this->_address); diff --git a/n4-flight-software/src/mpu.h b/n4-flight-software/src/mpu.h index e89c1f1..f2b8936 100644 --- a/n4-flight-software/src/mpu.h +++ b/n4-flight-software/src/mpu.h @@ -51,35 +51,35 @@ class MPU6050 { private: - uint8_t _address; - uint32_t _accel_fs_range; - uint32_t _gyro_fs_range; - + uint8_t _address; + uint32_t _accel_fs_range; + uint32_t _gyro_fs_range; + public: - // sensor data - int16_t acc_x, acc_y, acc_z; // raw acceleration values - float acc_x_real, acc_y_real, acc_z_real; // converted aceleration values - int16_t ang_vel_x, ang_vel_y, ang_vel_z; - float ang_vel_x_real, ang_vel_y_real, ang_vel_z_real; // converted angular velocity values - int16_t temp; - float temp_real; + // sensor data + int16_t acc_x, acc_y, acc_z; // raw acceleration values + float acc_x_real, acc_y_real, acc_z_real; // converted acceleration values + int16_t ang_vel_x, ang_vel_y, ang_vel_z; + float ang_vel_x_real, ang_vel_y_real, ang_vel_z_real; // converted angular velocity values + int16_t temp; + float temp_real; - float pitch_angle, roll_angle; - float acc_x_ms, acc_y_ms, acc_z_ms; // acceleration in m/s^2 + float pitch_angle, roll_angle; + float acc_x_ms, acc_y_ms, acc_z_ms; // acceleration in m/s^2 - MPU6050(uint8_t address, uint32_t accel_fs_range, uint32_t gyro_fs_range); - void init(); - float readXAcceleration(); - float readYAcceleration(); - float readZAcceleration(); - float readXAngularVelocity(); - float readYAngularVelocity(); - float readZAngularVelocity(); - float readTemperature(); - void filterImu(); - float getRoll(); - float getPitch(); + MPU6050(uint8_t address, uint32_t accel_fs_range, uint32_t gyro_fs_range); + void init(); + float readXAcceleration(); + float readYAcceleration(); + float readZAcceleration(); + float readXAngularVelocity(); + float readYAngularVelocity(); + float readZAngularVelocity(); + float readTemperature(); + void filterImu(); + float getRoll(); + float getPitch(); }; diff --git a/n4-flight-software/src/pin_assignment.MD b/n4-flight-software/src/pin_assignment.MD new file mode 100644 index 0000000..e68614e --- /dev/null +++ b/n4-flight-software/src/pin_assignment.MD @@ -0,0 +1,2 @@ +## Flight computer pin assignment + diff --git a/n4-flight-software/src/states.cpp b/n4-flight-software/src/states.cpp index fa0e665..ef290fb 100644 --- a/n4-flight-software/src/states.cpp +++ b/n4-flight-software/src/states.cpp @@ -2,7 +2,17 @@ #include "functions.h" #include "defs.h" #include "sensors.h" +<<<<<<< Updated upstream #include "elapsedMillis.h" +======= +#include "mpu.h" +#include + + +int PREVIOUS_STATE = 0; + +int Mode; +>>>>>>> Stashed changes const int DROGUE_PIN = 3; const int MAIN_PIN = 5; @@ -12,7 +22,11 @@ elapsedMillis decelerationTimer; // Timer to track deceleration duration bool isDeceleratingContinuously(){ static float previousAltitude = 0.0f; // Store previous altitude float currentAltitude = getAltitude(); // Read current altitude +<<<<<<< Updated upstream float verticalAccel = getAcceleration(MPU_SENSOR_Z_AXIS) - 9.81f; // Calculate vertical acceleration +======= + float verticalAccel = readZAcceleration(); // Calculate vertical acceleration +>>>>>>> Stashed changes // Check for deceleration event bool isDecelerating = verticalAccel < 0 @@ -36,11 +50,19 @@ State currentState = State::PRE_FLIGHT_GROUND; //State machine transition conditions -//checks if altitude is greater than 50m to determine powered flight +//checks if altitude displacement is greater than 50m to determine powered flight State isInPoweredFlight(float altitude) { +<<<<<<< Updated upstream if (altitude > 50.0f) { return State::POWERED_FLIGHT; } +======= + float displacement = altitude - BASE_ALTITUDE; + if (displacement > 5) { + return POWERED_FLIGHT; + } + return currentState; +>>>>>>> Stashed changes } // Checks for continuous deceleration to determine coasting State isInCoasting(bool isDecelerating) { @@ -75,7 +97,7 @@ void loop() { float velocity = getVelocity(); bool isDecelerating = isDeceleratingContinuously(); - if(modf == FLIGHT_MODE) { + if(Mode == FLIGHT_MODE) { // Call state transition functions currentState = isInPoweredFlight(currentAltitude); @@ -83,7 +105,11 @@ void loop() { currentState = isInApogee(velocity,currentAltitude); currentState = isInMainChuteDeploy(currentAltitude); +<<<<<<< Updated upstream } else { +======= + } else if (Mode == SAFE_MODE) { +>>>>>>> Stashed changes currentState = PRE_FLIGHT_GROUND; } diff --git a/n4-flight-software/src/states.cpp~ b/n4-flight-software/src/states.cpp~ new file mode 100644 index 0000000..53b713c --- /dev/null +++ b/n4-flight-software/src/states.cpp~ @@ -0,0 +1,21 @@ +/** + * @file states.h + * This file describes the flight states + * + */ +#ifdef STATES_H +#define STATES_H + +enum FLIGHT_STATE { + PRE_FLIGHT_GROUND = 0, + POWERED_FLIGHT, + COASTING, + APOGEE, + DROGUE_DEPLOY, + DROGUE_DESCENT, + MAIN_DEPLOY, + MAIN_DESCENT, + POST_FLIGHT_GROUND +}; + +#endif diff --git a/n4-flight-software/src/states.h b/n4-flight-software/src/states.h new file mode 100644 index 0000000..b46fa2e --- /dev/null +++ b/n4-flight-software/src/states.h @@ -0,0 +1,21 @@ +/** + * @file states.h + * This file describes the flight states + * + */ +#ifndef STATES_H +#define STATES_H + +typedef enum { + PRE_FLIGHT_GROUND = 0, + POWERED_FLIGHT, + COASTING, + APOGEE, + DROGUE_DEPLOY, + DROGUE_DESCENT, + MAIN_DEPLOY, + MAIN_DESCENT, + POST_FLIGHT_GROUND +} FLIGHT_STATE; + +#endif diff --git a/n4-flight-software/system-logger/SystemLogLevels.h b/n4-flight-software/src/system_log_levels.h similarity index 77% rename from n4-flight-software/system-logger/SystemLogLevels.h rename to n4-flight-software/src/system_log_levels.h index fa2dc6e..17745f8 100644 --- a/n4-flight-software/system-logger/SystemLogLevels.h +++ b/n4-flight-software/src/system_log_levels.h @@ -7,15 +7,15 @@ * */ -#ifndef LEVELS_H -#define LEVELS_H +#ifndef SYSTEM_LOG_LEVELS_H +#define SYSTEM_LOG_LEVELS_H -enum LOG_LEVEL { +typedef enum{ DEBUG = 0, INFO, WARNING, CRITICAL, ERROR -}; +} LOG_LEVEL; #endif diff --git a/n4-flight-software/src/system_logger.cpp b/n4-flight-software/src/system_logger.cpp new file mode 100644 index 0000000..6e7d9c8 --- /dev/null +++ b/n4-flight-software/src/system_logger.cpp @@ -0,0 +1,124 @@ +#include "system_logger.h" + +void SystemLogger::logToFile (fs::FS &fs, uint8_t mode, const char* client, uint8_t log_level, const char* file, const char* msg) { + char log_buffer[100]; + // get the timestamp + unsigned long raw_timestamp = millis(); + + // convert the timestamp to human readable format + convertTimestamp(raw_timestamp); + + // construct the log message + // timestamp clientID log_level msg + sprintf(log_buffer, + "%c %d %s %s %s\n", + tstamp, + client, + this->getLogLevelString(log_level), + msg + ); + + // open the file in the specified mode + if(mode == 0) { + // clear the file contents + // this is used just before flight to make sure we do not have previous data + // on the log file + File f = fs.open(file, FILE_WRITE); + if(!f) { + Serial.println("Failed to open file "); + return; + } + + // log to file + if(f.print(log_buffer)) { + Serial.println("- file written"); + } else { + Serial.println("- write failed"); + } + + // close file + f.close(); + + } else if(mode == 1) { + File f = fs.open(file, FILE_APPEND); + if(!f) { + Serial.println("Failed to open file "); + return; + } + + // log to file + if(f.print(log_buffer)) { + Serial.println("- file written"); + } else { + Serial.println("- write failed"); + } + + // close file + f.close(); + + } +} + +/** + * @brief read log file to console + */ + void SystemLogger::readLogFile(fs::FS &fs, const char* file) { + Serial.printf("Reading file: %s\r\n", file); + File f = fs.open(file); + + if(!f || f.isDirectory()){ + Serial.println("- failed to open file for reading"); + return; + } + + Serial.println("- read from file:"); + while(f.available()){ + Serial.write(f.read()); + } + Serial.println(); + f.close(); + } + +/** + * + * @brief convert the log level to string + * + */ +const char* SystemLogger::getLogLevelString(uint8_t log_level) { + static const char* debug = "DEBUG"; + static const char* info = "INFO"; + static const char* warning = "WARNING"; + static const char* critical = "CRITICAL"; + static const char* error = "ERROR"; + static const char* unknown = "UNKNOWN"; + + switch (log_level) { + case 0: + return debug; + break; + + case 1: + return info; + break; + + case 2: + return warning; + break; + + case 3: + return critical; + break; + + case 4: + return error; + break; + + default: + return unknown; + break; + } + +} + + + diff --git a/n4-flight-software/src/system_logger.h b/n4-flight-software/src/system_logger.h new file mode 100644 index 0000000..12d569b --- /dev/null +++ b/n4-flight-software/src/system_logger.h @@ -0,0 +1,17 @@ +#ifndef SYSTEMLOGGER_H +#define SYSTEMLOGGER_H + +#include +#include +#include +#include "custom_time.h" + +class SystemLogger { + public: + const char* getLogLevelString(uint8_t log_level); + void logToConsole (const uint32_t timestamp, const char* client, uint8_t log_level, const char* msg); + void logToFile (fs::FS &fs, uint8_t mode, const char* client, uint8_t log_level, const char* file, const char* msg); + void readLogFile(fs::FS &fs, const char* file); +}; + +#endif diff --git a/n4-flight-software/system-logger/SystemLogger.cpp b/n4-flight-software/system-logger/SystemLogger.cpp deleted file mode 100644 index ab2a93a..0000000 --- a/n4-flight-software/system-logger/SystemLogger.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "SystemLogger.h" - -/** - * - * @brief convert the log level to string - * - */ -const char* SystemLogger::getLogLevelString(uint8_t log_level) { - static const char* debug = "DEBUG"; - static const char* info = "INFO"; - static const char* warning = "WARNING"; - static const char* critical = "CRITICAL"; - static const char* error = "ERROR"; - static const char* unknown = "UNKNOWN"; - - switch (log_level) { - case 0: - return debug; - break; - - case 1: - return info; - break; - - case 2: - return warning; - break; - - case 3: - return critical; - break; - - case 4: - return error; - break; - - default: - return unknown; - break; - } - -} - - - diff --git a/n4-flight-software/system-logger/SystemLogger.h b/n4-flight-software/system-logger/SystemLogger.h deleted file mode 100644 index 091f0df..0000000 --- a/n4-flight-software/system-logger/SystemLogger.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef SYSTEMLOGGER_H -#define SYSTEMLOGGER_H - -#include - - -class SystemLogger { - public: - void writeToConsole (const uint32_t timestamp, const char* client, uint8_t log_level, const char* msg); - const char* getLogLevelString(uint8_t log_level); -}; - -#endif diff --git a/n4-flight-software/system-logger/logger-arduino/logger-arduino.ino b/n4-flight-software/system-logger/logger-arduino/logger-arduino.ino deleted file mode 100644 index 13d06c0..0000000 --- a/n4-flight-software/system-logger/logger-arduino/logger-arduino.ino +++ /dev/null @@ -1,28 +0,0 @@ - -char tstamp[50]; // to hold a timestamp -int minute=0, sec=0, msec=0; - -void getTimeStamp(unsigned long m) { - // convert time to mins, secs, msecs - - minute = ((m/1000)/60) % 60; - sec = (m/1000) % 60; - msec = m%1000; - - sprintf(tstamp, "%d:%d:%ul", minute, sec, msec); - -} - -void setup() { - Serial.begin(115200); - -} - -void loop() { - - unsigned long x = millis(); - getTimeStamp(x); - - Serial.println(tstamp); - -} diff --git a/n4-flight-software/system-logger/logger-console.cpp b/n4-flight-software/system-logger/logger-console.cpp deleted file mode 100644 index c399290..0000000 --- a/n4-flight-software/system-logger/logger-console.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include "SystemLogger.h" -#include "SystemLogLevels.h" - -// DRIVER CODE FOR CONSOLE TESTING - -// LOG MESSAGE STRUCTURE -// [TIMESTAMP]:[CLIENT_ID]:[LOG-LEVEL]:MESSAGE -// CLIENT_ID tells which ESP - flight computer(FC) or ground-station(GS) - this is an ID xtracted from the ESP's core -// TIMESTAMP STRUCTURE: [HOUR/MIN/SEC/DAY/MONTH/YR] - -class LoggerConsole : public SystemLogger { - public: - void writeToConsole(const time_t timestamp, const char* client, uint8_t log_level, const char* msg) { - char log_buffer[128]; - - // get verbose log levels - returns int converted to string to tell the log level - const char* log_level_str = getLogLevelString(log_level); - - // package the log message structure - // int chars = sprintf(log_buffer, "[%s]:[%s]:[%s]:%s\n", timestamp, client, log_level_str, msg); - sprintf(log_buffer, "[%s]:[%s]:[%s]",client, log_level_str, msg); - - // print to console - std::cout << log_buffer; - - } -}; - -int main() { - LoggerConsole syslogger; - - // fake message - timestamp, client_id, log_level, message - time_t timestamp = 19400; - const char* client = "123EDFE"; - uint8_t log_level = LOG_LEVEL::DEBUG; - const char* msg = "Testing 1..2"; - - std::cout<<"\n"; - - // call the logger - syslogger.writeToConsole(timestamp, client, log_level, msg); - - - - return 0; -} diff --git a/n4-flight-software/src/custom-time.h b/n4-flight-software/test/log_time_fmt_test/custom-time.h similarity index 75% rename from n4-flight-software/src/custom-time.h rename to n4-flight-software/test/log_time_fmt_test/custom-time.h index 50fcc18..9bb2e05 100644 --- a/n4-flight-software/src/custom-time.h +++ b/n4-flight-software/test/log_time_fmt_test/custom-time.h @@ -9,9 +9,6 @@ #include -char tstamp[50]; // to hold a timestamp -int minute=0, sec=0, msec=0; - -char* convertTimestamp(unsigned long); - +void convertTimestamp(unsigned long); +ma #endif \ No newline at end of file diff --git a/n4-flight-software/src/custom-time.cpp b/n4-flight-software/test/log_time_fmt_test/log_time_fmt_test.ino similarity index 67% rename from n4-flight-software/src/custom-time.cpp rename to n4-flight-software/test/log_time_fmt_test/log_time_fmt_test.ino index 5f70b35..beb849b 100644 --- a/n4-flight-software/src/custom-time.cpp +++ b/n4-flight-software/test/log_time_fmt_test/log_time_fmt_test.ino @@ -1,3 +1,4 @@ + /*!**************************************************************************** * @file custom-time.c * @brief This file implements functions to convert time in milliseconds to @@ -7,16 +8,30 @@ #include "custom-time.h" +char tstamp[50]; // to hold a timestamp +int minute=0, sec=0, msec=0; + /*!**************************************************************************** - * @brief convert time in millisecsonds to minutes, seconds and time that are human readable + * @brief convert time in milliseconds to minutes, seconds and time that are human readable * @param msec time in milliseconds, got from millis() function *******************************************************************************/ -char* convertTimestamp(unsigned long msec) { +void convertTimestamp(unsigned long msec) { minute = ((msec/1000)/60) % 60; sec = (msec/1000) % 60; msec = msec%1000; sprintf(tstamp, "%d:%d:%ul", minute, sec, msec); - return tstamp; } + +void setup() { + Serial.begin(115200); + +} + +void loop() { + convertTimestamp(millis()); + Serial.println(tstamp); + delay(200); +} +