![]() |
Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
|
: Main program body for the flight computer. Initializes hardware, RTOS, and starts all application tasks. More...
#include "main.h"#include "cmsis_os.h"#include "kalmanFilter.h"#include "mekf.h"#include "OptimalAngle.h"#include "z_qflash_W25QXXX.h"#include "attitude_estimation.h"#include "buzzer.h"#include "profiler.h"
Go to the source code of this file.
Data Structures | |
| struct | Linear_IMU_Package |
| Represents a 3-axis linear acceleration data packet. More... | |
| struct | Data_Package_no_Linear_IMU |
| A comprehensive sensor data packet, excluding linear acceleration. More... | |
| struct | Data_Package_For_Marconi |
| Data packet formatted for transmission to the Marconi ground station. More... | |
Macros | |
| #define | SENSOR_FLAG (1U << 0) |
| #define | MPC_FLAG (1U << 1) |
| #define | RECEIVED_VEL_FLAG (1U << 2) |
| #define | KALMAN_FLAG (1U << 3) |
| #define | FSM_FLAG (1U << 4) |
| #define | UART_RX_ERROR_FLAG (1U << 5) |
Functions | |
| static double P[] | __attribute__ ((aligned(4))) |
| void | SystemClock_Config (void) |
| System Clock Configuration. | |
| void | PeriphCommonClock_Config (void) |
| Peripherals Common Clock Configuration. | |
| static void | MPU_Config (void) |
| static void | MX_GPIO_Init (void) |
| GPIO Initialization Function. | |
| static void | MX_DMA_Init (void) |
| static void | MX_MDMA_Init (void) |
| static void | MX_USART1_UART_Init (void) |
| USART1 Initialization Function. | |
| static void | MX_USB_OTG_FS_PCD_Init (void) |
| USB_OTG_FS Initialization Function. | |
| static void | MX_FDCAN1_Init (void) |
| FDCAN1 Initialization Function. | |
| static void | MX_QUADSPI_Init (void) |
| QUADSPI Initialization Function. | |
| static void | MX_SPI1_Init (void) |
| SPI1 Initialization Function. | |
| static void | MX_SPI2_Init (void) |
| SPI2 Initialization Function. | |
| static void | MX_SPI3_Init (void) |
| SPI3 Initialization Function. | |
| static void | MX_TIM2_Init (void) |
| TIM2 Initialization Function. | |
| static void | MX_TIM15_Init (void) |
| TIM15 Initialization Function. | |
| static void | MX_UART4_Init (void) |
| UART4 Initialization Function. | |
| static void | MX_ADC1_Init (void) |
| ADC1 Initialization Function. | |
| static void | MX_ADC2_Init (void) |
| ADC2 Initialization Function. | |
| static void | MX_ADC3_Init (void) |
| ADC3 Initialization Function. | |
| static void | MX_TIM7_Init (void) |
| TIM7 Initialization Function. | |
| static void | MX_TIM6_Init (void) |
| TIM6 Initialization Function. | |
| static void | MX_TIM13_Init (void) |
| TIM13 Initialization Function. | |
| void | StartSensor_Task (void *argument) |
| Function implementing the Sensor_Task thread. | |
| void | StartFSM (void *argument) |
| Function implementing the FSM thread. | |
| void | StartKalman_mkf (void *argument) |
| Function implementing the Kalman_mkf thread. | |
| void | StartMPC_Task (void *argument) |
| Function implementing the MPC_Task thread. | |
| void | StartReceiveVel_Task (void *argument) |
| Function implementing the ReceiveVel_Task thread. | |
| void | HAL_UART_RxCpltCallback (UART_HandleTypeDef *huart) |
| void | HAL_UART_ErrorCallback (UART_HandleTypeDef *huart) |
| int | main (void) |
| The application entry point. | |
| void | HAL_TIM_PeriodElapsedCallback (TIM_HandleTypeDef *htim) |
| Period elapsed callback in non blocking mode. | |
| void | Error_Handler (void) |
| This function is executed in case of error occurrence. | |
Variables | |
| ADC_HandleTypeDef | hadc1 |
| ADC_HandleTypeDef | hadc2 |
| ADC_HandleTypeDef | hadc3 |
| FDCAN_HandleTypeDef | hfdcan1 |
| QSPI_HandleTypeDef | hqspi |
| HAL QSPI handle for the external flash memory. | |
| MDMA_HandleTypeDef | hmdma_quadspi_fifo_th |
| SPI_HandleTypeDef | hspi1 |
| SPI_HandleTypeDef | hspi2 |
| HAL SPI handle for Sensor Bus 1 (e.g., IMU, Baro). | |
| SPI_HandleTypeDef | hspi3 |
| HAL SPI handle for Sensor Bus 2 (e.g., secondary sensors). | |
| TIM_HandleTypeDef | htim2 |
| TIM_HandleTypeDef | htim6 |
| TIM_HandleTypeDef | htim7 |
| TIM_HandleTypeDef | htim13 |
| TIM_HandleTypeDef | htim15 |
| HAL Timer handle for the buzzer PWM. | |
| UART_HandleTypeDef | huart4 |
| UART_HandleTypeDef | huart1 |
| DMA_HandleTypeDef | hdma_usart1_rx |
| DMA_HandleTypeDef | hdma_usart1_tx |
| PCD_HandleTypeDef | hpcd_USB_OTG_FS |
| osThreadId_t | Sensor_TaskHandle |
| const osThreadAttr_t | Sensor_Task_attributes |
| osThreadId_t | FSMHandle |
| const osThreadAttr_t | FSM_attributes |
| osThreadId_t | Kalman_mkfHandle |
| const osThreadAttr_t | Kalman_mkf_attributes |
| osThreadId_t | MPC_TaskHandle |
| const osThreadAttr_t | MPC_Task_attributes |
| osThreadId_t | ReceiveVel_TaskHandle |
| const osThreadAttr_t | ReceiveVel_Task_attributes |
| flight_phase_t | flight_phase = CALIBRATING |
| flight_fsm_t | flight_state |
| buzzer_t * | bz ={0} |
| struct bmp3_dev | bmp390_1 = {0} |
| struct bmp3_dev | bmp390_2 = {0} |
| stmdev_ctx_t | imu_1 = {0} |
| stmdev_ctx_t | imu_2 = {0} |
| struct bmp3_data | barometer_data_1 = {-1, -1} |
| struct bmp3_data | barometer_data_2 = {-1, -1} |
| static int16_t | data_raw_angular_rate_1 [3] = {0} |
| static int16_t | data_raw_acceleration_1 [3] = {0} |
| static float_t | acceleration_mg_1 [3] = {0} |
| static float_t | angular_rate_mdps_1 [3] = {0} |
| stmdev_ctx_t | lis2mdl_dev_ctx |
| stmdev_ctx_t | lis2mdl_dev_ctx_2 |
| int16_t | raw_mag_data [3] |
| float_t | altitude = 0.0 |
| float_t | velocity = 0.0 |
| float_t | Pressure_1 = 0.0 |
| float_t | Temperature_1 = 0.0 |
| Data_Package_For_Marconi | message = {0} |
| uint8_t | drogue = 0 |
| Status flag for the drogue parachute pyro channel. | |
| uint8_t | mainp = 0 |
| Status flag for the main parachute pyro channel. | |
| float | max_alt = 0 |
| float | max_vel =0 |
| bool | first_measure = true |
| double | q [] = {0.7061377159181262, -0.03700710955926802, 0.03700710955926802, -0.7061377159181262} |
| double | beta [] = {0, 0, 0} |
| double | omega [] = {3.760494829166693e-05, -1.4118446451604494e-07, 0.0003572545679652845} |
| double | b_B [] = {0,0,0} |
| double | q_new [] = {0,0,0,0} |
| double | beta_new [] = {0,0,0} |
| double | P_2 [] = {5,0,0,5} |
| double | z [] = {5003.24140978,329.14706741} |
| double | alpha = 0.0 |
| double | a_m = -12.09 |
| double | Ts = 0.01 |
| const double | Q [] = {2769,1846,1846,1385} |
| const double | R [] = {5.54e-3,0,0,0.121} |
| double | x_est [] = {5000,330} |
| double | time_step = 0.5 |
| double | sim_time_step = 0.5 |
| double | current_delta = 0 |
| double | target_apogee = 8900 |
| double | tolerance = 1 |
| double | tilt_angle = 0.24556997475102937 |
| const double | mach_states [] = {0.1,0.2,0.3,0.4,0.5} |
| const double | deployment_states [] ={0.0,40.5000,69.7500,94.5000,108.0000,173.8000} |
| static double | cd_table [] ={0.4510,0.3940,0.3610,0.3390,0.3320,0.5430,0.4960,0.4690,0.4250,0.4170,0.6240,0.5790,0.5550,0.5350,0.5280, 0.7450,0.7140,0.6780,0.6760,0.6720,0.7520,0.7230,0.6980,0.6850,0.6820,0.85,0.81,0.8,0.8,0.8} |
| double | z_component = 0.0 |
| TaskHandle_t | xReceived_VelHandle = NULL |
| TaskHandle_t | xMPCTaskHandle = NULL |
| TaskHandle_t | xSensorsTaskHandle = NULL |
| TaskHandle_t | xKalman_TaskHandle = NULL |
| osThreadId_t | xReceived_VelID =NULL |
| osThreadId_t | xMPCTaskID = NULL |
| osThreadId_t | xSensorsTaskID = NULL |
| osThreadId_t | xKalman_TaskID = NULL |
| uint8_t | vel [4] |
| float | gps_vel = 0.0f |
| uint8_t | array [63] |
| bool | gnss_flag = false |
| bool | flag_kf = false |
| RTOS event flag to trigger the Kalman Filter task. | |
| bool | flag_attitude = false |
| RTOS event flag to trigger the attitude estimation task. | |
| bool | flag_MPC = false |
| RTOS event flag to trigger the MPC task. | |
| bool | flag_flash = false |
| RTOS event flag to trigger the data logging task. | |
| uint32_t | flash_address = 4 |
| uint8_t | data_buffer [4224] ={0} |
| uint8_t | cpy_buffer [2112] = {0} |
| uint32_t | num_of_lin_acc_saved = 0 |
| uint32_t | num_of_saved_rest_packages = 0 |
| uint32_t | num_of_saved_rest_packages_locked = 0 |
| uint32_t | num_of_lin_acc_saved_flash = 0 |
| uint32_t | num_of_saved_rest_packages_flash = 0 |
| float | initial_flag_value = 0.0f |
| float | Vin =0 |
| float | Vr =0 |
| uint32_t | adcVal = 0 |
| note_t | Partition [] |
: Main program body for the flight computer. Initializes hardware, RTOS, and starts all application tasks.
Copyright (c) 2025 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file main.c.
|
static |
| void Error_Handler | ( | void | ) |
This function is executed in case of error occurrence.
| None |
Definition at line 2042 of file main.c.
Referenced by buzzer_init(), HAL_FDCAN_MspInit(), HAL_PCD_MspInit(), HAL_QSPI_MspInit(), HAL_SPI_MspInit(), HAL_UART_MspInit(), main(), MX_ADC1_Init(), MX_ADC2_Init(), MX_ADC3_Init(), MX_FDCAN1_Init(), MX_QUADSPI_Init(), MX_SPI1_Init(), MX_SPI2_Init(), MX_SPI3_Init(), MX_TIM13_Init(), MX_TIM15_Init(), MX_TIM2_Init(), MX_TIM6_Init(), MX_TIM7_Init(), MX_UART4_Init(), MX_USART1_UART_Init(), MX_USB_OTG_FS_PCD_Init(), PeriphCommonClock_Config(), StartReceiveVel_Task(), and SystemClock_Config().

