Skip to content

Commit

Permalink
Remove variance functions from simulation
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Mayer <widemeadows@gmail.com>
  • Loading branch information
sunsided committed Jul 14, 2024
1 parent fe70a90 commit af31bee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions examples/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,8 @@ fn main() -> Result<(), Box<dyn Error>> {

// Display estimated angles.
let info = format!(
"φ = {:+0.02} ± {:+0.02} rad ({:+0.02}°)",
"φ = {:+0.02} ({:+0.02}°)",
estimated_angles.roll_phi,
estimator.roll_variance().sqrt(),
estimated_angles.roll_phi * 180.0 / std::f32::consts::PI,
);
window.draw_text(
Expand All @@ -634,9 +633,8 @@ fn main() -> Result<(), Box<dyn Error>> {

// Display estimated angles.
let info = format!(
"θ = {:+0.02} ± {:+0.02} rad ({:+0.02}°)",
"θ = {:+0.02} ({:+0.02}°)",
estimated_angles.pitch_theta,
estimator.pitch_variance().sqrt(),
estimated_angles.pitch_theta * 180.0 / std::f32::consts::PI,
);
window.draw_text(
Expand All @@ -649,9 +647,8 @@ fn main() -> Result<(), Box<dyn Error>> {

// Display estimated angles.
let info = format!(
"ψ = {:+0.02} ± {:+0.02} rad ({:+0.02}°)",
"ψ = {:+0.02} ({:+0.02}°)",
estimated_angles.yaw_psi,
estimator.yaw_variance().sqrt(),
estimated_angles.yaw_psi * 180.0 / std::f32::consts::PI,
);
window.draw_text(
Expand Down
1 change: 0 additions & 1 deletion src/gyro_free/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use minikalman::buffers::types::*;
use minikalman::extended::{ExtendedKalmanBuilder, ExtendedObservationBuilder};
use minikalman::matrix::MatrixDataType;
use minikalman::prelude::*;
use num_traits::Zero;

/// A magnetic field reference vector.
pub type MagneticReference<T> = MagnetometerReading<T>;
Expand Down

0 comments on commit af31bee

Please sign in to comment.