Antenna delay calibration: The equation to calculate the distance of two EDM

I am trying to write a program for the Antenna delay calibration algorithm from APS014 section 2.2.
My understanding is to minimize the EDM delta, suppose the 3x3 matrix is
[ 0, d12, d13
d21, 0, d23
d31, d32, 0]
The target is to minimize (d12d12+d13d13+d21d21+d23d23+d31d31+d32d32)

If my understanding is correct, I got a different result than the result from APS014. I hope to compare the middle result with you.
below are matlab sources:
actual_EDM = [0, 7.914, 7.914;
7.914, 0, 7.914;
7.914, 7.914, 0];
deca_ranging_EDM = [0, 162.1613, 162.2531;
162.1720, 0, 162.2449;
162.2155, 162.2582, 0];
SPEED_OF_LIGHT=299702547;
distance_tof_factor = 1/SPEED_OF_LIGHT;
tof_actual = distance_tof_factoractual_EDM;
tof_deca_ranging = distance_tof_factor
deca_ranging_EDM;

My result is
delay_1=1.0e-06 *-0.514620267427885;
delay_2=1.0e-06 * -0.514745467748397;
delay_3=1.0e-06 * -0.515199318910257;

Applying the delays to the tof_deca_ranging by the populate_new_tof_matrix(distance_tof_factor*deca_ranging_EDM, …
delay_1, delay_2, delay_3):
where the function is defined according to the formular from APS014:
function [new_matrix] = populate_new_tof_matrix(old_matrix, delay_delta_1, delay_delta_2, delay_delta_3)
new_matrix = old_matrix;
new_matrix(1, 2) = new_matrix(1, 2) + delay_delta_1/2+delay_delta_2/2;
new_matrix(1, 3) = new_matrix(1, 3) + delay_delta_1/2+delay_delta_3/2;
new_matrix(2, 1) = new_matrix(2, 1) + delay_delta_1/2+delay_delta_2/2;
new_matrix(2, 3) = new_matrix(2, 3) + delay_delta_2/2+delay_delta_3/2;
new_matrix(3, 1) = new_matrix(3, 1) + delay_delta_1/2+delay_delta_3/2;
new_matrix(3, 2) = new_matrix(3, 2) + delay_delta_2/2+delay_delta_3/2;
end
The resulting array is
1.0e-07 *

``````               0   0.263912795061111   0.264706576283658
``````

0.264269815717328 0 0.263806970066053
0.263451999024426 0.264250743405089 0

Calculate the norm of the distance matrix by function calculate_matrix_norm
function [matrix_norm] = calculate_matrix_norm(matrix)
matrix_norm = matrix(1,2)^2+matrix(1,3)^2+matrix(2,1)^2+matrix(2,3)^2+matrix(3, 1)^2+matrix(3,2)^2;
end

My result is:

fprintf(‘my result is %8e\n’, calculate_matrix_norm(tof_actual-populate_new_tof_matrix(distance_tof_factor*deca_ranging_EDM, …
delay_1, delay_2, delay_3)))
my result is 9.537035e-21

And the result from the doc is
aps014_delay_1=-514.4747e-9;
aps014_delay_2=-514.5911e-9;
aps014_delay_3 = -515.0413e-9;
By using the value from the book, the result is

fprintf(‘aps014 result is %8e\n’, calculate_matrix_norm(tof_actual-populate_new_tof_matrix(distance_tof_factor*deca_ranging_EDM, …
aps014_delay_1, aps014_delay_2, aps014_delay_3)))
aps014 result is 1.501625e-19

It seems the result from aps014 is worse than my result. I think something is wrong in my calculation. Can you check if my understanding of the matrix norm is correct?