From 1843061376cd8389126e0b78917cb4424ecae525 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Thu, 20 Apr 2017 19:27:58 +1000 Subject: [PATCH] Tools/ecl_ekf: Improvements to ecl log analysis scripts Fix error in scaling of population high frequency vibration metrics Add histograms for delta angle and velocity bias data Fix variable descriptions --- Tools/ecl_ekf/batch_process_metadata_ekf.py | 45 ++++++++++++++++----- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/Tools/ecl_ekf/batch_process_metadata_ekf.py b/Tools/ecl_ekf/batch_process_metadata_ekf.py index 25fb87330e..22b870f9b1 100644 --- a/Tools/ecl_ekf/batch_process_metadata_ekf.py +++ b/Tools/ecl_ekf/batch_process_metadata_ekf.py @@ -91,7 +91,7 @@ population_results = { 'imu_coning_max_avg':[float('NaN'),'The mean of the maximum in-flight values of the IMU delta angle coning vibration level (mrad)'], 'imu_coning_mean_avg':[float('NaN'),'The mean of the mean in-flight value of the IMU delta angle coning vibration level (mrad)'], 'imu_hfdang_max_avg':[float('NaN'),'The mean of the maximum in-flight values of the IMU high frequency delta angle vibration level (mrad)'], -'imu_hfdang_mean_avg':[float('NaN'),'The mean of the mean in-flight value of the IMU delta hihg frequency delta angle vibration level (mrad)'], +'imu_hfdang_mean_avg':[float('NaN'),'The mean of the mean in-flight value of the IMU delta high frequency delta angle vibration level (mrad)'], 'imu_hfdvel_max_avg':[float('NaN'),'The mean of the maximum in-flight values of the IMU high frequency delta velocity vibration level (m/s)'], 'imu_hfdvel_mean_avg':[float('NaN'),'The mean of the mean in-flight value of the IMU delta high frequency delta velocity vibration level (m/s)'], 'obs_ang_median_avg':[float('NaN'),'The mean of the median in-flight value of the output observer angular tracking error magnitude (mrad)'], @@ -388,9 +388,9 @@ if (len(result1) > 0 and len(result2) > 0): # IMU high frequency delta velocity vibration levels temp = np.asarray([population_data[k].get('imu_hfdvel_peak') for k in found_keys]) -result1 = 1000.0 * temp[np.isfinite(temp)] +result1 = temp[np.isfinite(temp)] temp = np.asarray([population_data[k].get('imu_hfdvel_mean') for k in found_keys]) -result2 = 1000.0 * temp[np.isfinite(temp)] +result2 = temp[np.isfinite(temp)] if (len(result1) > 0 and len(result2) > 0): population_results['imu_hfdvel_max_avg'][0] = np.mean(result1) @@ -464,6 +464,36 @@ if (len(result) > 0): pp.savefig() plt.close(13) +# IMU delta angle bias +temp = np.asarray([population_data[k].get('imu_dang_bias_median') for k in found_keys]) +result = temp[np.isfinite(temp)] + +if (len(result) > 0): + plt.figure(14,figsize=(20,13)) + + plt.hist(result) + plt.title("Gaussian Histogram - IMU Delta Angle Bias Median") + plt.xlabel("imu_dang_bias_median (rad)") + plt.ylabel("Frequency") + + pp.savefig() + plt.close(14) + +# IMU delta velocity bias +temp = np.asarray([population_data[k].get('imu_dvel_bias_median') for k in found_keys]) +result = temp[np.isfinite(temp)] + +if (len(result) > 0): + plt.figure(15,figsize=(20,13)) + + plt.hist(result) + plt.title("Gaussian Histogram - IMU Delta Velocity Bias Median") + plt.xlabel("imu_dvel_bias_median (m/s)") + plt.ylabel("Frequency") + + pp.savefig() + plt.close(15) + # close the pdf file pp.close() print('Population summary plots saved in population_data.pdf') @@ -525,12 +555,9 @@ single_log_results = { 'ofx_fail_percentage':[float('NaN'),'The percentage of in-flight recorded failure events for the optical flow sensor X-axis innovation consistency test.'], 'ofy_fail_percentage':[float('NaN'),'The percentage of in-flight recorded failure events for the optical flow sensor Y-axis innovation consistency test.'], 'on_ground_transition_time':[float('NaN'),'The time in seconds measured from startup that the EKF transitioned out of in-air mode. Set to a nan if a transition event is not detected.'], -'output_obs_ang_err_mean':[float('NaN'),'Mean in-flight value of the output observer angular error (rad)'], -'output_obs_ang_err_peak':[float('NaN'),'Peak in-flight value of the output observer angular error (rad)'], -'output_obs_pos_err_mean':[float('NaN'),'Mean in-flight value of the output observer position error (m)'], -'output_obs_pos_err_peak':[float('NaN'),'Peak in-flight value of the output observer position error (m)'], -'output_obs_vel_err_mean':[float('NaN'),'Mean in-flight value of the output observer velocity error (m/s)'], -'output_obs_vel_err_peak':[float('NaN'),'Peak in-flight value of the output observer velocity error (m/s)'], +'output_obs_ang_err_median':[float('NaN'),'Median in-flight value of the output observer angular error (rad)'], +'output_obs_pos_err_median':[float('NaN'),'Median in-flight value of the output observer position error (m)'], +'output_obs_vel_err_median':[float('NaN'),'Median in-flight value of the output observer velocity error (m/s)'], 'pos_fail_percentage':[float('NaN'),'The percentage of in-flight recorded failure events for the velocity sensor consolidated innovation consistency test.'], 'pos_percentage_amber':[float('NaN'),'The percentage of in-flight position sensor consolidated innovation consistency test values > 0.5.'], 'pos_percentage_red':[float('NaN'),'The percentage of in-flight position sensor consolidated innovation consistency test values > 1.0.'],