Commit Graph

12 Commits

Author SHA1 Message Date
Randy Mackay 576dd2bf9e AP_AccelCal: remove unused calc_mean_squared_residuals 2022-01-26 12:03:17 +09:00
Randy Mackay 53479701eb AP_AccelCal: minor format fix 2022-01-25 20:04:34 +09:00
Andrew Tridgell 2e2ccb40b2 AP_AccelCal: fixed inverse matrix call for new name 2021-01-21 13:09:21 +11:00
Siddharth Bharat Purohit 451c2f146d AP_AccelCal: fix bug preventing accel cal fit to run more than one iteration
The check for fitness being smaller than the last value should use the
absolute value, to mean the fitness isn't changing since last iteration.
It's currently always quiting the function after the first iteration.

However for Gauss Newton we anyway want to run as many iterations as we
can, because there are ups and downs along the iteration so we might get
say best result where before and after iterations were bad. The lines
above takes care that sane and the best is selected.
2016-11-18 20:03:30 -02:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Ricardo de Almeida Gonzaga aa4b66509f AP_AccelCal: Fix typos 2016-05-13 19:20:06 -03:00
dgrat 5148e41c1a AP_Math: Cleaned macro definitions
Moved Definitions into a separate header. Replaced PI with M_PI and
removed the M_PI_*_F macros.
2016-02-27 02:51:33 -03:00
Lucas De Marchi f3ee7a9a85 AP_AccelCal: use union instead of reference
The current approach to access the same memory location by using a
reference is giving this warning:

	../libraries/AP_AccelCal/AccelCalibrator.cpp: In constructor ‘AccelCalibrator::AccelCalibrator()’:
	../libraries/AP_AccelCal/AccelCalibrator.cpp:34:64: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
	 _param_struct(*reinterpret_cast<struct param_t *>(&_param_array))
									^
	../libraries/AP_AccelCal/AccelCalibrator.cpp: In member function ‘void AccelCalibrator::run_fit(uint8_t, float&)’:
	../libraries/AP_AccelCal/AccelCalibrator.cpp:336:79: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
	     struct param_t &fit_param(*reinterpret_cast<struct param_t *>(&param_array));
                                                                               ^
Using a union allows us to get rid of the warning, make sure the sizes of the
different structs match and have a more elegant solution.
2016-01-02 10:04:16 +11:00
Jonathan Challinger 24e413c6af AP_AccelCal: fixes in response to review 2015-12-29 22:55:04 -08:00
Jonathan Challinger 660d9e86d5 AP_AccelCal: basic sanity check on fit parameters 2015-12-29 11:00:20 -08:00
bugobliterator d24b5023f4 AP_AccelCal: Add separate lib for accel calibration 2015-12-29 10:46:34 -08:00