mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-29 02:38:07 +08:00
[wls] return when a solution is found instead to reach max iter (#3617)
This bug is intruduced by #3320. Without the return, wls only ends after reaching max_iter. In simulation, only 1 iteration is needed to reach a solution in flight, while max iter is set to 10. https://github.com/paparazzi/paparazzi/pull/3320/changes#diff-fd1514a7b2a74afb97095b63a4d2d7986c427e9d939db0a36eb68620d9e351c1R273
This commit is contained in:
committed by
GitHub
parent
bc6cac516f
commit
68ea2b661e
@@ -264,13 +264,12 @@ void wls_alloc(struct WLS_t* WLS_p, float **B, float *u_guess, float *W_init, in
|
||||
}
|
||||
}
|
||||
if (break_flag) {
|
||||
|
||||
#if WLS_VERBOSE
|
||||
print_final_values(WLS_p, B);
|
||||
#endif
|
||||
|
||||
// if solution is found, return number of iterations
|
||||
WLS_p->iter = iter;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// scaling back actuator command (0-1)
|
||||
|
||||
Reference in New Issue
Block a user