Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
File logger for Linux based autopilots. More...
#include "file_logger.h"
#include <stdio.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#include "std.h"
#include "mcu_periph/sys_time.h"
#include "state.h"
#include "generated/airframe.h"
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include "firmwares/fixedwing/stabilization/stabilization_adaptive.h"
Go to the source code of this file.
Macros | |
#define | FILE_LOGGER_PATH /data/video/usb |
Set the default File logger path to the USB drive. More... | |
Functions | |
static void | file_logger_write_header (FILE *file) |
Logging functions. More... | |
static void | file_logger_write_row (FILE *file) |
Write CSV row Write values at this timestamp to log file. More... | |
void | file_logger_start (void) |
Start the file logger and open a new file. More... | |
void | file_logger_stop (void) |
Stop the logger an nicely close the file. More... | |
void | file_logger_periodic (void) |
Log the values to a csv file More... | |
Variables | |
static FILE * | file_logger = NULL |
The file pointer. More... | |
File logger for Linux based autopilots.
Definition in file file_logger.c.
#define FILE_LOGGER_PATH /data/video/usb |
Set the default File logger path to the USB drive.
Definition at line 49 of file file_logger.c.
void file_logger_periodic | ( | void | ) |
Log the values to a csv file
Definition at line 157 of file file_logger.c.
References file_logger, and file_logger_write_row().
void file_logger_start | ( | void | ) |
Start the file logger and open a new file.
Definition at line 105 of file file_logger.c.
References counter, file_logger, FILE_LOGGER_PATH, and file_logger_write_header().
void file_logger_stop | ( | void | ) |
Stop the logger an nicely close the file.
Definition at line 148 of file file_logger.c.
References file_logger.
|
static |
Logging functions.
Write CSV header Write column names at the top of the CSV file. Make sure that the columns match those in file_logger_write_row! Don't forget the
at the end of the line.
file | Log file pointer |
Definition at line 64 of file file_logger.c.
Referenced by file_logger_start().
|
static |
Write CSV row Write values at this timestamp to log file.
Make sure that the printf's match the column headers of file_logger_write_header! Don't forget the
at the end of the line.
file | Log file pointer |
Definition at line 83 of file file_logger.c.
References get_sys_time_float(), h_ctl_aileron_setpoint, h_ctl_elevator_setpoint, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, FloatRates::r, stabilization_cmd, stateGetBodyRates_f(), stateGetNedToBodyEulers_f(), stateGetPositionNed_f(), stateGetSpeedNed_f(), FloatEulers::theta, NedCoor_f::x, NedCoor_f::y, and NedCoor_f::z.
Referenced by file_logger_periodic().
|
static |
The file pointer.
Definition at line 53 of file file_logger.c.
Referenced by file_logger_periodic(), file_logger_start(), and file_logger_stop().