Skip to main content

stable_flight/guidance/vtol/forward/
params.rs

1//! [`ForwardThrustConfig`]'s params; the names and units are tabled in [`crate::params`].
2
3use super::ForwardThrustConfig;
4use crate::params::{Param, ParamTable, param};
5
6impl ParamTable for ForwardThrustConfig {
7    const PARAMS: &'static [Param<Self>] = &[
8        param!("FWD_THR_GAIN", gain),
9        param!(deg "FWD_PIT_LIM", pitch_limit_rad),
10    ];
11}
12
13#[cfg(feature = "param-metadata")]
14mod metadata {
15    use super::ForwardThrustConfig;
16    use crate::params::metadata::{ParamMeta, ParamMetadata};
17
18    const FORWARD: ParamMeta = ParamMeta::in_group("Guidance", "Forward thrust");
19
20    impl ParamMetadata for ForwardThrustConfig {
21        const METADATA: &'static [ParamMeta] = &[
22            FORWARD
23                .param(
24                    "FWD_THR_GAIN",
25                    "Pusher thrust per tan of hover nose-down pitch (0: off)",
26                )
27                .at_least(0.0),
28            FORWARD
29                .param("FWD_PIT_LIM", "Most nose-down pitch with forward thrust on")
30                .with_units("deg")
31                .at_least(0.0)
32                .below(90.0),
33        ];
34    }
35}