1
0
Fork 0
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:
Pawel Spychalski (DzikuVx) 2018-06-13 13:30:37 +02:00
parent 8132e59b7e
commit aad6cedaa9
4 changed files with 8 additions and 5 deletions

View file

@ -1270,6 +1270,10 @@ groups:
field: mc.braking_boost_disengage_speed
min: 0
max: 1000
- name: nav_mc_braking_bank_angle
field: mc.braking_bank_angle
min: 15
max: 60
- name: nav_fw_cruise_thr
field: fw.cruise_throttle
min: 1000

View file

@ -123,6 +123,7 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
.braking_boost_timeout = 750, // Timout boost after 750ms
.braking_boost_speed_threshold = 150, // Boost can happen only above 1.5m/s
.braking_boost_disengage_speed = 100, // Disable boost at 1m/s
.braking_bank_angle = 40, // Max braking angle
},
// Fixed wing

View file

@ -148,6 +148,7 @@ typedef struct navConfig_s {
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_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;
struct {

View file

@ -426,10 +426,7 @@ static void updatePositionAccelController_MC(timeDelta_t deltaMicros, float maxA
newAccelX = newAccelX * boostFactor;
newAccelY = newAccelY * boostFactor;
//do a small, static, boost to max banking angle.
//This routine is very short, MR should be able to keep altitude
maxBankAngle = maxBankAngle * 120 / 100;
maxBankAngle = DEGREES_TO_DECIDEGREES(navConfig()->mc.braking_bank_angle);
accCutoffFrequency = NAV_ACCEL_CUTOFF_FREQUENCY_HZ * 2;
}