Skip to content

Commit 291d34c

Browse files
committed
clippy fix
1 parent 8f73a9f commit 291d34c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

core/src/filter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ mod tests {
928928
gyro: Vector3::new(0.0, 0.0, 0.0),
929929
};
930930
let dt = 1.0;
931-
sigma_point.forward(imu_data.clone(), dt, None);
931+
sigma_point.forward(imu_data, dt, None);
932932

933933
let position = [0.0, 0.0, 0.0];
934934
let velocity = [0.0, 0.0, 0.0];
@@ -948,7 +948,7 @@ mod tests {
948948
0.01, 0.01, 0.01, // IMU biases noise
949949
0.01, 0.01, 0.01, // Measurement bias noise
950950
];
951-
sigma_point.forward(imu_data.clone(), dt, Some(noise));
951+
sigma_point.forward(imu_data, dt, Some(noise));
952952
// Check that the state has changed
953953
assert!(sigma_point.nav_state.latitude != position[0]);
954954
assert!(sigma_point.nav_state.longitude != position[1]);

core/src/strapdown.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,13 @@ pub fn forward(state: &mut StrapdownState, imu_data: IMUData, dt: f64) {
465465
// Extract the attitude matrix from the current state
466466
let c_0: Rotation3<f64> = state.attitude;
467467
// Attitude update; Equation 5.46
468-
let c_1: Matrix3<f64> = attitude_update(&state, imu_data.gyro, dt.clone());
468+
let c_1: Matrix3<f64> = attitude_update(state, imu_data.gyro, dt);
469469
// Specific force transformation; Equation 5.47
470470
let f: Vector3<f64> = 0.5 * (c_0.matrix() + c_1) * imu_data.accel;
471471
// Velocity update; Equation 5.54
472-
let velocity = velocity_update(&state, f, dt.clone());
472+
let velocity = velocity_update(state, f, dt);
473473
// Position update; Equation 5.56
474-
let (lat_1, lon_1, alt_1) = position_update(&state, velocity, dt.clone());
474+
let (lat_1, lon_1, alt_1) = position_update(state, velocity, dt);
475475
// Save updated attitude as rotation
476476
state.attitude = Rotation3::from_matrix(&c_1);
477477
// Save update velocity

0 commit comments

Comments
 (0)