Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: GPS off by numsats < 10 && hdop > 1.2 #26655

Closed
Closed
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
4 changes: 4 additions & 0 deletions libraries/AP_GPS/AP_GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,10 @@ void AP_GPS::update_instance(uint8_t instance)
// we have an active driver for this instance
bool result = drivers[instance]->read();
uint32_t tnow = AP_HAL::millis();

if ((state[instance].num_sats < 10) && (state[instance].hdop > 120)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right. If you want to add quality measures like this then they belong elsewhere in the code (and they do exist elsewhere in the code).

Modifying the fix type just because you don't like some aspect of the fix isn't correct IMO, and will lead to unexpected behavioural changes where e.g. we use the time from the satellites even when we're not using the co-ordinates.

state[instance].status = NO_FIX;
}

// if we did not get a message, and the idle timer of 2 seconds
// has expired, re-initialise the GPS. This will cause GPS
Expand Down
Loading