From 576dd2bf9ee467f80135e8ba3a748e926e467ebb Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 19 Jan 2022 20:14:38 +0900 Subject: [PATCH] AP_AccelCal: remove unused calc_mean_squared_residuals --- libraries/AP_AccelCal/AccelCalibrator.cpp | 7 ------- libraries/AP_AccelCal/AccelCalibrator.h | 1 - 2 files changed, 8 deletions(-) diff --git a/libraries/AP_AccelCal/AccelCalibrator.cpp b/libraries/AP_AccelCal/AccelCalibrator.cpp index 920f2a4fcf..5e90912bda 100644 --- a/libraries/AP_AccelCal/AccelCalibrator.cpp +++ b/libraries/AP_AccelCal/AccelCalibrator.cpp @@ -391,13 +391,6 @@ float AccelCalibrator::calc_residual(const Vector3f& sample, const struct param_ return GRAVITY_MSS - (M*(sample+params.offset)).length(); } -// calculated the total mean squared fitness of all the collected samples using parameters -// converged to LSq estimator so far -float AccelCalibrator::calc_mean_squared_residuals() const -{ - return calc_mean_squared_residuals(_param.s); -} - // calculated the total mean squared fitness of all the collected samples using parameters // supplied float AccelCalibrator::calc_mean_squared_residuals(const struct param_t& params) const diff --git a/libraries/AP_AccelCal/AccelCalibrator.h b/libraries/AP_AccelCal/AccelCalibrator.h index 976668ce21..df06da578d 100644 --- a/libraries/AP_AccelCal/AccelCalibrator.h +++ b/libraries/AP_AccelCal/AccelCalibrator.h @@ -137,7 +137,6 @@ private: // Function related to Gauss Newton Least square regression process float calc_residual(const Vector3f& sample, const struct param_t& params) const; - float calc_mean_squared_residuals() const; float calc_mean_squared_residuals(const struct param_t& params) const; void calc_jacob(const Vector3f& sample, const struct param_t& params, VectorP& ret) const; void run_fit(uint8_t max_iterations, float& fitness);