From 6b2547cac4d2e8f2a1294fcf243be9da0613ff22 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 16 Feb 2023 14:47:40 +0000 Subject: [PATCH] Don't set altitude to NaN, if position provider doesn't supply it. --- sdrbase/maincore.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdrbase/maincore.cpp b/sdrbase/maincore.cpp index a5247e298..bbe70eb9c 100644 --- a/sdrbase/maincore.cpp +++ b/sdrbase/maincore.cpp @@ -378,7 +378,9 @@ void MainCore::positionUpdated(const QGeoPositionInfo &info) { m_settings.setLatitude(m_position.coordinate().latitude()); m_settings.setLongitude(m_position.coordinate().longitude()); - m_settings.setAltitude(m_position.coordinate().altitude()); + if (!std::isnan(m_position.coordinate().altitude())) { + m_settings.setAltitude(m_position.coordinate().altitude()); + } } } }