Skip to content

Commit

Permalink
AP_GPS: backport to copter 4.5 the correct satellite count for NrSv d…
Browse files Browse the repository at this point in the history
…o-not-use value
  • Loading branch information
chiara-septentrio committed Aug 9, 2024
1 parent 142aece commit c769693
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/AP_GPS/AP_GPS_SBF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,10 @@ AP_GPS_SBF::process_message(void)
set_alt_amsl_cm(state, ((float)temp.Height - temp.Undulation) * 1e2f);
}

if (temp.NrSV != 255) {
state.num_sats = temp.NrSV;
state.num_sats = temp.NrSV;
if (temp.NrSV == 255) {
//Do-Not-Use value for NrSv field in PVTGeodetic message
state.num_sats = 0;
}

Debug("temp.Mode=0x%02x\n", (unsigned)temp.Mode);
Expand Down

0 comments on commit c769693

Please sign in to comment.