Module attitude

Module attitude 

Source

Structs§

AttitudeController
The attitude controller works around the concept of the desired attitude, target attitude and measured attitude. The desired attitude is the attitude input into the attitude controller that expresses where the higher level code would like the aircraft to move to. The target attitude is moved to the desired attitude with jerk, acceleration, and velocity limits. The target angular velocities are fed directly into the rate controllers. The angular error between the measured attitude and the target attitude is fed into the angle controller and the output of the angle controller summed at the input of the rate controllers. By feeding the target angular velocity directly into the rate controllers the measured and target attitudes remain very close together.
MultiCopterAttitudeController
P

Functions§

ang_vel_limit
ang_vel_to_euler_rate
euler_pitch
euler_roll
euler_yaw
input_shaping_ang_vel
Limit the acceleration and deceleration of a velocity request.
input_shaping_angle
Calculate the velocity correction from an angle error. The angular velocity has acceleration and deceleration limits including basic jerk limiting using _input_tc
sqrt_controller
Calculate the correction based on a proportional controller (with piecewise sqrt sections to constrain second derivative).
thrust_vector_rotation_angles
thrust_vector_rotation_angles - calculates two ordered rotations to move the attitude_body quaternion to the attitude_target quaternion. The first rotation corrects the thrust vector and the second rotation corrects the heading vector.
to_euler