修改角度

main
suixy 2 months ago
parent 81f7169cb8
commit 7216ba8ea2

@ -10,7 +10,7 @@ function lonLatToXY(lon, lat, lat0) {
function calcRectangleFromPoints(points) { function calcRectangleFromPoints(points) {
if (!points || points.length !== 4) { if (!points || points.length !== 4) {
console.log("必须传入4个点"); // console.log("必须传入4个点");
return return
} }
const p1raw = points.find(p => p.name === "点位1") || points[0]; const p1raw = points.find(p => p.name === "点位1") || points[0];
@ -46,7 +46,7 @@ function calcRectangleFromPoints(points) {
function getLocalPositionRelativeToP4(point, rectPoints, rectInfo) { function getLocalPositionRelativeToP4(point, rectPoints, rectInfo) {
if (!rectInfo || typeof rectInfo.angle !== 'number') { if (!rectInfo || typeof rectInfo.angle !== 'number') {
console.log("rectInfo.angle 必须是由 calcRectangleFromPoints 得到的角度"); // console.log("rectInfo.angle 必须是由 calcRectangleFromPoints 得到的角度");
return return
} }

@ -1420,7 +1420,8 @@ const processData = (data) => {
}; };
const local = correctDeviation(getLocalPositionRelativeToP4(point, areaPoints.value, rectInfo)) const local = correctDeviation(getLocalPositionRelativeToP4(point, areaPoints.value, rectInfo))
// console.log(rectInfo) console.log('rectInfo', rectInfo)
console.log('local', local)
boxPos.value = local boxPos.value = local
} }

Loading…
Cancel
Save