Refactor control subsystem

Add interpretControls function to convert pilot commands and mode into control targets and make control functions independent from the mode.
Add ratesExtra target for rates feed-forward; remove yawMode.
Rename controlRate to controlRates to reflect rates variable name.
Remove USER mode.
This commit is contained in:
Oleg Kalachev
2025-08-26 01:00:56 +03:00
parent a1539157b8
commit 8418723ccc
8 changed files with 88 additions and 62 deletions

View File

@@ -21,6 +21,21 @@ public:
return isfinite(x) && isfinite(y) && isfinite(z);
}
bool valid() const {
return finite();
}
bool invalid() const {
return !valid();
}
void invalidate() {
x = NAN;
y = NAN;
z = NAN;
}
float norm() const {
return sqrt(x * x + y * y + z * z);
}