diff --git a/cmake/Modules/FindAptDec.cmake b/cmake/Modules/FindAptDec.cmake index 6b8953962..5443a4f1f 100644 --- a/cmake/Modules/FindAptDec.cmake +++ b/cmake/Modules/FindAptDec.cmake @@ -5,9 +5,9 @@ IF(NOT APT_FOUND) FIND_PATH( APT_INCLUDE_DIR NAMES apt.h - HINTS ${APT_DIR}/include - PATHS /usr/local/include - /usr/include + HINTS ${APT_DIR}/include/apt + PATHS /usr/local/include/apt + /usr/include/apt ) FIND_LIBRARY( diff --git a/cmake/Modules/FindSgp4.cmake b/cmake/Modules/FindSgp4.cmake index 9f95634c9..96dfbc713 100644 --- a/cmake/Modules/FindSgp4.cmake +++ b/cmake/Modules/FindSgp4.cmake @@ -4,10 +4,10 @@ IF(NOT SGP4_FOUND) FIND_PATH( SGP4_INCLUDE_DIR - NAMES SGP4/SGP4.h - HINTS ${SGP4_DIR}/include - PATHS /usr/local/include - /usr/include + NAMES SGP4.h + HINTS ${SGP4_DIR}/include/SGP4 + PATHS /usr/local/include/SGP4 + /usr/include/SGP4 ) FIND_LIBRARY( diff --git a/plugins/feature/satellitetracker/CMakeLists.txt b/plugins/feature/satellitetracker/CMakeLists.txt index 18ba79a44..ccf56fd06 100644 --- a/plugins/feature/satellitetracker/CMakeLists.txt +++ b/plugins/feature/satellitetracker/CMakeLists.txt @@ -53,7 +53,7 @@ if(NOT SERVER_MODE) set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME featuresatellitetrackersrv) - set(TARGET_LIB "") + set(TARGET_LIB Qt5::Positioning) set(TARGET_LIB_GUI "") set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() diff --git a/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp b/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp index 09ca2c546..83e610600 100644 --- a/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp +++ b/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp @@ -255,6 +255,7 @@ void SatelliteDeviceSettingsGUI::on_m_deviceSetWidget_currentTextChanged(const Q // Update doppler combo, to correspond to selected preset void SatelliteDeviceSettingsGUI::on_m_presetWidget_currentIndexChanged(int index) { + (void) index; addChannels(); } diff --git a/plugins/feature/satellitetracker/satelliteradiocontroldialog.cpp b/plugins/feature/satellitetracker/satelliteradiocontroldialog.cpp index 319ac766a..a8fdefd38 100644 --- a/plugins/feature/satellitetracker/satelliteradiocontroldialog.cpp +++ b/plugins/feature/satellitetracker/satelliteradiocontroldialog.cpp @@ -101,6 +101,8 @@ void SatelliteRadioControlDialog::on_remove_clicked() void SatelliteRadioControlDialog::on_satelliteSelect_currentIndexChanged(int index) { + (void) index; + // Save details from current GUI elements for (int i = 0; i < m_devSettingsGUIs.size(); i++) m_devSettingsGUIs[i]->accept(); diff --git a/plugins/feature/satellitetracker/satelliteradiocontroldialog.h b/plugins/feature/satellitetracker/satelliteradiocontroldialog.h index 260e981ee..7bd92ce3f 100644 --- a/plugins/feature/satellitetracker/satelliteradiocontroldialog.h +++ b/plugins/feature/satellitetracker/satelliteradiocontroldialog.h @@ -20,7 +20,7 @@ #include -#include "ui_SatelliteRadioControlDialog.h" +#include "ui_satelliteradiocontroldialog.h" #include "satellitetrackersettings.h" #include "satellitedevicesettingsgui.h" #include "satnogs.h" diff --git a/plugins/feature/satellitetracker/satellitetrackergui.cpp b/plugins/feature/satellitetracker/satellitetrackergui.cpp index 5f2998eef..d578fabc8 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.cpp +++ b/plugins/feature/satellitetracker/satellitetrackergui.cpp @@ -651,6 +651,7 @@ void SatelliteTrackerGUI::on_prevPass_clicked() void SatelliteTrackerGUI::on_chartSelect_currentIndexChanged(int index) { + (void) index; plotChart(); } @@ -668,17 +669,6 @@ static double interpolate(double x0, double y0, double x1, double y1, double x) return (y0*(x1-x) + y1*(x-x0)) / (x1-x0); } -static int findClosestPoint(qint64 v, QLineSeries *series) -{ - int i; - for (i = 0; i < series->count(); i++) - { - if (v < series->at(i).x()) - return i; - } - return i-1; -} - // Plot pass in polar coords void SatelliteTrackerGUI::plotPolarChart() { @@ -863,10 +853,11 @@ void SatelliteTrackerGUI::plotPolarChart() QLineSeries *nowSeries = new QLineSeries(); + QDateTime endTime = currentTime.addSecs(1); getPassAzEl(nullptr, nullptr, nowSeries, sat->m_tle->m_tle0, sat->m_tle->m_tle1, sat->m_tle->m_tle2, m_settings.m_latitude, m_settings.m_longitude, m_settings.m_heightAboveSeaLevel/1000.0, - currentTime, currentTime.addSecs(1)); + currentTime, endTime); nowSeries->setPointLabelsFormat(m_settings.m_target); nowSeries->setPointLabelsVisible(true); @@ -1120,6 +1111,8 @@ void SatelliteTrackerGUI::updateTable(SatelliteState *satState) void SatelliteTrackerGUI::on_satTable_cellDoubleClicked(int row, int column) { + (void) column; + QString sat = ui->satTable->item(row, SAT_COL_NAME)->text(); FeatureWebAPIUtils::mapFind(sat); } diff --git a/plugins/feature/satellitetracker/satellitetrackersgp4.cpp b/plugins/feature/satellitetracker/satellitetrackersgp4.cpp index be98cee29..c61b0cb17 100644 --- a/plugins/feature/satellitetracker/satellitetrackersgp4.cpp +++ b/plugins/feature/satellitetracker/satellitetrackersgp4.cpp @@ -74,7 +74,7 @@ void getGroundTrack(QDateTime dateTime, } coordinates.clear(); - while (forward && (currentTime < endTime) || !forward && (currentTime > endTime)) + while ((forward && (currentTime < endTime)) || (!forward && (currentTime > endTime))) { // Calculate satellite position Eci eci = sgp4.FindPosition(currentTime); @@ -133,15 +133,15 @@ void getPassAzEl(QLineSeries* azimuth, QLineSeries* elevation, QLineSeries* pola currentTime = currentTime.AddSeconds(timeStep); } } - catch (SatelliteException se) + catch (SatelliteException& se) { qDebug() << se.what(); } - catch (DecayedException de) + catch (DecayedException& de) { qDebug() << de.what(); } - catch (TleException tlee) + catch (TleException& tlee) { qDebug() << tlee.what(); } @@ -186,15 +186,15 @@ bool getPassesThrough0Deg(const QString& tle0, const QString& tle1, const QStrin currentTime = currentTime.AddSeconds(timeStep); } } - catch (SatelliteException se) + catch (SatelliteException& se) { qDebug() << se.what(); } - catch (DecayedException de) + catch (DecayedException& de) { qDebug() << de.what(); } - catch (TleException tlee) + catch (TleException& tlee) { qDebug() << tlee.what(); } @@ -482,15 +482,15 @@ void getSatelliteState(QDateTime dateTime, getGroundTrack(dateTime, tle0, tle1, tle2, groundTrackSteps, false, satState->m_groundTrack); getGroundTrack(dateTime, tle0, tle1, tle2, groundTrackSteps, true, satState->m_predictedGroundTrack); } - catch (SatelliteException se) + catch (SatelliteException& se) { qDebug() << "getSatelliteState: " << satState->m_name << ": " << se.what(); } - catch (DecayedException de) + catch (DecayedException& de) { qDebug() << "getSatelliteState: " << satState->m_name << ": " << de.what(); } - catch (TleException tlee) + catch (TleException& tlee) { qDebug() << "getSatelliteState: " << satState->m_name << ": " << tlee.what(); } diff --git a/plugins/feature/satellitetracker/satellitetrackersgp4.h b/plugins/feature/satellitetracker/satellitetrackersgp4.h index a27ab249f..edd8eb090 100644 --- a/plugins/feature/satellitetracker/satellitetrackersgp4.h +++ b/plugins/feature/satellitetracker/satellitetrackersgp4.h @@ -20,8 +20,8 @@ #include #include -#include #include +#include using namespace QtCharts; diff --git a/plugins/feature/satellitetracker/satellitetrackerworker.cpp b/plugins/feature/satellitetracker/satellitetrackerworker.cpp index f6e695c19..7bfaf56e5 100644 --- a/plugins/feature/satellitetracker/satellitetrackerworker.cpp +++ b/plugins/feature/satellitetracker/satellitetrackerworker.cpp @@ -579,7 +579,7 @@ void SatelliteTrackerWorker::applyDeviceAOSSettings(const QString& name) if (preset != nullptr) { qDebug() << "SatelliteTrackerWorker::aos: Loading preset " << preset->getDescription() << " to " << devSettings->m_deviceSet[0]; - int deviceSetIndex = devSettings->m_deviceSet.mid(1).toInt(); + unsigned int deviceSetIndex = devSettings->m_deviceSet.mid(1).toInt(); std::vector& deviceSets = mainCore->getDeviceSets(); if (deviceSetIndex < deviceSets.size()) {