0001
0002
0003
0004
0005
0006
0007
0008
0009 global struct_own_forces;
0010 global image_struct;
0011 global struct_own_forces;
0012 global struct_sensors;
0013 global struct_enemy_comps;
0014 global noOfOwn_forces;
0015 global noOfEnemyCompanies;
0016 global noOfSensors;
0017 global south_enemy;
0018 global north_enemy1;
0019 global north_enemy2;
0020 global simulationTime;
0021 a = 1;
0022 clf
0023 im_handle = image(image_struct.image); hold on
0024 text(150, 277, ['Simulation time = ' num2str(simulationTime)],'LineWidth', 2, 'BackgroundColor','y', 'EdgeColor', 'k', 'FontSize', 16)
0025
0026
0027 for i = 1:noOfEnemyCompanies
0028
0029
0030 plts = struct_enemy_comps(i).plt;
0031 no_of_platoons = length(plts);
0032 for p=1:no_of_platoons
0033 format = '.';
0034 switch p
0035 case 1,
0036 format = [format 'r'];
0037 case 2,
0038 format = [format 'b'];
0039 case 3,
0040 format = [format 'k'];
0041 end
0042 drawParticles( plts(p).particles, format );
0043 end
0044
0045
0046 [pos_enemy] = getGround_TruthPos(i);
0047 mean_pos_enemy = mean(pos_enemy);
0048 drowEnemy(mean_pos_enemy(2),mean_pos_enemy(1),1);
0049
0050
0051 [struct_currentData] = getCurrentEsimatedData(1,i);
0052 mean_pos_enemy = mean(struct_currentData.enemy_pos);
0053 drowEnemy(mean_pos_enemy(2),mean_pos_enemy(1),0);
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 [comp_no] = showSensorTargetRelation(struct_enemy_comps(i).id);
0067 end;
0068
0069
0070 for i = 1:noOfOwn_forces
0071 [pos_own] = struct_own_forces(i).pos;
0072 drowVi(pos_own(2), pos_own(1));
0073 end;
0074
0075
0076 for i = 1:noOfSensors
0077 [pos_sensor] = struct_sensors(i).pos;
0078 [id] = struct_sensors(i).id;
0079 id = char(id(1:3));
0080 plotSensors(pos_sensor(2), pos_sensor(1), id);
0081 if strcmp(id, 'UAV')
0082 visulalizeSensorPath( pos_sensor, struct_sensors(i).sensor_plan );
0083 end
0084 end;
0085 pause(1);