Commit 66c87bf
imu: compute GPS 3D speed only on new GPS data
GPS3DspeedFiltered was computed every PID cycle (1 kHz) from
gpsSol.velNED[], which only changes when the GPS task delivers a new
fix (~10 Hz). Move the sqrt and pt1 filter update into
imuCalculateTurnRateacceleration(), gate them on gpsHeartbeat change,
and make the filter state a static local. The variable is only
consumed in that function (fixed-wing + GPS-trustworthy path), so the
module-level FASTRAM variables and the imuInit() reset are also removed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c428cc9 commit 66c87bf
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| |||
210 | 208 | | |
211 | 209 | | |
212 | 210 | | |
213 | | - | |
214 | | - | |
215 | 211 | | |
216 | 212 | | |
217 | 213 | | |
| |||
667 | 663 | | |
668 | 664 | | |
669 | 665 | | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | 666 | | |
674 | 667 | | |
675 | 668 | | |
| |||
705 | 698 | | |
706 | 699 | | |
707 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
| |||
0 commit comments