From f2b2de6f68bf9a224292354ca0d49ba3cb804b71 Mon Sep 17 00:00:00 2001 From: HeungTak Lee Date: Fri, 30 Jan 2026 14:32:30 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A0=88=EC=9D=B4=EB=8D=94(000005)=20?= =?UTF-8?q?=EC=B9=B4=EC=9A=B4=ED=8A=B8=20=EC=A0=9C=EC=99=B8=20-=20?= =?UTF-8?q?=ED=86=B5=ED=95=A9=20=EC=97=AC=EB=B6=80=20=EB=AC=B4=EA=B4=80?= =?UTF-8?q?=ED=95=98=EA=B2=8C=20=ED=95=AD=EC=83=81=20=EC=8A=A4=ED=82=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 메인프로젝트(deck.ts:274-278)와 동일하게 signalSourceCode가 RADAR이면 통합/단독 무관하게 카운트에서 항상 제외. 기존: 단독 레이더(!integrate)만 제외 → 통합 레이더가 카운트에 포함되어 VTS_RADAR 필터 ON 시 과다집계 발생 수정: 모든 레이더를 카운트 + 타임아웃 체크에서 통합 조건 제거 원인: 통합그룹의 다른 장비(AIS 등)가 삭제/다크시그널 상태일 때 레이더만 features에 남아 있으면 해당 targetId가 추가 카운트됨 Co-Authored-By: Claude Opus 4.5 --- src/stores/shipStore.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; }