| void HAL_TIM_PeriodElapsedCallback | ( | TIM_HandleTypeDef * | htim | ) |
Period elapsed callback in non blocking mode.
| htim | : TIM handle |
| None |
Definition at line 2006 of file main.c.
References FSM_FLAG, FSMHandle, huart1, MPC_FLAG, MPC_TaskHandle, SENSOR_FLAG, and Sensor_TaskHandle.
| void HAL_UART_ErrorCallback | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 379 of file main.c.
References NULL, ReceiveVel_TaskHandle, and UART_RX_ERROR_FLAG.
| void HAL_UART_RxCpltCallback | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 370 of file main.c.
References RECEIVED_VEL_FLAG, and ReceiveVel_TaskHandle.
| int main | ( | void | ) |
The application entry point.
| int |
Definition at line 399 of file main.c.
References bmp390_1, bmp390_2, buzzer_init(), bz, calibrateIMU(), Error_Handler(), flight_phase, flight_fsm_t::flight_state, flight_state, FSM_attributes, FSMHandle, HAL_OK, htim15, HWOFFSET, imu_1, imu_2, init_bmp390_B(), init_bmp390_p(), init_imuB(), init_imup(), initDWT(), initial_flag_value, Kalman_mkf_attributes, Kalman_mkfHandle, LSM6DSO32_16g, LSM6DSO32_2000dps, LSM6DSO32_GY_ODR_208Hz_HIGH_PERF, LSM6DSO32_XL_ODR_6667Hz_HIGH_PERF, MPC_Task_attributes, MPC_TaskHandle, MPU_Config(), musica_maestro(), MX_ADC1_Init(), MX_ADC2_Init(), MX_ADC3_Init(), MX_DMA_Init(), MX_FDCAN1_Init(), MX_GPIO_Init(), MX_MDMA_Init(), MX_QUADSPI_Init(), MX_SPI1_Init(), MX_SPI2_Init(), MX_SPI3_Init(), MX_TIM13_Init(), MX_TIM15_Init(), MX_TIM2_Init(), MX_TIM6_Init(), MX_TIM7_Init(), MX_UART4_Init(), MX_USART1_UART_Init(), MX_USB_OTG_FS_PCD_Init(), NOTE_B5, NULL, Partition, PeriphCommonClock_Config(), QFlash_ChipErase(), QFlash_Init(), QFlash_Read(), ReceiveVel_Task_attributes, ReceiveVel_TaskHandle, Sensor_Task_attributes, Sensor_TaskHandle, StartFSM(), StartKalman_mkf(), StartMPC_Task(), StartReceiveVel_Task(), StartSensor_Task(), and SystemClock_Config().

|
static |
Initializes and configures the Region and the memory to be protected
Definition at line 1971 of file main.c.
Referenced by main().

|
static |
ADC1 Initialization Function.
| None |
| None |
Common config
Configure the ADC multi-mode
Configure Regular Channel
Definition at line 696 of file main.c.
References Error_Handler(), hadc1, and HAL_OK.
Referenced by main().


|
static |
ADC2 Initialization Function.
| None |
| None |
Common config
Configure Regular Channel
Definition at line 765 of file main.c.
References Error_Handler(), hadc2, and HAL_OK.
Referenced by main().


|
static |
ADC3 Initialization Function.
| None |
| None |
Common config
Configure Regular Channel
Definition at line 825 of file main.c.
References Error_Handler(), hadc3, and HAL_OK.
Referenced by main().


|
static |
Enable DMA controller clock
Definition at line 1469 of file main.c.
Referenced by main().

|
static |
FDCAN1 Initialization Function.
| None |
| None |
Definition at line 885 of file main.c.
References Error_Handler(), HAL_OK, and hfdcan1.
Referenced by main().


|
static |
GPIO Initialization Function.
| None |
| None |
Definition at line 1507 of file main.c.
Referenced by main().

|
static |
Enable MDMA controller clock
Definition at line 1488 of file main.c.
Referenced by main().

|
static |
QUADSPI Initialization Function.
| None |
| None |
Definition at line 938 of file main.c.
References Error_Handler(), HAL_OK, and hqspi.
Referenced by main().


|
static |
SPI1 Initialization Function.
| None |
| None |
Definition at line 973 of file main.c.
References Error_Handler(), HAL_OK, and hspi1.
Referenced by main().


|
static |
SPI2 Initialization Function.
| None |
| None |
Definition at line 1021 of file main.c.
References Error_Handler(), HAL_OK, and hspi2.
Referenced by main().


|
static |
SPI3 Initialization Function.
| None |
| None |
Definition at line 1069 of file main.c.
References Error_Handler(), HAL_OK, and hspi3.
Referenced by main().


|
static |
TIM13 Initialization Function.
| None |
| None |
Definition at line 1242 of file main.c.
References Error_Handler(), HAL_OK, and htim13.
Referenced by main().


|
static |
TIM15 Initialization Function.
| None |
| None |
Definition at line 1273 of file main.c.
References Error_Handler(), HAL_OK, HAL_TIM_MspPostInit(), and htim15.
Referenced by main().


|
static |
TIM2 Initialization Function.
| None |
| None |
Definition at line 1117 of file main.c.
References Error_Handler(), HAL_OK, HAL_TIM_MspPostInit(), and htim2.
Referenced by main().


|
static |
TIM6 Initialization Function.
| None |
| None |
Definition at line 1166 of file main.c.
References Error_Handler(), HAL_OK, and htim6.
Referenced by main().


|
static |
TIM7 Initialization Function.
| None |
| None |
Definition at line 1204 of file main.c.
References Error_Handler(), HAL_OK, and htim7.
Referenced by main().


|
static |
UART4 Initialization Function.
| None |
| None |
Definition at line 1339 of file main.c.
References Error_Handler(), HAL_OK, and huart4.
Referenced by main().


|
static |
USART1 Initialization Function.
| None |
| None |
Definition at line 1387 of file main.c.
References Error_Handler(), HAL_OK, and huart1.
Referenced by main().


|
static |
USB_OTG_FS Initialization Function.
| None |
| None |
Definition at line 1435 of file main.c.
References Error_Handler(), HAL_OK, and hpcd_USB_OTG_FS.
Referenced by main().


| void PeriphCommonClock_Config | ( | void | ) |
Peripherals Common Clock Configuration.
| None |
Initializes the peripherals clock
Definition at line 669 of file main.c.
References Error_Handler(), and HAL_OK.
Referenced by main().


| void StartReceiveVel_Task | ( | void * | argument | ) |
Function implementing the ReceiveVel_Task thread.
| argument | Not used |
| None |
Definition at line 1943 of file main.c.
References Error_Handler(), gnss_flag, gps_vel, HAL_OK, huart1, RECEIVED_VEL_FLAG, and vel.
Referenced by main().


| void SystemClock_Config | ( | void | ) |
System Clock Configuration.
| None |
Supply configuration update enable
Configure the main internal regulator output voltage
Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef structure.
Initializes the CPU, AHB and APB buses clocks
Definition at line 611 of file main.c.
References Error_Handler(), and HAL_OK.
Referenced by main().


| double a_m = -12.09 |
Definition at line 250 of file main.c.
Referenced by kalmanFilter(), StartKalman_mkf(), and StartSensor_Task().
|
static |
Definition at line 132 of file main.c.
Referenced by StartFSM(), StartMPC_Task(), and StartSensor_Task().
| uint32_t adcVal = 0 |
Definition at line 323 of file main.c.
Referenced by StartMPC_Task().
| double alpha = 0.0 |
Definition at line 249 of file main.c.
Referenced by attitude_estimation(), kalmanFilter(), StartKalman_mkf(), and StartMPC_Task().
| float_t altitude = 0.0 |
Definition at line 224 of file main.c.
Referenced by optimalAngle(), readAltitude(), StartFSM(), StartKalman_mkf(), StartMPC_Task(), and StartSensor_Task().
|
static |
Definition at line 133 of file main.c.
Referenced by StartMPC_Task(), and StartSensor_Task().
| uint8_t array[63] |
Definition at line 296 of file main.c.
Referenced by StartMPC_Task().
| struct bmp3_data barometer_data_1 = {-1, -1} |
Definition at line 126 of file main.c.
Referenced by StartMPC_Task(), and StartSensor_Task().
| struct bmp3_dev bmp390_1 = {0} |
Definition at line 122 of file main.c.
Referenced by main(), and StartSensor_Task().
| buzzer_t* bz ={0} |
Definition at line 121 of file main.c.
Referenced by buzzer_init(), main(), and musica_maestro().
|
static |
Definition at line 263 of file main.c.
Referenced by cdEvaluation(), optimalAngle(), and StartMPC_Task().
| uint8_t cpy_buffer[2112] = {0} |
Definition at line 310 of file main.c.
Referenced by StartKalman_mkf().
| double current_delta = 0 |
Definition at line 257 of file main.c.
Referenced by optimalAngle().
| uint8_t data_buffer[4224] ={0} |
Definition at line 309 of file main.c.
Referenced by StartKalman_mkf(), and StartSensor_Task().
|
static |
Definition at line 130 of file main.c.
Referenced by StartSensor_Task().
|
static |
Definition at line 129 of file main.c.
Referenced by StartSensor_Task().
| const double deployment_states[] ={0.0,40.5000,69.7500,94.5000,108.0000,173.8000} |
Definition at line 262 of file main.c.
Referenced by optimalAngle(), and StartMPC_Task().
| bool first_measure = true |
Definition at line 233 of file main.c.
Referenced by StartSensor_Task().
| uint32_t flash_address = 4 |
Definition at line 308 of file main.c.
Referenced by StartKalman_mkf().
| flight_phase_t flight_phase = CALIBRATING |
| flight_fsm_t flight_state |
Definition at line 117 of file main.c.
Referenced by main(), StartFSM(), StartMPC_Task(), and StartSensor_Task().
| const osThreadAttr_t FSM_attributes |
| osThreadId_t FSMHandle |
Definition at line 86 of file main.c.
Referenced by HAL_TIM_PeriodElapsedCallback(), and main().
| bool gnss_flag = false |
Definition at line 300 of file main.c.
Referenced by StartKalman_mkf(), and StartReceiveVel_Task().
| float gps_vel = 0.0f |
Definition at line 293 of file main.c.
Referenced by StartKalman_mkf(), StartReceiveVel_Task(), and StartSensor_Task().
| ADC_HandleTypeDef hadc1 |
Definition at line 52 of file main.c.
Referenced by MX_ADC1_Init().
| ADC_HandleTypeDef hadc2 |
Definition at line 53 of file main.c.
Referenced by MX_ADC2_Init().
| ADC_HandleTypeDef hadc3 |
Definition at line 54 of file main.c.
Referenced by MX_ADC3_Init(), and StartMPC_Task().
| DMA_HandleTypeDef hdma_usart1_rx |
Definition at line 73 of file main.c.
Referenced by DMA1_Stream0_IRQHandler(), and HAL_UART_MspInit().
| DMA_HandleTypeDef hdma_usart1_tx |
Definition at line 74 of file main.c.
Referenced by DMA1_Stream1_IRQHandler(), and HAL_UART_MspInit().
| FDCAN_HandleTypeDef hfdcan1 |
Definition at line 56 of file main.c.
Referenced by MX_FDCAN1_Init().
| MDMA_HandleTypeDef hmdma_quadspi_fifo_th |
Definition at line 59 of file main.c.
Referenced by HAL_QSPI_MspInit(), and MDMA_IRQHandler().
| PCD_HandleTypeDef hpcd_USB_OTG_FS |
Definition at line 76 of file main.c.
Referenced by MX_USB_OTG_FS_PCD_Init().
| SPI_HandleTypeDef hspi1 |
Definition at line 61 of file main.c.
Referenced by MX_SPI1_Init().
| TIM_HandleTypeDef htim13 |
Definition at line 68 of file main.c.
Referenced by MX_TIM13_Init(), StartFSM(), and TIM8_UP_TIM13_IRQHandler().
| TIM_HandleTypeDef htim2 |
Definition at line 65 of file main.c.
Referenced by MX_TIM2_Init().
| TIM_HandleTypeDef htim6 |
Definition at line 66 of file main.c.
Referenced by MX_TIM6_Init(), StartSensor_Task(), and TIM6_DAC_IRQHandler().
| TIM_HandleTypeDef htim7 |
Definition at line 67 of file main.c.
Referenced by MX_TIM7_Init(), StartMPC_Task(), and TIM7_IRQHandler().
| UART_HandleTypeDef huart1 |
Definition at line 72 of file main.c.
Referenced by HAL_TIM_PeriodElapsedCallback(), MX_USART1_UART_Init(), StartMPC_Task(), StartReceiveVel_Task(), and USART1_IRQHandler().
| UART_HandleTypeDef huart4 |
Definition at line 71 of file main.c.
Referenced by MX_UART4_Init().
| stmdev_ctx_t imu_1 = {0} |
Definition at line 124 of file main.c.
Referenced by main(), and StartSensor_Task().
| stmdev_ctx_t imu_2 = {0} |
| const osThreadAttr_t Kalman_mkf_attributes |
| osThreadId_t Kalman_mkfHandle |
Definition at line 93 of file main.c.
Referenced by main(), and StartSensor_Task().
| stmdev_ctx_t lis2mdl_dev_ctx |
| stmdev_ctx_t lis2mdl_dev_ctx_2 |
| const double mach_states[] = {0.1,0.2,0.3,0.4,0.5} |
Definition at line 261 of file main.c.
Referenced by cdEvaluation(), optimalAngle(), and StartMPC_Task().
| float max_alt = 0 |
Definition at line 231 of file main.c.
Referenced by StartMPC_Task().
| float max_vel =0 |
Definition at line 232 of file main.c.
Referenced by StartMPC_Task().
| Data_Package_For_Marconi message = {0} |
Definition at line 228 of file main.c.
Referenced by StartMPC_Task().
| const osThreadAttr_t MPC_Task_attributes |
| osThreadId_t MPC_TaskHandle |
Definition at line 100 of file main.c.
Referenced by HAL_TIM_PeriodElapsedCallback(), and main().
| uint32_t num_of_lin_acc_saved = 0 |
Definition at line 311 of file main.c.
Referenced by StartSensor_Task().
| uint32_t num_of_lin_acc_saved_flash = 0 |
Definition at line 314 of file main.c.
Referenced by StartKalman_mkf().
| uint32_t num_of_saved_rest_packages = 0 |
Definition at line 312 of file main.c.
Referenced by StartSensor_Task().
| uint32_t num_of_saved_rest_packages_flash = 0 |
Definition at line 315 of file main.c.
Referenced by StartKalman_mkf().
| uint32_t num_of_saved_rest_packages_locked = 0 |
Definition at line 313 of file main.c.
Referenced by StartKalman_mkf(), and StartSensor_Task().
| double omega[] = {3.760494829166693e-05, -1.4118446451604494e-07, 0.0003572545679652845} |
Definition at line 240 of file main.c.
Referenced by mekf(), StartKalman_mkf(), and StartSensor_Task().
| double P_2[] = {5,0,0,5} |
Definition at line 247 of file main.c.
Referenced by StartKalman_mkf().
| note_t Partition[] |
Definition at line 365 of file main.c.
Referenced by main().
| float_t Pressure_1 = 0.0 |
Definition at line 226 of file main.c.
Referenced by StartSensor_Task().
| double q[] = {0.7061377159181262, -0.03700710955926802, 0.03700710955926802, -0.7061377159181262} |
Definition at line 237 of file main.c.
Referenced by mekf(), and StartKalman_mkf().
| const double Q[] = {2769,1846,1846,1385} |
Definition at line 252 of file main.c.
Referenced by kalmanFilter(), mekf(), and StartKalman_mkf().
| double q_new[] = {0,0,0,0} |
Definition at line 243 of file main.c.
Referenced by mekf(), and StartKalman_mkf().
| const double R[] = {5.54e-3,0,0,0.121} |
Definition at line 253 of file main.c.
Referenced by kalmanFilter(), mekf(), and StartKalman_mkf().
| const osThreadAttr_t ReceiveVel_Task_attributes |
| osThreadId_t ReceiveVel_TaskHandle |
Definition at line 107 of file main.c.
Referenced by HAL_UART_ErrorCallback(), HAL_UART_RxCpltCallback(), and main().
| const osThreadAttr_t Sensor_Task_attributes |
| osThreadId_t Sensor_TaskHandle |
Definition at line 79 of file main.c.
Referenced by HAL_TIM_PeriodElapsedCallback(), and main().
| double sim_time_step = 0.5 |
Definition at line 256 of file main.c.
Referenced by optimalAngle(), and StartMPC_Task().
| double target_apogee = 8900 |
Definition at line 258 of file main.c.
Referenced by optimalAngle(), and StartMPC_Task().
| float_t Temperature_1 = 0.0 |
Definition at line 227 of file main.c.
Referenced by StartSensor_Task().
| double tilt_angle = 0.24556997475102937 |
Definition at line 260 of file main.c.
Referenced by optimalAngle().
| double tolerance = 1 |
Definition at line 259 of file main.c.
Referenced by optimalAngle(), and StartMPC_Task().
| double Ts = 0.01 |
Definition at line 251 of file main.c.
Referenced by kalmanFilter(), and StartKalman_mkf().
| uint8_t vel[4] |
Definition at line 292 of file main.c.
Referenced by StartReceiveVel_Task().
| float_t velocity = 0.0 |
Definition at line 225 of file main.c.
Referenced by optimalAngle(), StartFSM(), StartKalman_mkf(), StartMPC_Task(), and StartSensor_Task().
| float Vin =0 |
Definition at line 321 of file main.c.
Referenced by StartMPC_Task().
| float Vr =0 |
Definition at line 322 of file main.c.
Referenced by StartMPC_Task().
| double x_est[] = {5000,330} |
Definition at line 254 of file main.c.
Referenced by kalmanFilter(), StartKalman_mkf(), and StartMPC_Task().
| double z[] = {5003.24140978,329.14706741} |
Definition at line 248 of file main.c.
Referenced by kalmanFilter(), StartKalman_mkf(), and StartSensor_Task().