SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. figure(10)
  2. samples = find(Hostlog.ActtnDataFromCllsnRednByBrkgCtrl.DecelEna ~= 0);  % AEB
  3. fus_id = Hostlog.CritLgtCdnForIntv.PrimTarIntv.Idn(samples);   % AEB
  4. [unique_obj_ids, ia, ic] =  unique(fus_id);
  5. result_matrix = zeros(1, 7);
  6. for i = 1:length(unique_obj_ids)
  7.     obj_idx = find(Hostlog.FusedFrontObject.Properties.id(samples(ia(i)), :) == unique_obj_ids(i));
  8.     [row, column] = find(Hostlog.FusedFrontObject.Properties.id(:, :) == unique_obj_ids(i));
  9.     sorted = sortrows([row, column]);
  10.     result_matrix = [ zeros(length(row), 7) ; result_matrix];
  11.     for s = 1:length(row)
  12.         cam_id = Hostlog.FusedFrontObject.Properties.visionId(sorted(s, 1), obj_idx);
  13.         cam_idx = find(Hostlog.FlcObject.VisionObjects.id(sorted(s, 1), :) == cam_id);
  14.         rad_id = Hostlog.FusedFrontObject.Properties.radarId(sorted(s, 1), obj_idx);
  15.         rad_idx = find(Hostlog.FlrObject.RadarObjects.id(sorted(s, 1), :) == rad_id);
  16.         result_matrix(s, 1) = sorted(s, 1);
  17.         if cam_id == 0 | isempty(cam_idx)
  18.             result_matrix(s, 2) = -100;
  19.             result_matrix(s, 3) = -100;
  20.             result_matrix(s, 4) = Hostlog.FlrObject.RadarObjects.latVelocity(sorted(s, 1), rad_idx);
  21.             result_matrix(s, 5) = Hostlog.FlrObject.RadarObjects.longVelocity(sorted(s, 1), rad_idx);
  22.             result_matrix(s, 6) = -100;
  23.             result_matrix(s, 7) = Hostlog.FlrObject.RadarObjects.longAcceleration(sorted(s, 1), rad_idx);
  24.         elseif rad_id == 0 | isempty(rad_idx)
  25.             result_matrix(s, 2) = Hostlog.FlcObject.VisionObjects.latVelocity(sorted(s, 1), cam_idx);
  26.                 result_matrix(s, 3) = Hostlog.FlcObject.VisionObjects.longVelocity(sorted(s, 1), cam_idx);
  27.                 result_matrix(s, 4) = -200;
  28.                 result_matrix(s, 5) = -200;
  29.                 result_matrix(s, 6) = Hostlog.FlcObject.VisionObjects.longAcceleration(sorted(s, 1), cam_idx);
  30.                 result_matrix(s, 7) = -200;
  31.         else
  32.                 result_matrix(s, 2) = Hostlog.FlcObject.VisionObjects.latVelocity(sorted(s, 1), cam_idx);
  33.                 result_matrix(s, 3) = Hostlog.FlcObject.VisionObjects.longVelocity(sorted(s, 1), cam_idx);
  34.                 result_matrix(s, 4) = Hostlog.FlrObject.RadarObjects.latVelocity(sorted(s, 1), rad_idx);
  35.                 result_matrix(s, 5) = Hostlog.FlrObject.RadarObjects.longVelocity(sorted(s, 1), rad_idx);
  36.                 result_matrix(s, 6) = Hostlog.FlcObject.VisionObjects.longAcceleration(sorted(s, 1), cam_idx);
  37.                 result_matrix(s, 7) = Hostlog.FlrObject.RadarObjects.longAcceleration(sorted(s, 1), rad_idx);
  38.         end
  39.     end
  40. end
  41. u = uitable('Position',[0 0 600 1000],'data',result_matrix)
  42. pause(2)
  43. set(u, 'ColumnName', {'Sample', 'FLC_VLat', 'FLC_VLgt', 'FLR_VLat', 'FLR_VLgt', 'FLC_Algt', 'FLR_ALgt'})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top