Browse Source

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 <rgetz503@gmail.com>
chirpmodem-v8.1.0
Robin Getz 4 weeks ago
parent
commit
fb795bb670
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 2
      plugins/feature/satellitetracker/satellitetrackersgp4.cpp

2
plugins/feature/satellitetracker/satellitetrackersgp4.cpp

@ -198,7 +198,7 @@ bool getPassesThrough0Deg(const QString& tle0, const QString& tle1, const QStrin @@ -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

Loading…
Cancel
Save