Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Vehicle/RemoteIDManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void RemoteIDManager::_sendSystem()
// GPS position needs to be valid before checking other stuff
if (geoPositionInfo.isValid()) {
// If we dont have altitude for FAA then the GPS data is no good
if ((_settings->region()->rawValue().toInt() == Region::FAA) && !(gcsPosition.altitude() >= 0) && _gcsGPSGood) {
if ((_settings->region()->rawValue().toInt() == Region::FAA) && qIsNaN(gcsPosition.altitude()) && _gcsGPSGood) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NaN check makes sense except for the fact that PositionManager will never set altitude to NaN. The reason your code remove the flicker is because of this fact. Or in other words qIsNaN(gcsPosition.altitude() will always be false.

The PositionManager code needs to be updated to use NaN for value not available for lat/lon/altitude/heading. And then all the code that references PositionManager gcs position/heading needs to be checked to handle unavailable values.

Can you take a look at doing that as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info, will look into it. Might be in a few weeks because I have a lot on my plate and will be moving all next week

_gcsGPSGood = false;
emit gcsGPSGoodChanged();
qCDebug(RemoteIDManagerLog) << "GCS GPS data error (no altitude): Altitude data is mandatory for GCS GPS data in FAA regions.";
Expand Down
Loading