DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
gnss_survey.h File Reference

GNSS survey-in: WGS84 geodetic <-> ECEF + fixed-position averaging (DETWS_ENABLE_NTRIP_CASTER). More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

GNSS survey-in: WGS84 geodetic <-> ECEF + fixed-position averaging (DETWS_ENABLE_NTRIP_CASTER).

An RTK / DGPS base must advertise its own antenna position precisely. A stationary receiver's single-epoch fixes scatter by meters, so the base "surveys in": it averages many fixes into one mean position and only trusts it once enough observations have landed and their spread is small enough. That mean position, in ECEF, is what the caster puts in an RTCM3 1005/1006 message (see rtcm3.h).

This is the pure, zero-heap, host-tested core:

  • the exact closed-form WGS84 geodetic (lat/lon/ellipsoidal-height) -> ECEF transform and an iterative inverse (for read-back), matched against pyproj (EPSG:4979 -> EPSG:4978);
  • an incremental survey accumulator that keeps a running mean ECEF and a 3-D spread (standard deviation) using a shifted-origin sum / sum-of-squares, so it is numerically stable at the ~6.4e6 m magnitude of ECEF coordinates and needs no history buffer;
  • a helper to fold a GGA fix straight into the survey (built only when DETWS_ENABLE_NMEA0183 is on).
Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file gnss_survey.h.