projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edaa0dd
)
common: Accept DGPS fix information.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sat, 4 Jan 2020 18:15:08 +0000
(19:15 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 6 Jan 2020 09:45:34 +0000
(10:45 +0100)
We used to reject differential GPS (DGPS) fixes as invalid, but they
are actually more accurate than standard GPS fixes.
src/common/gps.rs
patch
|
blob
|
history
diff --git
a/src/common/gps.rs
b/src/common/gps.rs
index b0539173272bbe5b5a0fc833deb8eb8b4899f278..64772c775189526e06bec8cb8b604e8e7055c427 100644
(file)
--- 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 {