v1.15.1 - GNSS Timing Optimization (2025-12-12)¶
What Changed?¶
This patch release optimizes GNSS data capture timing by moving it immediately after RTC timestamp capture. The change improves timing accuracy for multi-detector synchronization and prioritizes satellite acquisition timing without affecting detection logic or backward compatibility.
What's New¶
Sensor Read Order Optimization¶
What it does: Optimizes the order in which sensor data is captured during detection processing to prioritize timing-critical measurements. The new order captures absolute timestamps and position data immediately after detection, before slower sensor measurements.
New sensor read order:
1. RTC timestamp (detected_at) ← Detection moment
2. GNSS position data ← Satellite acquisition priority
3. Timestamp fields (uptime_ms) ← Elapsed time tracking
4. ADC millivolts (adc_raw, adc_mv) ← Voltage measurement
5. BME280 environmental ← Slower I2C sensor
Why this matters:
- GNSS receivers need time to acquire satellite signals
- Early capture ensures position reflects detection moment
- Improves timing accuracy for multi-detector cosmic ray event correlation
- Maintains all existing data without format changes
Installation¶
Quick Start¶
# Get the release
git checkout vX.Y.Z
# Build
task build
# Upload
task upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
- Optimization of sensor read order for improved timing accuracy
- Documentation of new sensor read order in
CLAUDE.md
🔧 Changed¶
- Sensor data capture order optimized to prioritize timing-critical measurements
- RTC timestamp now captured immediately after detection (before GNSS, not after all sensors)
- GNSS position data captured before slower sensor reads (improves satellite acquisition timing)
- Both Legacy and Unified protocol paths use identical sensor read order
🐛 Fixed¶
- Improved timing accuracy for multi-detector cosmic ray event correlation
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- Data format unchanged (all existing fields remain, no new fields)
- Output format identical (SSV/TSV/CSV/JSONL formats unchanged)
- JSON field names unchanged (v1.15.0 breaking change already applied)
- Timing improvement is transparent to data consumers
- No API changes or breaking changes
Tests Passed¶
- ✅ Default build (no optional sensors): SUCCESS
- ✅ RTC enabled build:
PLATFORMIO_BUILD_FLAGS="-DENABLE_RTC=1" pio run -e esp32dev-releaseSUCCESS - ✅ GNSS enabled build:
PLATFORMIO_BUILD_FLAGS="-DENABLE_GNSS=1" pio run -e esp32dev-releaseSUCCESS - ✅ Combined RTC + GNSS build:
PLATFORMIO_BUILD_FLAGS="-DENABLE_RTC=1 -DENABLE_GNSS=1" pio run -e esp32dev-releaseSUCCESS - ✅ Unified protocol with GNSS:
PLATFORMIO_BUILD_FLAGS="-DENABLE_DEVICE_RESPONSE=1 -DENABLE_GNSS=1" pio run -e esp32dev-nextSUCCESS - ✅ Pre-commit hooks pass (commitizen, trailing whitespace, file endings)
Release Details¶
- Date: 2025-12-12
- Version: v1.15.1
- Files Changed: 3 (src/detection_processor.cpp, src/main.cpp, include/detection_processor.h)
- Commit: 85cf559 (refactor(rtc): move gnss data capture earlier for satellite acquisition timing)
Next Steps¶
Roadmap considerations:
- Monitor timing accuracy improvements in multi-detector deployments
- Plan Phase 2 optimization: Consider configurable sensor read order via runtime flags
- Evaluate performance impact of earlier GNSS reads (satellite acquisition times)
- Plan Phase 3: Add timing instrumentation to measure actual sensor read latencies