From: Tilman Sauerbeck Date: Sat, 4 Jan 2020 18:15:08 +0000 (+0100) Subject: common: Accept DGPS fix information. X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=cc7c3075ec1349d84cd0cddb9cb67f36c8dd6666;p=gps-watch.git 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. --- 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 {