From 52694643b72be6dfeee53278ff3d39d9d92a523b Mon Sep 17 00:00:00 2001
From: Lewin Probst <info@emirror.de>
Date: Sun, 24 Nov 2019 13:28:31 +0100
Subject: [PATCH] The clock error now has always size of X by 3.

---
 lib/+artoa/+float/calculateCombinationSegment.m | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/+artoa/+float/calculateCombinationSegment.m b/lib/+artoa/+float/calculateCombinationSegment.m
index 15c1ee6..34566a1 100644
--- a/lib/+artoa/+float/calculateCombinationSegment.m
+++ b/lib/+artoa/+float/calculateCombinationSegment.m
@@ -134,13 +134,13 @@ switch trackingMethod
             if strcmp(pTrackingMethod, 'exclusive least square') ...
                 && (sum(~isnan(distanceToSoundsources{oDates})) ~= length(soundsourcePositions))
                 segmentPositions = [segmentPositions; [NaN, NaN]];
-                segmentClockError = [segmentClockError; NaN(1, length(soundsourceNames))];
+                segmentClockError = [segmentClockError; NaN(1, 3)];
                 continue;
             end
             segmentPositions = [segmentPositions; ...
                 rad2deg(artoa.vendor.ls_converge(segmentPositions(end, :), length(soundsourceNames), soundsourcePositions, distanceToSoundsources{oDates}, pSoundVelocity(1)/1000)) ...
             ];
-            segmentClockError = [segmentClockError; NaN(1, length(soundsourceNames))];
+            segmentClockError = [segmentClockError; NaN(1, 3)];
         end
     case 'circular'
         for oDates = 1:length(intersectedToaDates)
@@ -148,14 +148,14 @@ switch trackingMethod
             segmentPositions = [segmentPositions; ...
                 rad2deg(artoa.vendor.xnavai(deg2rad(soundsourcePositions), distances, deg2rad(referencePosition), 2)) ...
             ];
-            segmentClockError = [segmentClockError; NaN(1, length(soundsourceNames))];
+            segmentClockError = [segmentClockError; NaN(1, 3)];
         end
     case 'hyperbolic'
         for oDates = 1:length(intersectedToaDates)
             distances = distanceToSoundsources{oDates};
             if any(isnan(distances))
                 segmentPositions = [segmentPositions; [NaN NaN]];
-                segmentClockError = [segmentClockError; NaN(1, length(soundsourceNames))];
+                segmentClockError = [segmentClockError; NaN(1, 3)];
                 continue;
             end
             segmentPositions = [segmentPositions; ...
-- 
GitLab