| | |
| | | Double absoluteAltitude = jsonObject.getDouble("absoluteAltitude"); |
| | | Double relativeAltitude = jsonObject.getDouble("relativeAltitude"); |
| | | Double gimbalYawDegree = jsonObject.getDouble("gimbalYawDegree"); |
| | | Long sj =jsonObject.getLong("createdTime"); |
| | | JSONObject shootPosition = jsonObject.getJSONObject("shootPosition"); |
| | | Double lat = shootPosition.getDouble("lat"); |
| | | Double lng = shootPosition.getDouble("lng"); |
| | | double[] coordinates = extractCoordinates(pointWGStoCGCS(lng, lat)); |
| | | double x = Double.parseDouble(((formatCoordinate(coordinates[1])))); |
| | | double y = Double.parseDouble(((formatCoordinate(coordinates[0])))); |
| | | // double[] coordinates = extractCoordinates(pointWGStoCGCS(lng, lat)); |
| | | // double x = Double.parseDouble(((formatCoordinate(coordinates[1])))); |
| | | // double y = Double.parseDouble(((formatCoordinate(coordinates[0])))); |
| | | //本地数据库没有的数据在FJ表非空用0 |
| | | int psjd = 0; |
| | | int pshgj = 0; |
| | |
| | | String dklx = "0"; |
| | | int fjlx = 1; |
| | | String pstz="Y"; |
| | | Long sj = mediaFile.getCreateTime(); |
| | | String pssj=convertTimestampToDateTime(sj); |
| | | String bsm = UUID.randomUUID().toString(); |
| | | String fjmc = mediaFile.getFileName(); |
| | |
| | | file1 = VideoZipUtil.compressVideo(file, 800000, 128000, 1280, 720); |
| | | FJ = fileToByteArray(file1); |
| | | } |
| | | String sm3 = Sm3Util.calculateSM3Hash(fjhxz+","+pssj+","+y+","+x+","+gimbalYawDegree+","+psjd+","+pshgj+","+psry+","+zsdm); |
| | | String sm3 = Sm3Util.calculateSM3Hash(fjhxz+","+pssj+","+lng+","+lat+","+gimbalYawDegree+","+psjd+","+pshgj+","+psry+","+zsdm); |
| | | |
| | | byte[] hash = sm3.getBytes(); // 注意:使用SM3或其他哈希算法来计算数据的哈希值 |
| | | // 加载私钥 |
| | |
| | | .dklx(dklx) |
| | | .xdgd(relativeAltitude) |
| | | .jdgd(absoluteAltitude) |
| | | .Latitude(x) |
| | | .longitude(y) |
| | | .Latitude(lat) |
| | | .longitude(lng) |
| | | .fj(FJ) |
| | | .fjmc(fjmc) |
| | | .fjlx(fjlx) |