mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Fix check for inconsistent latitude
Fixes an error found by cppcheck: plugins/channelrx/demodadsb/adsbdemodgui.cpp:2168:121: error: Invalid abs() argument nr 1. A non-boolean value is required. [invalidFunctionArgBool] || (positionValid && aircraft->m_positionValid && ((abs(latitude - aircraft->m_latitude > 2.0f)) || (abs(longitude - aircraft->m_longitude) > 2.0f))) ^
This commit is contained in:
parent
3f392d3be7
commit
4bc1059a50
@ -2165,7 +2165,7 @@ void ADSBDemodGUI::decodeCommB(const QByteArray data, const QDateTime dateTime,
|
||||
float longitude = longitudeFix * (360.0f / 1048576.0f);
|
||||
|
||||
bool positionInconsistent = !aircraft->m_positionValid
|
||||
|| (positionValid && aircraft->m_positionValid && ((abs(latitude - aircraft->m_latitude > 2.0f)) || (abs(longitude - aircraft->m_longitude) > 2.0f)))
|
||||
|| (positionValid && aircraft->m_positionValid && ((abs(latitude - aircraft->m_latitude) > 2.0f) || (abs(longitude - aircraft->m_longitude) > 2.0f)))
|
||||
|| (!positionValid && ((latitudeFix != 0) || (longitudeFix != 0)));
|
||||
|
||||
int pressureAltFix = ((data[9] & 0x7f) << 8) | (data[10] & 0xff);
|
||||
|
Loading…
Reference in New Issue
Block a user