| | |
| | | import com.ruoyi.device.camera.domain.ArdCameras; |
| | | import com.ruoyi.device.camera.domain.CameraCmd; |
| | | import com.ruoyi.device.camera.service.IArdCamerasService; |
| | | import com.ruoyi.device.camera.service.ICameraSdkService; |
| | | import com.ruoyi.device.channel.domain.ArdChannel; |
| | | import com.ruoyi.device.channel.service.IArdChannelService; |
| | | import com.ruoyi.media.domain.Vtdu; |
| | |
| | | private IArdChannelService ardChannelService; |
| | | @Resource |
| | | private IVtduService vtduService; |
| | | |
| | | @Resource |
| | | ICameraSdkService cameraSdkService; |
| | | @Value("${minio.endpoint}") |
| | | private String minioEndPoint; |
| | | @Resource |
| | |
| | | double[] cameraPositon = new double[]{cameras.getLongitude(), cameras.getLatitude(), cameras.getAltitude()}; |
| | | double[] targetPositions = cmd.getTargetPosition(); |
| | | double[] cameraPTZ = GisUtil.getCameraPTZ(cameraPositon, targetPositions, 20, 150); |
| | | //修正俯仰 |
| | | double correctPitch = cameraSdkService.correctPitch(cmd); |
| | | double newt = cameraPTZ[1] + correctPitch; |
| | | int p = (int) (cameraPTZ[0] * 10); |
| | | int t = (int) (cameraPTZ[1] * 10); |
| | | int t = (int) (newt * 10); |
| | | int z = (int) (cameraPTZ[2]); |
| | | boolean bool = netsdk.CLIENT_DHPTZControlEx(loginId, chanNo - 1, NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_EXACTGOTO, p, t, z, 0); |
| | | if (!bool) { |