1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00

Don't set altitude to NaN, if position provider doesn't supply it.

This commit is contained in:
Jon Beniston 2023-02-16 14:47:40 +00:00
parent c10d24614e
commit 6b2547cac4

View File

@ -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());
}
}
}
}