-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainpage.txt
156 lines (130 loc) · 6.9 KB
/
mainpage.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*! @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 WIFI network configuration
* The software is written such that it allows the launch crew to connect to any WIFI they are using, without
hardcoding the WIFI credentials into the flight software.
Follow the procedure below to connect to the WIFI:
1. When powered on, the flight computer will create an open WIFI network called "flight-computer". This network will
be visible on any device within range.
2. On the ground station computer, connect to "flight-computer".
3. Open the browser and go to the following IP address "192.168.4.1". This should open the following window in
your browser.
[image here]
4. Enter the WIFI SSID and password for the network you want to connect to. In this case it is the WIFI network used for telemetry
transmission.
5. Press save. The flight computer will save the network credentials and auto-reconnect itself to the launch WIFI network. You can now
stream telemetry over the network.
* @section step17 MQTT configuration
* @section step18 Flight Data Collection and Kalman Filtering
The main senors used in the flight computer are accelerometer and pressure sensors. We use the MPU6050 for acceleration and angular velocity measurements. We use the BMP180 for atmospheric pressure and altitude measurement. This data is collected as raw data which is then processed and filtered using the Kalman filter algorithm.
The ***Kalman Filter*** allows us to perform predictive recursive low pass filtering which greatly improves our collected sensor data which is safe for the state machine to consume.
To learn more about the Kalman filter implementation, refer to the kalman.h and kalman.cpp files in the src folder of the n4-flight-software.
* @section step20 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!!
*/