From eb5f0b78513f4d5caaa2577452e53e5370672901 Mon Sep 17 00:00:00 2001 From: Jens Kassel Date: Wed, 27 Nov 2024 21:49:14 +0100 Subject: [PATCH 1/2] Add some debug messages Why is the fix not recognized? --- src/gps.cpp | 2 ++ src/gpsrecord.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/gps.cpp b/src/gps.cpp index a1afda0a..b1c03cd6 100644 --- a/src/gps.cpp +++ b/src/gps.cpp @@ -739,6 +739,8 @@ bool Gps::hasFix(DisplayDevice *display) const { log_d("Got location..."); display->showTextOnGrid(2, 4, "Got location"); result = true; + } else { + log_d("NO location...mLastTimeTimeSet=%u", mLastTimeTimeSet); } return result; } diff --git a/src/gpsrecord.cpp b/src/gpsrecord.cpp index 52dcd0b4..62a30174 100644 --- a/src/gpsrecord.cpp +++ b/src/gpsrecord.cpp @@ -116,6 +116,7 @@ String GpsRecord::toScaledString(const int32_t value, const uint16_t scale) { } bool GpsRecord::hasValidFix() const { + log_d("hasValidFix: mFixStatus=%u, mHdop=%u, mSatellitesUsed=%u", mFixStatus, mHdop, mSatellitesUsed); return (mFixStatus == FIX_2D || mFixStatus == FIX_3D || mFixStatus == GPS_AND_DEAD_RECKONING) && mHdop != 9999 && mSatellitesUsed != 0; } From 55484015f45656052d32fd9bccc6426dcb9a445c Mon Sep 17 00:00:00 2001 From: Jens Kassel Date: Wed, 27 Nov 2024 22:00:20 +0100 Subject: [PATCH 2/2] fix #369 remove condition delayMs As I can see delayMs is the delay between the handling of the first byte of a GPS-Message block and the last Byte of the UbxNavTime Msg. We have configured the GPS to get a block each second. (Sol, Pollsh, Dop, Velned and TimeGps) I don't think the order of the single messages is specified and may differ. This delay is no indicator of the quality of the GPS measurement but the performance of the OBS firmware. --- src/gps.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gps.cpp b/src/gps.cpp index b1c03cd6..aabd8d18 100644 --- a/src/gps.cpp +++ b/src/gps.cpp @@ -1288,7 +1288,6 @@ void Gps::handleUbxNavTimeGps(const GpsBuffer::UbxNavTimeGps &message, const uin mIncomingGpsRecord.setWeek(mLastGpsWeek); } if ((message.valid & 0x03) == 0x03 // WEEK && TOW - && delayMs < 20 && message.tAcc < (20 * 1000 * 1000 /* 20ms */) && (mLastTimeTimeSet == 0 || (mLastTimeTimeSet + (2 * 60 * 1000 /* 2 minutes */)) < receivedMs)) {