diff --git a/README.md b/README.md index a9a9cb2c71f83a99ba02873ef4561df8d96fa2dc..723127f7a9acda9747ccd14f864ee23911de83d6 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # GNC Recruitment Assignment -In this assignment, the goal is to create algorithm able to detect the apogee of the rocket during a generic flight and command the opening of the parachute. +In this assignment, the goal is to create an algorithm able to detect the apogee of the rocket during a generic flight and command the opening of the parachute. -The file `main.m` load the logs of a previous flight and then simulates the flight of the rocket. The first part of the script logs the logs of the sensors of a previous flight which will be then used for the simulation. +The file `main.m` loads the logs of a previous flight and then simulates said flight: +The first part of the script loads the logs of the sensors of a previous flight which will be then used for the simulation. -The second part replicates how the on-board software interacts with the sensors, at each iteration the script gets new sensor measurements and pass them to the function `apogee_detector.m`, which detects the apogee and, on the real rocket, commands the expulsion of the parachute. The available sensor measurements are a barometer, a 6-axis IMU (accelerometer and gyroscope) and a GPS. +The second part replicates how the on-board software interacts with the sensors: at each iteration the script gets new sensor measurements and passes them to the function `apogee_detector.m`, which has the job to detect when the apogee is reached and, on the real rocket, command the expulsion of the parachute. +The available sensor measurements come from a barometer, a 6-axis IMU (accelerometer and gyroscope) and a GPS. The flight phases contained in the log are: @@ -12,7 +14,7 @@ The flight phases contained in the log are: * ascent phase * descent phase -The third part is used just to plot the result and display the apogee detection. +The third part of the script is used just to plot the result and display the apogee detection. **Your task is to develop the function `apogee_detector.m` :** @@ -28,18 +30,18 @@ which uses the data measured in real time during the flight as input and outputs * 0 otherwise -## How organize the work +## How to organize the work To organize the work, it's suggested to divide it in 2 tasks: -1. **Define the condition that detects the apogee**: of course the apogee can be defined as the point of the trajectory where the vertical velocity is 0, but this definition is not applicable. Sensors have noise that disturbs the measurements, even at apogee the vertical velocity estimated is never equal to 0. - Instead of detecting the exact instant of the apogee, it suggested to **define a robust condition** that, if true, allows to deduce with confidence that that the rocket is **reasonably near the apogee**. **Finding the condition/conditions is part of the assignment**. +1. **Define the condition that detects the apogee**: the apogee is defined as the highest point of the trajectory, but this definition is not applicable during the flight. +Sensors have noise, so, instead of detecting the exact instant of the apogee, it suggested to **define a robust condition** that, if true, allows to deduce with confidence that that the rocket is **reasonably near the apogee**. **Finding the condition/conditions is part of the assignment**. *(For example, the function detects the apogee when the altitude is greater than 2700m. This condition define a zone that, in the logged flight, is near the apogee... but what happens if the rocket never reaches 2700m ? Or if at that altitude it is still moving with high vertical speed? This condition might work for this flight, but is not reliable in a general case and it is considered a bad choice. )* 2. **Implement an algorithm that detects the apogee**: starting from the condition found in the previous point, implement an algorithm in `apogee_detector.m` that detects the apogee. ## Algorithm requirements -This algorithm is safe critical, because the detection of the apogee commands the opening of the parachute. The algorithm that you will develop should be **resilient and work even in off nominal conditions** where: +This algorithm is safe critical, because the detection of the apogee commands the expulsion of the parachute. The algorithm that you will develop should be **resilient and work even in off nominal conditions** where: * **the apogee altitude might change** from the one contained in the logs, depending on the flight conditions. The motor might under-perform or over-perform with respect to the nominal condition, so it not possible to define *a priori* the exact altitude of the apogee. In addition, the target apogee height could also change from flight to flight. * **the trajectory of the rocket may change** from the one contained in the logs. Wind or other external phenomenons will *slightly* change the trajectory. Also, launches with different target apogee altitudes (a.e 3 Km vs 9 Km) will have different trajectories. @@ -59,7 +61,7 @@ To take into account these factors, the function that you will submit will be te | :------: | | Pa | -**IMU_measurement:** the reference axis are the body-axis of the rocket. +**IMU_measurement:** the reference axis are the body-axis of the rocket (shown in the picture below). | acceleration_X | acceleration_Y | acceleration_Z | angular_speed_X | angular_speed_Y | angular_speed_Z | | :------------: | :------------: | :------------: | :-------------: | :-------------: | :-------------: | @@ -70,3 +72,5 @@ To take into account these factors, the function that you will submit will be te | latitude | longitude | altitude (from sea level) | | :-------------: | --------------- | :-----------------------: | | decimal degrees | decimal degrees | meters | + + \ No newline at end of file diff --git a/Rocket_Axis.pdf b/Rocket_Axis.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c854b7dd814ac8b8b8274e32480c62600d64fbed Binary files /dev/null and b/Rocket_Axis.pdf differ