Skip to content

Commit 689a4e9

Browse files
SRP estimation works, albeit it's finicky
1 parent 6d001c4 commit 689a4e9

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

tests/orbit_determination/spacecraft.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,9 @@ fn od_val_sc_srp_estimation(
403403
let initial_estimate = sc.to_estimate().unwrap();
404404

405405
// let ckf = KF::no_snc(initial_estimate);
406-
let ckf = KF::no_snc(
406+
let ckf = KF::new(
407407
initial_estimate,
408-
// SNC3::from_diagonal(2 * Unit::Minute, &[1e-14, 1e-14, 1e-14]),
408+
SNC3::from_diagonal(2 * Unit::Minute, &[1e-15, 1e-15, 1e-15]),
409409
);
410410

411411
let mut odp = ODProcess::ekf(
@@ -443,8 +443,12 @@ fn od_val_sc_srp_estimation(
443443
delta.vmag_km_s() * 1e6
444444
);
445445

446-
assert!(delta.rmag_km() < 1e-9, "More than 1 micrometer error");
447-
assert!(delta.vmag_km_s() < 1e-9, "More than 1 micrometer/s error");
446+
assert!(delta.rmag_km() < 1e-3, "More than 1 meter error");
447+
assert!(delta.vmag_km_s() < 1e-6, "More than 1 millimeter/s error");
448+
assert!(
449+
(est.state().srp.cr - truth_cr).abs() < 0.377,
450+
"Cr estimation did not decrease"
451+
);
448452

449453
for (no, est) in odp.estimates.iter().enumerate() {
450454
if no == 0 {
@@ -460,14 +464,4 @@ fn od_val_sc_srp_estimation(
460464
);
461465
}
462466
}
463-
464-
let est = odp.estimates.last().unwrap();
465-
println!("estimate error {:.2e}", est.state_deviation().norm());
466-
println!("estimate covariance {:.2e}", est.covar.diagonal().norm());
467-
468-
assert!(
469-
est.covar.diagonal().norm() < 1e-4,
470-
"estimate covariance norm should be small (perfect dynamics) ({:e})",
471-
est.covar.diagonal().norm()
472-
);
473467
}

0 commit comments

Comments
 (0)