1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#![cfg_attr(not_test, no_std)]
mod body_rate;
pub use body_rate::BodyRateController;
mod lateral_pos;
pub use lateral_pos::LateralPositionController;
mod yaw;
pub use yaw::YawController;
pub mod pid;
pub use pid::PID;
pub mod attitude;
// From `t_rise` and `delta` returns kp and kd
fn pid_config(t_rise: f32, delta: f32) -> (f32, f32) {
let w = 1. / (1.57 * t_rise);
(w * w, 2. * delta * w)
}