diff --git a/src/stores/shipStore.js b/src/stores/shipStore.js index c3ff18f4..8aebd065 100644 --- a/src/stores/shipStore.js +++ b/src/stores/shipStore.js @@ -78,7 +78,7 @@ function parseReceivedTime(receivedTime) { // ===================== const INSHORE_TIMEOUT_MS = 12 * 60 * 1000; // 720초 (12분) — 영해안: LOST=0, 무수신 시 삭제 const OFFSHORE_TIMEOUT_MS = 65 * 60 * 1000; // 3900초 (65분) — 영해밖: LOST=1, 무수신 시 다크시그널 전환 -const RADAR_TIMEOUT_MS = 90 * 1000; // 90초 — 단독 레이더 비통합, 무수신 시 삭제 +const RADAR_TIMEOUT_MS = 60 * 1000; // 90초 — 단독 레이더 비통합, 무수신 시 삭제 const SIGNAL_SOURCE_RADAR = '000005'; // ===================== @@ -152,8 +152,11 @@ function calculateCounts(features, darkSignalIds, isIntegrate, kindVisibility, s return; } - // ② 단독 레이더 → 카운트 제외 - if (ship.signalSourceCode === SIGNAL_SOURCE_RADAR && !ship.integrate) return; + // ② 레이더(000005) → 카운트에 포함하지 않으므로 항상 스킵 + // 참조: mda-react-front/src/common/deck.ts (line 274-278) + // 통합 레이더도 제외: targetId 중복 제거로 보장되지 않는 엣지케이스 방지 + // (통합그룹의 다른 장비가 삭제/다크시그널 상태일 때 레이더만 남으면 과다집계) + if (ship.signalSourceCode === SIGNAL_SOURCE_RADAR) return; // ⑤ 모든 장비 비활성 → 다크시그널 if (!isAnyEquipmentActive(ship)) { @@ -401,7 +404,9 @@ const useShipStore = create(subscribeWithSelector((set, get) => ({ features.forEach((ship, featureId) => { if (darkSignalIds.has(featureId)) return; - if (ship.signalSourceCode === SIGNAL_SOURCE_RADAR && !ship.integrate) { + // ② 레이더(000005) → 타임아웃이면 삭제, 아니면 스킵 (카운트 제외 대상) + // 참조: mda-react-front/src/common/deck.ts (line 274-278) + if (ship.signalSourceCode === SIGNAL_SOURCE_RADAR) { if (now - ship.receivedTimestamp > RADAR_TIMEOUT_MS) deleteIds.push(featureId); return; }