From 42db2277472326c386c6da1060571d292a6c853e Mon Sep 17 00:00:00 2001 From: Joseph Richard Date: Thu, 27 Nov 2025 13:34:25 -0700 Subject: [PATCH] SyncState shouldn't assume ANTENNA-DISCONNECTED ANTENNA-DISCONNECTED is only intended for when the antenna is disconnected, so we shouldn't use it as a catch-all for GNSS failures. Fix is ti default to FAILURE-NOFIX rather than ANTENNA-DISCONNECTED as the reason for loss of GNSS. --- plugins/ptp_operator/metrics/logparser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ptp_operator/metrics/logparser.go b/plugins/ptp_operator/metrics/logparser.go index 631ebca8..6502f61c 100644 --- a/plugins/ptp_operator/metrics/logparser.go +++ b/plugins/ptp_operator/metrics/logparser.go @@ -711,14 +711,14 @@ func (p *PTPEventManager) ParseSyncELogs(processName, configName, output string, // GetGPSFixState ... returns gps state by computing gpsFix and offset derived state func (p *PTPEventManager) GetGPSFixState(gpsFix int64, syncState ptp.SyncState) (state ptp.SyncState) { - state = ptp.ANTENNA_DISCONNECTED + state = ptp.FAILURE_NOFIX // 0=NOFIX, 1=Dead Reckoning Only, 2=2D-FIX, 3=3D-FIX, 4=GPS+dead reckoning fix, 5=Time only fix if syncState == ptp.LOCKED { state = ptp.SYNCHRONIZED } else if gpsFix >= 3 { state = ptp.ACQUIRING_SYNC // if state was declared as FREERUN due to Offset outside threshold set to ACQUIRING_SYNC } else if gpsFix == 0 { - state = ptp.ANTENNA_DISCONNECTED + state = ptp.FAILURE_NOFIX } else if gpsFix < 3 { state = ptp.ACQUIRING_SYNC }