Commit 843f29d
committed
Fix GPS recovery - update lastUpdateTime on first reading after signal recovery
When GPS signal is lost and recovered, the position estimator's lastUpdateTime
was only being updated on subsequent readings (when isFirstGPSUpdate was false).
This caused the GPS validity timeout check to fail on the first reading after
recovery, resulting in altitude and distance-to-home values getting stuck at zero.
The fix moves the lastUpdateTime update outside the isFirstGPSUpdate check so it
is updated on every GPS reading, including the first one after recovery.
Fixes iNavFlight#110491 parent 579daf1 commit 843f29d
2 files changed
Lines changed: 432 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | 259 | | |
263 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
0 commit comments