## Appendix B Basic Algorithm in Pseudocode
### Algorithm  
```
1:whilemax(LSEE_0) > target precision
2: Finding which group of measurement would result in the most benefit for the point with the lowest
3: LSEE
4: Calculation of LSM and LSEE from covariance matrix
5: PP = N2*P;
6: Normal_equation = [A*PP*A, B; B', zeros(4,4)]:
7: EX = inv(Normal_equation);
8: LSEE = evaluation (Ex)
9: vector of differences of LSEE for each point
10: LSEE_difference=LSEE - LSEE_0
11: differences for each group of measurement increasing
12: LSEE_difference_group(k,:)=LSEE_difference
13:endfor
24: Evaluation of which group of measurement had the biggest benefit for point with worse LSEE
25: finding the worst point with index i
26: i = max_K_point_index (LSEE_0);
27: finding group of measurement with maximal benefit for worst point i, index-ing this group by i
28: i = max_benefit_index (LSEE_difference_group(,:i));
29: Increasing the number of repetitions with the biggest benefit
30: N(i2) = N(i2)+1;
31:endwhile
```  
**Algorithm 3** Greedy algorithm  
```
1:whilemax(LSEE_0) > target precision
2: Finding which group of measurement would result in the most benefit for the point with the lowest
32: LSEE
4: Calculation of LSM and LSEE from covariance matrix
5: PP = N2*P;
6: Normal_equation = [A*PP*A, B; B', zeros(4,4)]:
7: EX = inv(Normal_equation);
8: LSEE = evaluation (Ex)
9: vector of differences of LSEE for each point
10: LSEE_difference=LSEE - LSEE_0
12: differences for each group of measurement increasing
13: LSEE_difference_group(k,:)=LSEE_difference
14:endfor
25: Evaluation of which group of measurement had the biggest benefit for point with worse LSEE
26: finding the worst point with index i
27: i = max_K_point_index (LSEE_0);
28: finding group of measurement with maximal benefit for worst point i, index-ing this group by i
29: i = max_benefit_index (LSEE_difference_group(,:i));
29: Increasing the number of repetitions with the biggest benefit
30: N(i2) = N(i2)+1;
31:endwhile
```  
**Algorithm 4** Greedy algorithm  
```
1:whilemax(LSEE_0) > target precision
2: Finding which group of measurement would result in the most benefit for the point with the lowest
33: N2 = N;
4: Calculation of LSM and LSEE from covariance matrix
5: PP = N2*P;
6: Normal_equation = [A*PP*A, B; B', zeros(4,4)]:
7: EX = inv(Normal_equation);
8: In the cycle, the number of repetitions of every group of measurement is increased by 1 and LSEE is calculated
10: fork = 1:number of groups in measurement_group
11: indexing k-th group of measurement in matrixes N, A,...
12: index(k);
13: calculation of LSM and LSEE from covariance matrix
14: N2(index) = N2(index)+1;
15: PP = N2*P;
16: Normal_equation = [A*PP*A, B; B', zeros(4,4)]
17: EX = inv(Normal_equation);
18: LSEE = evaluation (Ex)
19: vector of differences of LSEE for each point
20: LSEE_difference=LSEE - LSEE_0
21: differences for each group of measurement increasing
22: LSEE_difference_group(k,:)=LSEE_difference
23:endfor
24: Evaluation of which group of measurement had the biggest benefit for point with worse LSEE
25: finding the worst point with index i
26: i = max_K_point_index (LSEE_0);
27: finding group of measurement with maximal benefit for worst point i, index-ing this group by i
28: i = max_benefit_index (LSEE_difference_group(,:i));
29: Increasing the number of repetitions with the biggest benefit
30: N(i2) = N(i2)+1;
31:endwhile
```  
**Algorithm 5** Greedy algorithm  
```
1:whilemax(LSEE_0) > target precision
2: Finding which group of measurement would result in the most benefit for the point with the lowest
32: LSEE
4: Calculate LSM and LSEE from covariance matrix
5: PP = N2*P;
6: Normal_equation = [A*PP*A, B; B', zeros(4,4)]:
7: EX = inv(Normal_equation);
8: LSEE_0 = evaluation (Ex)
9: In the cycle, the number of repetitions of every group of measurement is increased by 1 and LSEE is calculated
10: fork = 1:number of groups in measurement_group
11: indexing k-th group of measurement in matrixes N, A,...
12: index(k);
13: calculation of LSM and LSEE from covariance matrix
14: N2(index) = N2(index)+1;
15: PP = N2*P;
16: Normal_equation = [A*PP*A, B; B', zeros(4,4)]
17: EX = inv(Normal_equation);
18: LSEE = evaluation (Ex)
19: vector of differences of LSEE for each point
20: LSEE_difference=LSEE - LSEE_0
21: differences for each group of measurement increasing
22: LSEE_difference_group(k,:)=LSEE_difference
23:endfor
24: Evaluation of which group of measurement had the biggest benefit for point with worse LSEE
25: finding the worst point with index i
26: i = max_K_point_index (LSEE_0);
27: finding group of measurement with maximal benefit for worst point i, index-ing this group by i
28: i = max_benefit_index (LSEE_difference_group(,:i));
29: Increasing the number of repetitions with the biggest benefit
30: N(i2) = N(i2)+1;
31:endwhile
```  
**Algorithm 6** Greedy algorithm  
```
1:whilemax(LSEE_0) > target precision
2: Finding which group of measurement would result in the most benefit for the point with the lowest
33: N2 = N;
4: Calculation of LSM and LSEE from covariance matrix
5: PP = N2*P;
6: Normal_equation = [A*PP*A, B; B', zeros(4,4)]:
7: EX = inv(Normal_equation);
8: LSEE_0 = evaluation [A*PP*A, B; B', zeros(4,4)]
9: In the cycle, the number of repetitions of every group of measurement is increased by 1 and LSEE is calculated
10: fork = 1:number of groups in measurement_group
11: indexing k-th group of measurement in matrixes N, A,...
12: index(k);
13: calculation of LSM and LSEE from covariance matrix
14: N2(index) = N2(index)+1;
15: PP = N2*P;
16: Normal_equation = [A*PP*A, B; B', zeros(4,4)]
17: EX = inv(Normal_equation);
18: LSEE = inv(Normal_equation);
19: vector of differences of LSEE for each point
20: LSEE_difference=LSEE - LSEE_0
21: differences for each group of measurement increasing
22: