Skip to content

Fixed GPS position outlier detection by appropriate statistical compa… - #107

Open
MasterPIC wants to merge 1 commit into
charleslemaire0:Release_1.6from
MasterPIC:GPS_improvement
Open

Fixed GPS position outlier detection by appropriate statistical compa…#107
MasterPIC wants to merge 1 commit into
charleslemaire0:Release_1.6from
MasterPIC:GPS_improvement

Conversation

@MasterPIC

Copy link
Copy Markdown
Contributor

…rison:

  • sigma clipping with k=2: the delta of the latest sample from the distribution mean is compared against 2σ (previously the raw delta was compared against σ directly, missing the subtraction of the mean)
  • sample count properly tracked to avoid spurious results during buffer fill-up

Clarified GNSS timing semantics by introducing two named constants replacing a magic number (5000ms) used indiscriminately for two distinct purposes:

  • GPS_VALID_TIMEOUT_MS: maximum age of a GNSS fix to be considered valid
  • GPS_COMPARISON_PERIOD_MS: period between consecutive comparisons of the stored (EEPROM) position against the current GNSS reading, used as a drift alert (no position update is performed)

Tuning:

  • GPS_VALID_TIMEOUT_MS and GPS_COMPARISON_PERIOD_MS both reduced to 2000ms
  • Number of observations increased to 12
  • Absolute thresholds in isLocationSyncWithGNSS (2 arcsec lat/lng, 30m elevation) can be further reduced once field-tested

…rison:

- sigma clipping with k=2: the delta of the latest sample from the distribution mean is compared against 2σ (previously the raw delta was compared against σ directly, missing the subtraction of the mean)
- sample count properly tracked to avoid spurious results during buffer fill-up

Clarified GNSS timing semantics by introducing two named constants replacing a magic number (5000ms) used indiscriminately for two distinct purposes:
- GPS_VALID_TIMEOUT_MS: maximum age of a GNSS fix to be considered valid
- GPS_COMPARISON_PERIOD_MS: period between consecutive comparisons of the stored (EEPROM) position against the current GNSS reading, used as a drift alert (no position update is performed)

Tuning:
- GPS_VALID_TIMEOUT_MS and GPS_COMPARISON_PERIOD_MS both reduced to 2000ms
- Number of observations increased to 12
- Absolute thresholds in isLocationSyncWithGNSS (2 arcsec lat/lng, 30m elevation) can be further reduced once field-tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant