IZAR Flight Controller 1.0.0
IZAR Flight Controller running with an ESP32.
utils.h
Go to the documentation of this file.
1#ifndef UTILS_H
2#define UTILS_H
3
4#include "mpu6050.h"
6
7#include <esp_err.h>
8#include <esp_log.h>
9#include <unistd.h>
10
22float calculate_vertical_speed(float current_altitude, float last_altitude,
23 int64_t current_ms, int64_t last_ms);
24
41esp_err_t format_log_line(char *line_buf, size_t buff_size, int64_t ms,
42 ROCKET_STATUS_T rocket_status, int32_t pressure,
43 float altitude, float vertical_speed,
44 float temperature, mpu6050_acceleration_t acc,
46
47#endif // UTILS_H
ROCKET_STATUS_T rocket_status
Definition sensors_reading.c:23
ROCKET_STATUS_T
Rocket flight status states.
Definition sensors_reading.h:36
Definition mpu6050.h:84
Definition mpu6050.h:94
float calculate_vertical_speed(float current_altitude, float last_altitude, int64_t current_ms, int64_t last_ms)
Calculate the vertical speed of the rocket in meters per second (m/s).
Definition utils.c:9
esp_err_t format_log_line(char *line_buf, size_t buff_size, int64_t ms, ROCKET_STATUS_T rocket_status, int32_t pressure, float altitude, float vertical_speed, float temperature, mpu6050_acceleration_t acc, mpu6050_rotation_t rot)
Format the line that will be printed into the SD card file. This file contains all the flight recorde...
Definition utils.c:15