Table Of Contents
sensbiotk.calib package¶
Submodules¶
sensbiotk.calib.calib module¶
Calib for IMU sensors data
- sensbiotk.calib.calib.calib_imu_parameters(acc, mag, gyr)[source]¶
Compute IMU calibration parameters
Returns: params : numpy array of float
[ [off_accx off_accy off_accz], offset for accelerometers [sca_accx sca_accy sca_accz], scale for accelerometers [off_magx off_magy off_magz], offset for magnetometers [sca_magx sca_magy sca_magz], scale for magnetometers [off_gyrx off_gyry off_gyrz], offset for gyrometers [sca_gyrx sca_gyry sca_gyrz]] scale for gyrometers
- sensbiotk.calib.calib.compute(imuNumber, filepath=None, param=1)[source]¶
Performs IMU calibration parameters, saves them in a file at the same path than the .csv recording used, and returns them.
Returns: None :
- sensbiotk.calib.calib.load_param(filename)[source]¶
Load IMU calibration parameters
Returns: params : numpy array of float
[ [off_accx off_accy off_accz], offset for accelerometers [sca_accx sca_accy sca_accz], scale for accelerometers [off_magx off_magy off_magz], offset for magnetometers [sca_magx sca_magy sca_magz], scale for magnetometers [off_gyrx off_gyry off_gyrz], offset for gyrometers [sca_gyrx sca_gyry sca_gyrz]] scale for gyrometers
- sensbiotk.calib.calib.print_param(params_acc, params_mag, params_gyr)[source]¶
Print IMU calibration parameters
Returns: None :
sensbiotk.calib.calib_acc module¶
Calib algo for accelerometers sensors data
- sensbiotk.calib.calib_acc.compute(data)[source]¶
Computes the Scale factor Matrix and the bias vector of a MEMS accelerometer. The procedure exploits the fact that, in static conditions, the modulus of the accelerometer output vector matches that of the gravity acceleration. The calibration model incorporates the bias and scale factor for each axis and the cross-axis symmetrical actors. The parameters are computed through Gauss-Newton nonlinear optimization.
The mathematical model used is A = M(V - B) where M (scale) and B (bias) are scale factor matrix and bias vector respectively.
- M = [ Mxx Mxy Mxz; Myx Myy Myz; Mzx Mzy Mzz ];
- where Mxy = Myx; Myz = Mzy; Mxz = Mzx;
B = [ Bx; By; Bz ];
The diagonal elements of M represent the scale factors along the three axes, whereas the other elements of M are called cross-axis factors. These terms allow describing both the axes misalignment and the crosstalk effect between different channels caused by the sensor electronics. In an ideal world, M = 1; B = 0
Parameters: data : np.array
(x,3) columns ax, ay and az acceleration values obtained from :
the accelerometer represented in m.s-2 :
x rows represent averaged data from x different static positions
Returns: scale : np.array
the scale factor matrix
biais : np.array
the bias vector (in m.s-2)
- sensbiotk.calib.calib_acc.compute_simple(data)[source]¶
Compute IMU accelerometer calibration parameters
Returns: offset : numpy array of float (dim=3)
offset parameter
- scale : numpy array of float (dim=3)
scale parameters
- sensbiotk.calib.calib_acc.errorf(v_x, v_y, v_z, mxx, mxy, mxz, myy, myz, mzz, b_x, b_y, b_z)[source]¶
error function given by Ax**2+Ay**2+Az**2 - g**2, where g = 9.81
- sensbiotk.calib.calib_acc.jac1(v_x, v_y, v_z, mxx, mxy, mxz, b_x, b_y, b_z)[source]¶
Functions jac1 to jac9 are the elements of the Jacobian vector (partial derivatives of the error function with respect to the gain and bias components)
- sensbiotk.calib.calib_acc.jac2(v_x, v_y, v_z, mxx, mxy, mxz, myy, myz, b_x, b_y, b_z)[source]¶
element 2 of the jacobian
- sensbiotk.calib.calib_acc.jac3(v_x, v_y, v_z, mxx, mxy, mxz, myz, mzz, b_x, b_y, b_z)[source]¶
element 3 of the jacobian
- sensbiotk.calib.calib_acc.jac4(v_x, v_y, v_z, mxy, myy, myz, b_x, b_y, b_z)[source]¶
element 4 of the jacobian
- sensbiotk.calib.calib_acc.jac5(v_x, v_y, v_z, mxy, mxz, myy, myz, mzz, b_x, b_y, b_z)[source]¶
element 5 of the jacobian
- sensbiotk.calib.calib_acc.jac6(v_x, v_y, v_z, mxz, myz, mzz, b_x, b_y, b_z)[source]¶
element 6 of the jacobian
- sensbiotk.calib.calib_acc.jac7(v_x, v_y, v_z, mxx, mxy, mxz, myy, myz, mzz, b_x, b_y, b_z)[source]¶
element 7 of the jacobian
- sensbiotk.calib.calib_acc.jac8(v_x, v_y, v_z, mxx, mxy, mxz, myy, myz, mzz, b_x, b_y, b_z)[source]¶
element 8 of the jacobian
- sensbiotk.calib.calib_acc.jac9(v_x, v_y, v_z, mxx, mxy, mxz, myy, myz, mzz, b_x, b_y, b_z)[source]¶
f9 function
sensbiotk.calib.calib_geom module¶
Created on Thu Dec 11 11:25:46 2014
@author: bsijober
Calib for IMU sensors data
sensbiotk.calib.calib_gyr module¶
Calib algo for gyrometer sensors data
sensbiotk.calib.calib_mag module¶
Calib algo for magnetometers sensors data
- sensbiotk.calib.calib_mag.compute(data)[source]¶
Compute IMU magnetometer calibration parameters
Returns: scale : numpy array of float (dim=3)
scale parameters
- offset : numpy array of float (dim=3)
offset parameter
- sensbiotk.calib.calib_mag.unit_sphere_fit(data)[source]¶
Calibration using Unit Sphere Fitting algo.
Returns: scale :numpy array of float :
scale parameters
offset :numpy array of float :
offset parameters
Notes
To allow a good fitting, the motion must cover all axis rotation without high acceleration.