#ifndef INCLUDED_RATE_H #define INCLUDED_RATE_H #include "motion_planner.h" struct work_motion_stats { double dt; double active_time; /* s */ double active_length; /* mm */ uint32_t active_segment_count; uint32_t sample_count; /* * Отклонение скорости на рабочих участках. * * Ошибка считается как: * e(t) = sample.v - segment.v_nominal */ double speed_error_max_abs; /* mm/s */ double speed_error_mean_abs; /* mm/s */ double speed_error_rms; /* mm/s */ double speed_error_abs_integral; /* mm, т.к. integral |e| dt */ double speed_error_sq_integral; /* mm^2/s, т.к. integral e^2 dt */ /* * Общий рывок на рабочих участках. * * Используется sample.j_abs, то есть модуль полного векторного рывка, * а не только тангенциальный j_t. */ double jerk_abs_integral; /* mm/s^2, т.к. integral |j| dt */ double jerk_abs_mean; /* mm/s^3 */ double jerk_abs_max; /* mm/s^3 */ }; struct work_motion_stats measure_work_motion_stats (const struct path *, const struct motion_plan *, double dt); #endif // INCLUDED_RATE_H