function [MASE, MABE, CE, MSSE, MSBE] = computeCalibError(estParams, trueParams, k_calib)
%COMPUTECALIBERROR Summary of this function goes here
%   Detailed explanation goes here

S_est = estParams.AxesMisalignment;
b_est = estParams.Bias;

S_true = trueParams.AxesMisalignment;
b_true = trueParams.Bias;

S_normaliser = [0.14 0.04 0.04;
                0.06 0.14 0.04;
                0.06 0.06 0.14]; % ranges of the CPs in the axis sensitivity matrix.

b_normaliser = [(40 / 1000) * 9.81, (40 / 1000) * 9.81, (40 / 1000) * 9.81];

MASE = mean(abs(S_est - S_true) ./ S_normaliser, [1 2]);
MABE = mean(abs(b_est - b_true) ./ b_normaliser);
CE = k_calib * MASE + (1 - k_calib) * MABE;

MSBE = mean((b_est - b_true).^2);
MSSE = mean((S_est - S_true).^2, 'all');

end