#ifndef __CONTROL_ATTITUDE_H #define __CONTROL_ATTITUDE_H #include "control_rate.h" extern float t_roll_last, t_pitch_last; #define YAW_RATE_MAX 60 // 航向最大100deg/s float attitude_pid_ctl_rp(struct pid_method_rpy *method, struct pid_value_rpy *value); float attitude_pid_ctl_yaw(struct pid_method_rpy *method, struct pid_value_rpy *value); void get_pilot_desired_lean_angles(short roll_in, short pitch_in); void get_pilot_desired_yaw_angle_fromrc(short yaw_in, float dt); float get_yaw_error(float target, float currt); void get_target_yaw_by_flight_mode(unsigned char, float); void get_smooth_target_yaw(float argTargetYaw, float dt); bool set_automode_target_yaw(float yaw_deg); #endif