mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
when testing variances for validity dont allow negative variances
This commit is contained in:
parent
467b22f294
commit
201eed8d8f
@ -135,7 +135,7 @@ static inline bool invalid_var(float data) {
|
||||
if ( invalid(data) ) {
|
||||
return true;
|
||||
}
|
||||
if ( fabsf(data) < 1e-15f ) {
|
||||
if ( data < 1e-15f ) { // var should not be close to zero. And not negative either.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user