From cc7c3075ec1349d84cd0cddb9cb67f36c8dd6666 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sat, 4 Jan 2020 19:15:08 +0100 Subject: [PATCH] common: Accept DGPS fix information. We used to reject differential GPS (DGPS) fixes as invalid, but they are actually more accurate than standard GPS fixes. --- src/common/gps.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/gps.rs b/src/common/gps.rs index b053917..64772c7 100644 --- a/src/common/gps.rs +++ b/src/common/gps.rs @@ -347,8 +347,16 @@ impl Gps { return false; } - if pos_fix_indicator != b"1" { - return false; + match pos_fix_indicator { + b"1" => { + // Valid standard GPS fix (low resolution). + }, + b"2" => { + // Valid differential GPS fix (high resolution). + }, + _ => { + return false; + } } if utc_time.len() < 6 { -- 2.30.2