mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-03-27 01:12:18 +08:00
Tools: Add scripts for ecl EKF log file analysis
This commit is contained in:
committed by
Lorenz Meier
parent
ed5c8913ad
commit
bf06066010
27
Tools/ecl_ekf/batch_process_logdata_ekf.py
Normal file
27
Tools/ecl_ekf/batch_process_logdata_ekf.py
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import argparse
|
||||
import os
|
||||
|
||||
"""
|
||||
Runs process_logdata_ekf.py on all the files in the suplied directory with a .ulg extension
|
||||
"""
|
||||
|
||||
parser = argparse.ArgumentParser(description='Analyse the estimator_status and ekf2_innovation message data for all .ulg files in the specified directory')
|
||||
parser.add_argument("directory_path")
|
||||
|
||||
def is_valid_directory(parser, arg):
|
||||
if os.path.isdir(arg):
|
||||
# Directory exists so return the directory
|
||||
return arg
|
||||
else:
|
||||
parser.error('The directory {} does not exist'.format(arg))
|
||||
|
||||
args = parser.parse_args()
|
||||
ulog_directory = args.directory_path
|
||||
print("\n"+"analysing all .ulog files in "+ulog_directory)
|
||||
# Run the analysis script on all the log files found in the specified directory
|
||||
for file in os.listdir(ulog_directory):
|
||||
if file.endswith(".ulg"):
|
||||
print("\n"+"loading "+file+" for analysis")
|
||||
os.system("python process_logdata_ekf.py "+ulog_directory+"/"+file)
|
||||
577
Tools/ecl_ekf/batch_process_metadata_ekf.py
Normal file
577
Tools/ecl_ekf/batch_process_metadata_ekf.py
Normal file
File diff suppressed because it is too large
Load Diff
32
Tools/ecl_ekf/check_level_dict.csv
Normal file
32
Tools/ecl_ekf/check_level_dict.csv
Normal file
@@ -0,0 +1,32 @@
|
||||
mag_fail_pct,0.0
|
||||
yaw_fail_pct,0.0
|
||||
vel_fail_pct,0.0
|
||||
pos_fail_pct,0.0
|
||||
hgt_fail_pct,0.0
|
||||
tas_fail_pct,0.0
|
||||
hagl_fail_pct,1.0
|
||||
flow_fail_pct,1.0
|
||||
mag_amber_fail_pct,50.0
|
||||
vel_amber_fail_pct,50.0
|
||||
pos_amber_fail_pct,50.0
|
||||
hgt_amber_fail_pct,50.0
|
||||
hagl_amber_fail_pct,50.0
|
||||
tas_amber_fail_pct,50.0
|
||||
mag_amber_warn_pct,5.0
|
||||
vel_amber_warn_pct,5.0
|
||||
pos_amber_warn_pct,5.0
|
||||
hgt_amber_warn_pct,5.0
|
||||
hagl_amber_warn_pct,5.0
|
||||
tas_amber_warn_pct,5.0
|
||||
imu_coning_peak_warn,1.0E-5
|
||||
imu_coning_mean_warn,3.6E-6
|
||||
imu_hfdang_peak_warn,2.4E-3
|
||||
imu_hfdang_mean_warn,6.0E-4
|
||||
imu_hfdvel_peak_warn,2.5E-2
|
||||
imu_hfdvel_mean_warn,3.6E-3
|
||||
obs_ang_err_peak_warn,9.0E-2
|
||||
obs_ang_err_mean_warn,8.0E-3
|
||||
obs_vel_err_peak_warn,0.3
|
||||
obs_vel_err_mean_warn,0.05
|
||||
obs_pos_err_peak_warn,1.0
|
||||
obs_pos_err_mean_warn,0.15
|
||||
|
1314
Tools/ecl_ekf/process_logdata_ekf.py
Normal file
1314
Tools/ecl_ekf/process_logdata_ekf.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user