방위각 제한 (-180 ~ 180) : string 제한 #554
@ -819,7 +819,12 @@ export const useTrestle = () => {
|
|||||||
|
|
||||||
// 발전 시뮬레이션 용 각도 재계산
|
// 발전 시뮬레이션 용 각도 재계산
|
||||||
const getAzimuth = (parent) => {
|
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) {
|
if (surfaceCompass) {
|
||||||
return -surfaceCompass
|
return -surfaceCompass
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user