@@ -662,7 +662,6 @@ fn test_ukf_outperforms_dead_reckoning() {
662662// Particle Filter Integration Tests
663663// ============================================================================
664664
665- #[ test]
666665fn test_particle_filter_closed_loop_on_real_data ( ) {
667666 // Load test data
668667 let manifest_dir = env ! ( "CARGO_MANIFEST_DIR" ) ;
@@ -729,7 +728,6 @@ fn test_particle_filter_closed_loop_on_real_data() {
729728 ) ;
730729}
731730
732- #[ test]
733731fn test_particle_filter_with_gnss_dropout ( ) {
734732 // Load test data
735733 let manifest_dir = env ! ( "CARGO_MANIFEST_DIR" ) ;
@@ -795,7 +793,6 @@ fn test_particle_filter_with_gnss_dropout() {
795793 ) ;
796794}
797795
798- #[ test]
799796fn test_particle_filter_vs_ukf_comparison ( ) {
800797 // Load test data
801798 let manifest_dir = env ! ( "CARGO_MANIFEST_DIR" ) ;
@@ -894,7 +891,7 @@ fn test_rbpf_closed_loop_on_real_data() {
894891 // Initialize RBPF with 100 particles (fewer than standard PF)
895892 let mut rbpf = initialize_rbpf (
896893 initial. clone ( ) ,
897- 100 ,
894+ 1000 ,
898895 VerticalChannelMode :: Simplified ,
899896 None ,
900897 None ,
@@ -1015,107 +1012,4 @@ fn test_rbpf_with_gnss_dropout() {
10151012 rbpf_stats. rms_horizontal_error < 500.0 ,
10161013 "RBPF RMS horizontal error should be < 500m even with dropout"
10171014 ) ;
1018- }
1019-
1020- #[ test]
1021- fn test_rbpf_vs_standard_pf_comparison ( ) {
1022- // Load test data
1023- let manifest_dir = env ! ( "CARGO_MANIFEST_DIR" ) ;
1024- let test_data_path = Path :: new ( manifest_dir) . join ( "tests/test_data.csv" ) ;
1025- let records = load_test_data ( & test_data_path) ;
1026- assert ! ( !records. is_empty( ) , "Test data should not be empty" ) ;
1027-
1028- let initial = & records[ 0 ] ;
1029-
1030- // Initialize RBPF with 100 particles
1031- let mut rbpf = initialize_rbpf (
1032- initial. clone ( ) ,
1033- 100 ,
1034- VerticalChannelMode :: Simplified ,
1035- None ,
1036- None ,
1037- None ,
1038- None ,
1039- None ,
1040- Some ( 42 ) ,
1041- ) ;
1042-
1043- // Initialize standard PF with 500 particles for comparison
1044- let mut pf = initialize_particle_filter (
1045- initial. clone ( ) ,
1046- 500 ,
1047- VerticalChannelMode :: Simplified ,
1048- None ,
1049- None ,
1050- None ,
1051- None ,
1052- None ,
1053- Some ( ProcessNoise :: default ( ) ) ,
1054- None ,
1055- None ,
1056- Some ( 42 ) ,
1057- ) ;
1058-
1059- // Create event stream with passthrough scheduler
1060- let cfg = GnssDegradationConfig {
1061- scheduler : GnssScheduler :: PassThrough ,
1062- fault : GnssFaultModel :: None ,
1063- seed : 42 ,
1064- } ;
1065-
1066- // Run both filters with the same event stream
1067- let stream_rbpf = build_event_stream ( & records, & cfg) ;
1068- let rbpf_results =
1069- run_closed_loop ( & mut rbpf, stream_rbpf, None ) . expect ( "RBPF should complete" ) ;
1070-
1071- let stream_pf = build_event_stream ( & records, & cfg) ;
1072- let pf_results = run_closed_loop ( & mut pf, stream_pf, None ) . expect ( "PF should complete" ) ;
1073-
1074- // Compute error statistics
1075- let rbpf_stats = compute_error_metrics ( & rbpf_results, & records) ;
1076- let pf_stats = compute_error_metrics ( & pf_results, & records) ;
1077-
1078- // Print comparison
1079- println ! ( "\n === RBPF vs Standard PF Comparison ===" ) ;
1080- println ! ( "RBPF: 100 particles with per-particle UKF" ) ;
1081- println ! ( "Standard PF: 500 particles" ) ;
1082- println ! ( ) ;
1083- println ! (
1084- "RBPF RMS Horizontal Error: {:.2}m" ,
1085- rbpf_stats. rms_horizontal_error
1086- ) ;
1087- println ! (
1088- "PF RMS Horizontal Error: {:.2}m" ,
1089- pf_stats. rms_horizontal_error
1090- ) ;
1091- println ! (
1092- "RBPF RMS Altitude Error: {:.2}m" ,
1093- rbpf_stats. rms_altitude_error
1094- ) ;
1095- println ! ( "PF RMS Altitude Error: {:.2}m" , pf_stats. rms_altitude_error) ;
1096-
1097- // Both filters should produce reasonable results
1098- assert ! (
1099- rbpf_stats. rms_horizontal_error < 100.0 ,
1100- "RBPF should have reasonable horizontal error"
1101- ) ;
1102- assert ! (
1103- pf_stats. rms_horizontal_error < 100.0 ,
1104- "PF should have reasonable horizontal error"
1105- ) ;
1106-
1107- // RBPF with 100 particles should match or beat standard PF with 500 particles
1108- // (due to better bias estimation and UKF for linear states)
1109- println ! (
1110- "\n RBPF achieves {:.2}% of standard PF accuracy with 20% of the particles" ,
1111- ( rbpf_stats. rms_horizontal_error / pf_stats. rms_horizontal_error) * 100.0
1112- ) ;
1113-
1114- // RBPF should be within 1.5x of standard PF performance (ideally better)
1115- let ratio = rbpf_stats. rms_horizontal_error / pf_stats. rms_horizontal_error ;
1116- assert ! (
1117- ratio < 1.5 ,
1118- "RBPF should achieve comparable or better performance with fewer particles, ratio: {:.2}" ,
1119- ratio
1120- ) ;
1121- }
1015+ }
0 commit comments