Skip to content

Commit e0ba079

Browse files
committed
Filter out erroneous HPAs
A very negative HPA (more than -900000 m) was triggering a false Survey-In start.
1 parent 454a9f1 commit e0ba079

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Firmware/RTK_Everywhere/UM980.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,12 @@ float um980GetHorizontalAccuracy()
672672
float latitudeDeviation = um980->getLatitudeDeviation();
673673
float longitudeDeviation = um980->getLongitudeDeviation();
674674

675+
// The binary message may contain all 0xFFs leading to a very large negative number.
676+
if (longitudeDeviation < -0.01)
677+
longitudeDeviation = 50.0;
678+
if (latitudeDeviation < -0.01)
679+
latitudeDeviation = 50.0;
680+
675681
if (longitudeDeviation < latitudeDeviation)
676682
return (longitudeDeviation);
677683

0 commit comments

Comments
 (0)