SHARE
TWEET

Untitled

a guest Jan 24th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. figure(90)
  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. no_of_columns = 10;
  6. result_matrix = zeros(1, no_of_columns);
  7. for i = 1:length(unique_obj_ids)
  8.     obj_idx = find(Hostlog.FusedFrontObject.Properties.id(samples(ia(i)), :) == unique_obj_ids(i));
  9.     [row, column] = find(Hostlog.FusedFrontObject.Properties.id(:, :) == unique_obj_ids(i));
  10.     sorted = sortrows([row, column]);
  11.     result_matrix = [ zeros(length(row), no_of_columns) ; result_matrix];
  12.     for s = 1:length(row)
  13.         cam_id = Hostlog.FusedFrontObject.Properties.visionId(sorted(s, 1), obj_idx);
  14.         cam_idx = find(Hostlog.FlcObject.VisionObjects.id(sorted(s, 1), :) == cam_id);
  15.         rad_id = Hostlog.FusedFrontObject.Properties.radarId(sorted(s, 1), obj_idx);
  16.         rad_idx = find(Hostlog.FlrObject.RadarObjects.id(sorted(s, 1), :) == rad_id);
  17.         result_matrix(s, 1) = sorted(s, 1);
  18.         if (cam_id == 0 || isempty(cam_idx)) && (rad_id == 0 || isempty(rad_idx))
  19.             result_matrix(s, 2) = -100;
  20.             result_matrix(s, 3) = -100;
  21.             result_matrix(s, 4) = -200;
  22.             result_matrix(s, 5) = -200;
  23.             result_matrix(s, 6) = -200;
  24.             result_matrix(s, 7) = -200;
  25.         elseif cam_id == 0 || isempty(cam_idx)
  26.             result_matrix(s, 2) = -100;
  27.             result_matrix(s, 3) = -100;
  28.             result_matrix(s, 4) = Hostlog.FlrObject.RadarObjects.latVelocity(sorted(s, 1), rad_idx);
  29.             result_matrix(s, 5) = Hostlog.FlrObject.RadarObjects.longVelocity(sorted(s, 1), rad_idx);
  30.             result_matrix(s, 6) = -100;
  31.             result_matrix(s, 7) = Hostlog.FlrObject.RadarObjects.longAcceleration(sorted(s, 1), rad_idx);
  32.         elseif rad_id == 0 || isempty(rad_idx)
  33.             result_matrix(s, 2) = Hostlog.FlcObject.VisionObjects.latVelocity(sorted(s, 1), cam_idx);
  34.             result_matrix(s, 3) = Hostlog.FlcObject.VisionObjects.longVelocity(sorted(s, 1), cam_idx);
  35.             result_matrix(s, 4) = -200;
  36.             result_matrix(s, 5) = -200;
  37.             result_matrix(s, 6) = Hostlog.FlcObject.VisionObjects.longAcceleration(sorted(s, 1), cam_idx);
  38.             result_matrix(s, 7) = -200;
  39.         else
  40.             result_matrix(s, 2) = Hostlog.FlcObject.VisionObjects.latVelocity(sorted(s, 1), cam_idx);
  41.             result_matrix(s, 3) = Hostlog.FlcObject.VisionObjects.longVelocity(sorted(s, 1), cam_idx);
  42.             result_matrix(s, 4) = Hostlog.FlrObject.RadarObjects.latVelocity(sorted(s, 1), rad_idx);
  43.             result_matrix(s, 5) = Hostlog.FlrObject.RadarObjects.longVelocity(sorted(s, 1), rad_idx);
  44.             result_matrix(s, 6) = Hostlog.FlcObject.VisionObjects.longAcceleration(sorted(s, 1), cam_idx);
  45.             result_matrix(s, 7) = Hostlog.FlrObject.RadarObjects.longAcceleration(sorted(s, 1), rad_idx);
  46.         end
  47.         result_matrix(s, 8) = Hostlog.FusedFrontObject.States.latVelocity(sorted(s, 1), obj_idx);
  48.         result_matrix(s, 9) = Hostlog.FusedFrontObject.States.longVelocity(sorted(s, 1), obj_idx);
  49.         result_matrix(s, 10) = Hostlog.FusedFrontObject.States.longAcceleration(sorted(s, 1), obj_idx);
  50.    
  51.     end
  52. end
  53. result_matrix(end, :) = [];
  54. u = uitable('Position',[0 0 1000 1000],'data',result_matrix);
  55. pause(2)
  56. set(u, 'ColumnName', {'Sample', 'FLC_VLat', 'FLC_VLgt', 'FLR_VLat', 'FLR_VLgt', 'FLC_Algt', 'FLR_ALgt', 'SF_Vlat', 'SF_VLgt', 'SF_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