방위각 제한 (-180 ~ 180) : string 제한

This commit is contained in:
ysCha 2026-01-06 14:39:18 +09:00
parent 72e4aded51
commit 2b29a62616

View File

@ -819,7 +819,12 @@ export const useTrestle = () => {
// 발전 시뮬레이션 용 각도 재계산
const getAzimuth = (parent) => {
const { moduleCompass, surfaceCompass, direction } = parent
if (typeof parent === 'string') {
console.warn('getAzimuth: parent is string, expected object', parent);
return 0; // 또는 적절한 기본값
}
const { moduleCompass, surfaceCompass, direction } = parent || {};
if (surfaceCompass) {
return -surfaceCompass