| | |
| | | } |
| | | LLong loginId = (LLong) GlobalVariable.loginMap.get(cameraId); |
| | | try { |
| | | if(ptz.get("p")==null||ptz.get("t")==null||ptz.get("z")==null) |
| | | { |
| | | return AjaxResult.error("ptz参数不能为空"); |
| | | } |
| | | int p = (int) (ptz.get("p") * 10); |
| | | int t = (int) (ptz.get("t") * 10); |
| | | t = t > 900 ? 3600 - t : t * -1; |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> getPtz1(CameraCmd cmd) { |
| | | return null; |
| | | return getPtz(cmd); |
| | | } |
| | | |
| | | /** |
| | |
| | | try { |
| | | ArdCameras cameras = ardCamerasService.selectArdCamerasById(cameraId); |
| | | double[] cameraPositon = new double[]{cameras.getLongitude(), cameras.getLatitude(), cameras.getAltitude()}; |
| | | double[] targetPositions = new double[]{cmd.getTargetPosition().getLongitude(),cmd.getTargetPosition().getLatitude()}; |
| | | double[] targetPositions = cmd.getTargetPosition(); |
| | | double[] cameraPTZ = GisUtil.getCameraPTZ(cameraPositon, targetPositions, 20, 150); |
| | | int p = (int) (cameraPTZ[0] * 10); |
| | | int t = (int) (cameraPTZ[1] * 10); |