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