control_attitude.h 706 B

12345678910111213141516171819202122232425
  1. #ifndef __CONTROL_ATTITUDE_H
  2. #define __CONTROL_ATTITUDE_H
  3. #include "control_rate.h"
  4. extern float t_roll_last, t_pitch_last;
  5. #define YAW_RATE_MAX 60 // 航向最大100deg/s
  6. float attitude_pid_ctl_rp(struct pid_method_rpy *method, struct pid_value_rpy *value);
  7. float attitude_pid_ctl_yaw(struct pid_method_rpy *method, struct pid_value_rpy *value);
  8. void get_pilot_desired_lean_angles(short roll_in, short pitch_in);
  9. void get_pilot_desired_yaw_angle_fromrc(short yaw_in, float dt);
  10. float get_yaw_error(float target, float currt);
  11. void get_target_yaw_by_flight_mode(unsigned char, float);
  12. void get_smooth_target_yaw(float argTargetYaw, float dt);
  13. bool set_automode_target_yaw(float yaw_deg);
  14. #endif