mirror of
https://github.com/okalachev/flix.git
synced 2026-02-17 15:41:32 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user