From b3ca82808686c85dd8a5c8ff5a610094e151d67e Mon Sep 17 00:00:00 2001 From: cyoung Date: Tue, 17 Oct 2017 16:26:11 -0400 Subject: [PATCH] Use estimate vAcc = 2*hAcc instead of reported vAcc. Fixes #666. --- main/gps.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main/gps.go b/main/gps.go index 7db23435..e7725c38 100644 --- a/main/gps.go +++ b/main/gps.go @@ -916,11 +916,14 @@ func processNMEALine(l string) (sentenceUsed bool) { tmpSituation.GPSNACp = calculateNACp(tmpSituation.GPSHorizontalAccuracy) // field 10 = vertical accuracy, m - vAcc, err := strconv.ParseFloat(x[10], 32) - if err != nil { - return false - } - tmpSituation.GPSVerticalAccuracy = float32(vAcc * 2) // UBX reports 1-sigma variation; we want 95% confidence + /* + vAcc, err := strconv.ParseFloat(x[10], 32) + if err != nil { + return false + } + tmpSituation.GPSVerticalAccuracy = float32(vAcc * 2) // UBX reports 1-sigma variation; we want 95% confidence + */ + tmpSituation.GPSVerticalAccuracy = float32(2.) * tmpSituation.GPSHorizontalAccuracy // field 2 = time if len(x[2]) < 8 {