Чет работает
This commit is contained in:
28
Core/UKSI/foster_student.h
Normal file
28
Core/UKSI/foster_student.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef FOSTER_STUDENT_H
|
||||
#define FOSTER_STUDENT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/* Конфигурация */
|
||||
#define FS_WINDOW_SIZE 10 /* Размер окна анализа */
|
||||
|
||||
/* Структура контекста */
|
||||
typedef struct {
|
||||
float window[FS_WINDOW_SIZE]; /* Буфер окна */
|
||||
float t_current; /* Текущее значение t */
|
||||
float t_critical; /* Критическое значение t */
|
||||
float mse; /* MSE для нормализации */
|
||||
uint8_t index; /* Индекс в буфере */
|
||||
uint8_t count; /* Количество измерений */
|
||||
uint8_t ready; /* Флаг готовности */
|
||||
} FosterStudent;
|
||||
|
||||
/* Прототипы функций */
|
||||
void foster_init(FosterStudent* fs, float t_critical);
|
||||
void foster_set_mse(FosterStudent* fs, float mse);
|
||||
void foster_add_sample(FosterStudent* fs, float value);
|
||||
uint8_t foster_is_ready(FosterStudent* fs);
|
||||
uint8_t foster_check(FosterStudent* fs);
|
||||
|
||||
#endif /* FOSTER_STUDENT_H */
|
||||
Reference in New Issue
Block a user