pub fn compute_control(
state: &QuadrotorState,
desired: &DesiredState,
params: &QuadrotorParams,
gains: &ControllerGains,
) -> ControlOutputExpand description
Compute the PD control output for the quadrotor.
This follows the same controller structure as the Python reference:
- Thrust compensates gravity and tracks desired z with PD.
- Roll/pitch torques are proportional corrections derived from desired lateral accelerations.
- Yaw torque is proportional to yaw error.