资源简介
源代码来源于辅助驾驶仿真软件Prescan,主要涉及一些AEB的算法,比较基础,属于入门级别
代码片段和文件信息
function AEBS_EGOplot
% Drawing plot of velocity and acceleration of the ego vehicle at the end of simulation.
%% Data
V = load(‘plot_data_velocity.mat‘);
a = load(‘plot_data_acceleration.mat‘);
flag26 = load(‘plot_data_flag26.mat‘);
flag16 = load(‘plot_data_flag16.mat‘);
flag06 = load(‘plot_data_flag06.mat‘);
t = load(‘plot_data_time.mat‘);
r = load(‘plot_data_range.mat‘);
V = V.velocity(2:);
a = a.acceleration(2:);
flag26 = flag26.flag26(2:);
flag16 = flag16.flag16(2:);
flag06 = flag06.flag06(2:);
t = t.time(2:);
r = r.range(2:);
%% Calculate flags and impact time
i = 2;
T26=0;
while (T26==0) && (i if ((flag26(i) == 1) && (flag26(i-1) == 0))
T26 = t(i);
end
i = i + 1;
end
i = 2;
T16=0;
while (T16==0) && (i if ((flag16(i) == 1) && (flag16(i-1) == 0) && (flag26(i) == 1))
T16 = t(i);
end
i = i + 1;
end
i = 2;
T06=0;
while (T06==0) && (i if ((flag06(i) == 1) && (flag06(i-1) == 0) && (flag16(i) == 1))
T06 = t(i);
end
i = i + 1;
end
if (T26 == 0) && (T16 == 0)
T06 = 0;
end
%% Impact speed
Timp = 0;
Vimp = 300;
r_temp = r;
indx = find(r==0);
r_temp(indx) = inf; %#ok
exitflag = 1;
i = 2;
while (i < length(r_temp)) && exitflag
if (r_temp(i) <= r_temp(i-1)) && flag06(i)
Timp = t(i);
else
if Timp ~= 0
exitflag = 0;
end
end
i = i + 1;
end
i = i - 1;
if i < length(t)-1
if r(i) > 0.26
Timp = 0;
end
else
if r(i) > 2
Timp = 0;
end
end
% Impact velocity
if(Timp ~= 0)
Vimp = V(i);
end
%Time conversion
t = t - Timp;
if T06 ~= 0
T06 = T06 - Timp;
end
if T16 ~= 0
T16 = T16 - Timp;
end
if T26 ~= 0
T26 = T26 - Timp;
end
%% Cut off needless time before impact
k = 0;
H = length(t);
for i = 1:H
if t(i)<-5
k = k+1;
end
end
V = V(k+1:H);
a = a(k+1:H);
t = t(k+1:H);
%% Compute Vmin i Vmax
Vmin = 500;
Vmax = 0;
for i = 1:length(V)
if Vmin>V(i)
Vmin = V(i);
end
if Vmax Vmax = V(i);
end
end
%% Plot part
% Close old figure if exists
FigureHandle = findobj(‘Name‘‘AEBS Speed Profile‘);
if ~isempty(FigureHandle)
close(FigureHandle)
end
% Draw new one
if ~isempty(t)
h_fig = figure(‘Name‘‘AEBS Speed Profile‘ ‘Numbertitle‘‘Off‘);
[H H1 H2] = plotyy(tVta);
% Set axes properties
set(H(2)‘YTickMode‘‘auto‘);
set(H(1)‘YTickMode‘‘auto‘);
set(H ‘XGrid‘‘On‘);
set(H(1)‘YGrid‘‘On‘);
set(H(2)‘YGrid‘‘On‘);
set(H1‘LineWidth‘2.5);
set(H2‘LineWidth‘2.5);
set(H1‘Color‘[0 0 1]);
set(H2‘Color‘[0 0.5 0]);
ylabel(H(1)‘Velocity [km/h]‘);
ylabel(H(2)‘Acceleration [m/s^2]‘);
H1Min = Vmin-3; H1Max = 1.1*Vmax;
axis([t(1)-0.5 t(length(t))+0.5 H1Min H1Max]);
set(H‘XLim‘[t(1)-0.5 t(length(t))+0.5]);
H2Min = -13.2; H2Max = 14.1;
set(H(2)‘YLim‘[H2Min H2Max]);
H2a = ( H2Max - H
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Actors
文件 244849 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\ADAC_AEBS_FailOperationTest_A1.pex
文件 5793 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\ADAC_AEBS_FailOperationTest_A1.vwr
文件 397 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\ADAC_AEBS_FailOperationTest_A1.vwrs
文件 3191757 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\ADAC_AEBS_FailOperationTest_A1_cs.mdl
文件 2143 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\ADAC_AEBS_FailOperationTest_A1_hash.mat
文件 51228 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\AsphaltStandard_256.png
文件 124 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\IndianRed_2.png
文件 1339 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\InformationBoard_1.jpg
文件 2596 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\InformationBoard_1.osg
文件 5851 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\J3.png
文件 8419 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\J37.png
文件 25023 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\Pavement.png
文件 22411 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\Pavement_1.png
文件 1760 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\Sphere_1.osg
文件 1339 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\TrafficSignPoleNL_1.jpg
文件 13500 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\TrafficSignPoleNL_1.osg
文件 118 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\TrafficSignPoleNL_1.rd.png
文件 1339 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\TrafficSignPoleNL_2.jpg
文件 13501 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\TrafficSignPoleNL_2.osg
文件 124 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\TrafficSign_sideBack.png
文件 121 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\White_2.png
文件 193154 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Models\world.osg
目录 0 2018-05-29 15:34 AEBS\ADAC_AEBS_FailOperationTest_A1\Models
文件 21605 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Resources\InformationSign\ADAC_logo2.png
目录 0 2018-05-29 15:34 AEBS\ADAC_AEBS_FailOperationTest_A1\Resources\InformationSign
文件 464 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Resources\noTextureImg.png
目录 0 2018-05-29 15:34 AEBS\ADAC_AEBS_FailOperationTest_A1\Resources
文件 554 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Temp\ADAC_AEBS_FailOperationTest_A1.swi
文件 0 2018-05-29 15:33 AEBS\ADAC_AEBS_FailOperationTest_A1\Temp\ADAC_AEBS_FailOperationTest_A1.swt
............此处省略813个文件信息
- 上一篇:fpga与eeprom通信
- 下一篇:微型计算机技术实验指导书可复制pdf版
相关资源
- CUDA实现的图像融合算法
- Real-Time Collision Detection实时碰撞检测算
- 基于有限元的光声成像算法研究
- ECG心电算法陷波,低通,小波变换
- 运筹学基础及应用
- CURE算法的源程序
- 非局部正则化的压缩感知图像重建算
- 车牌识别算法的研究和实现
- GPS载波相位定位算法研究与仿真.caj
- 2016国科大算法分析与设计考试题
- 多目标自适应和声搜索算法
- 数据挖掘-数据-模型-算法
- GA+ICP代码
- 页面置换算法 操作系统
- 阴影图提取算法
- 基于深度神经网络的用户会话推荐算
- 基于小波变换的语音信号去噪及其D
- ssda算法源码
- 计算智能大作业合集
- 最优化理论与算法 习题解答
- 马周游及旅行商问题
- From Mathematics to Generic Programming 数学与
- 使用Mapinfo中Voronoi算法自动生成LAC或
- PnP 算法简介 代码解析
- 点云拼接和拟合算法
- 关于求线段和线段,线段和圆弧,圆
- Fast ICP算法源码
- 运输问题超级算法
- 基于Alize的GMM-UBM算法
- EKF-SLAM算法程序
评论
共有 条评论