mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-30 08:48:12 +00:00
feat(gps): use HDOP for !gps fix readiness, satellite count as fallback
Satellite count alone is a poor proxy for fix quality -- few satellites in good geometry can beat many in poor geometry. LocationProvider now exposes getHDOP() (default -1 = unsupported); MicroNMEA implements it. isLocFixReady() prefers HDOP <= 2.0 when available, falling back to the old >=8 satellite threshold for providers that don't report it (e.g. RAK12500/u-blox). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,12 @@ public:
|
||||
virtual long getLongitude() = 0;
|
||||
virtual long getAltitude() = 0;
|
||||
virtual long satellitesCount() = 0;
|
||||
// Horizontal Dilution of Precision, in tenths (11 == HDOP 1.1) -- lower is
|
||||
// better, and a much more direct read on fix quality than satellite count
|
||||
// alone (few satellites in good geometry can beat many in poor geometry).
|
||||
// -1 means this provider doesn't expose it; callers fall back to
|
||||
// satellitesCount() in that case.
|
||||
virtual long getHDOP() { return -1; }
|
||||
virtual bool isValid() = 0;
|
||||
virtual long getTimestamp() = 0;
|
||||
virtual void sendSentence(const char * sentence);
|
||||
|
||||
@@ -120,6 +120,7 @@ public :
|
||||
return alt;
|
||||
}
|
||||
long satellitesCount() override { return nmea.getNumSatellites(); }
|
||||
long getHDOP() override { return nmea.getHDOP(); }
|
||||
bool isValid() override { return nmea.isValid(); }
|
||||
|
||||
long getTimestamp() override {
|
||||
|
||||
Reference in New Issue
Block a user