这个示例展示了如何创建和显示一个多平台场景,该场景包含一个地面固定雷达、一个转弯飞机、一个恒定速度的飞机和一个移动的地面车辆。转弯飞机沿抛物线飞行,下降速度为20米/秒。
指定0.5 Hz的方案刷新率。对于150步,方案的持续时间为300秒。
updaterate = 0.5;n = 150;
设置转弯飞机使用加速
的模型淘汰
系统对象™。指定飞机从地面雷达的距离和方位角及其仰角的初始位置。飞机在60°方位角距离雷达10公里,高度6公里。飞机正以10m /s²的负速度加速x-方向。
airplane1range = 10.0e3;Airplane1azimuth = 60.0;airplane1art = 6.0e3;Airplane1POS0 = [COSD(Airplane1azimuth)* Airplane1Range;...信德(airplane1Azimuth) * airplane1range; airplane1alt);airplane1Vel0 = (400.0, -100.0, -20);airplane1Accel = (-10.0; 0.0; 0.0);airplane1platform =分阶段。平台(“MotionModel”,“加速”,...“AccelerationSource”,输入端口的,“InitialPosition”airplane1Pos0,...“InitialVelocity”airplane1Vel0,“OrientationAxesOutputPort”,真的,...“InitialOrientationAxes”,眼睛(3));
在全球坐标系原点处建立静止地面雷达。为了模拟旋转雷达,在处理回路中改变地面雷达波束转向角度。
groundRadarPos = (0, 0, 0) ';groundRadarVel = (0, 0, 0) ';groundradarplatform =分阶段。平台(“MotionModel”,“速度”,...“InitialPosition”groundRadarPos,“速度”,陆地扶手,...“InitialOrientationAxes”,眼睛(3));
使地面车辆以恒定速度移动。
groundVehiclePos = (5 e3, 2 e3, 0) ';groundVehicleVel = (50 50 0) ';groundvehicleplatform =分阶段。平台(“MotionModel”,“速度”,...“InitialPosition”groundVehiclePos,“速度”groundVehicleVel,...“InitialOrientationAxes”,眼睛(3));
让第二架飞机也以恒定速度移动。
airplane2Pos = (8.5 e3, 1 e3, 6000) ';airplane2Vel = (-300100, 20) ';airplane2platform =分阶段。平台(“MotionModel”,“速度”,...“InitialPosition”airplane2Pos,“速度”airplane2Vel,...“InitialOrientationAxes”,眼睛(3));
设置场景查看器。指定雷达的波束范围为8公里,垂直波束宽度为30°,水平波束宽度为2°。用位置、速度、高度和距离标注轨道。
Beamsteering = [0; 50];查看器= Phased.ScenarioViewer(“BeamRange”,8.0e3,波束宽度的,[2; 30],'updaterate',updaterate,...“PlatformNames”,{“地面雷达”,“把飞机”,'车辆',《飞机2》},“ShowPosition”,真的,...'showspeed',真的,“ShowAltitude”,真的,“ShowLegend”,真的,“ShowRange”,真的,...'标题',“多平台的场景”,'Beamsteering',beamsteering);
步骤通过显示处理循环,更新雷达和目标位置。每一步将地面雷达转向角度旋转4度。
为n = 1: n [grounddradarpos, grounddradarvel] = grounddradarplatform (updateRate);[airplane1Pos, airplane1Vel airplane1Axes] = airplane1platform (updateRate airplane1Accel);[vehiclePos, vehicleVel] = groundvehicleplatform (updateRate);[airplane2Pos, airplane2Vel] = airplane2platform (updateRate);查看器(groundRadarPos groundRadarVel [airplane1Pos vehiclePos, airplane2Pos),...[airplane1Vel, vehicleVel airplane2Vel]);BeamSteering = viewer.BeamSteering (1);BeamSteering = mod(BeamSteering + 4,360.0);如果Beamsteering> 180.0 Beamsteering = Beamstering - 360.0;结束viewer.BeamSteering (1) = BeamSteering;暂停(0.2);结束