From fb795bb670478bd7277c982d5593982f633b9a89 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 26 Oct 2026 17:39:08 -0400 Subject: [PATCH] satellitetracker: Initialize previous azimuth Initialize prevAz to avoid using an indeterminate azimuth value when checking satellite passes through zero degrees. Identified by cppcheck. Signed-off-by: Robin Getz --- plugins/feature/satellitetracker/satellitetrackersgp4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/feature/satellitetracker/satellitetrackersgp4.cpp b/plugins/feature/satellitetracker/satellitetrackersgp4.cpp index c8afa0f38..3f1956524 100644 --- a/plugins/feature/satellitetracker/satellitetrackersgp4.cpp +++ b/plugins/feature/satellitetracker/satellitetrackersgp4.cpp @@ -198,7 +198,7 @@ bool getPassesThrough0Deg(const QString& tle0, const QString& tle1, const QStrin double timeStep = (losTime - aosTime).TotalSeconds() / steps; - double prevAz; + double prevAz = 0.0; for (int i = 0; i < steps; i++) { // Calculate satellite position