mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 14:55:18 +03:00
configurable braking bank angle
This commit is contained in:
parent
8132e59b7e
commit
aad6cedaa9
4 changed files with 8 additions and 5 deletions
|
@ -1270,6 +1270,10 @@ groups:
|
||||||
field: mc.braking_boost_disengage_speed
|
field: mc.braking_boost_disengage_speed
|
||||||
min: 0
|
min: 0
|
||||||
max: 1000
|
max: 1000
|
||||||
|
- name: nav_mc_braking_bank_angle
|
||||||
|
field: mc.braking_bank_angle
|
||||||
|
min: 15
|
||||||
|
max: 60
|
||||||
- name: nav_fw_cruise_thr
|
- name: nav_fw_cruise_thr
|
||||||
field: fw.cruise_throttle
|
field: fw.cruise_throttle
|
||||||
min: 1000
|
min: 1000
|
||||||
|
|
|
@ -123,6 +123,7 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
|
||||||
.braking_boost_timeout = 750, // Timout boost after 750ms
|
.braking_boost_timeout = 750, // Timout boost after 750ms
|
||||||
.braking_boost_speed_threshold = 150, // Boost can happen only above 1.5m/s
|
.braking_boost_speed_threshold = 150, // Boost can happen only above 1.5m/s
|
||||||
.braking_boost_disengage_speed = 100, // Disable boost at 1m/s
|
.braking_boost_disengage_speed = 100, // Disable boost at 1m/s
|
||||||
|
.braking_bank_angle = 40, // Max braking angle
|
||||||
},
|
},
|
||||||
|
|
||||||
// Fixed wing
|
// Fixed wing
|
||||||
|
|
|
@ -148,6 +148,7 @@ typedef struct navConfig_s {
|
||||||
uint16_t braking_boost_timeout; // Timeout for boost mode
|
uint16_t braking_boost_timeout; // Timeout for boost mode
|
||||||
uint16_t braking_boost_speed_threshold; // Above this speed braking boost mode can engage
|
uint16_t braking_boost_speed_threshold; // Above this speed braking boost mode can engage
|
||||||
uint16_t braking_boost_disengage_speed; // Below this speed braking boost will disengage
|
uint16_t braking_boost_disengage_speed; // Below this speed braking boost will disengage
|
||||||
|
uint8_t braking_bank_angle; // Max angle [deg] that MR is allowed duing braking boost phase
|
||||||
} mc;
|
} mc;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -426,10 +426,7 @@ static void updatePositionAccelController_MC(timeDelta_t deltaMicros, float maxA
|
||||||
newAccelX = newAccelX * boostFactor;
|
newAccelX = newAccelX * boostFactor;
|
||||||
newAccelY = newAccelY * boostFactor;
|
newAccelY = newAccelY * boostFactor;
|
||||||
|
|
||||||
//do a small, static, boost to max banking angle.
|
maxBankAngle = DEGREES_TO_DECIDEGREES(navConfig()->mc.braking_bank_angle);
|
||||||
//This routine is very short, MR should be able to keep altitude
|
|
||||||
maxBankAngle = maxBankAngle * 120 / 100;
|
|
||||||
|
|
||||||
accCutoffFrequency = NAV_ACCEL_CUTOFF_FREQUENCY_HZ * 2;
|
accCutoffFrequency = NAV_ACCEL_CUTOFF_FREQUENCY_HZ * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue