ego: orientation: allow for a more generous definition of earth gravity
This commit is contained in:
@@ -33,7 +33,7 @@ impl OrientationEstimator {
|
|||||||
// Estimate down from stationary accel
|
// Estimate down from stationary accel
|
||||||
let avg = self.accel_history.data().iter().sum::<Vector3<f32>>()
|
let avg = self.accel_history.data().iter().sum::<Vector3<f32>>()
|
||||||
/ (self.accel_history.data().len() as f32);
|
/ (self.accel_history.data().len() as f32);
|
||||||
if avg.norm() >= 9.764 && avg.norm() <= 9.834 {
|
if avg.norm() >= 9.1 && avg.norm() <= 9.9 {
|
||||||
self.down = Some(Unit::new_normalize(-avg));
|
self.down = Some(Unit::new_normalize(-avg));
|
||||||
self.sensor_bias = avg;
|
self.sensor_bias = avg;
|
||||||
info!("Found down={:?} bias={:?}", self.down, self.sensor_bias);
|
info!("Found down={:?} bias={:?}", self.down, self.sensor_bias);
|
||||||
|
|||||||
Reference in New Issue
Block a user