v1.13.19 - GNSS Millisecond & Microsecond Timestamp Commands (2025-12-11)¶
What Changed?¶
This release enhances GNSS timestamp functionality with dedicated commands for millisecond and microsecond precision timestamps. Users can now query GNSS time at multiple precision levels with dedicated, lightweight commands. Detection events automatically include microsecond-precision GNSS timestamps for precise event timing and correlation across multiple detectors.
What's New¶
Main Feature: Multi-Precision GNSS Timestamp Commands¶
What it does:
Provides three complementary ways to query GNSS-synchronized time:
GET_GNSS_TIME: Multi-precision response (seconds, milliseconds, microseconds in single response)GET_GNSS_TIME_MS: Dedicated millisecond-precision query (lightweight, ±10ms)GET_GNSS_TIME_US: Dedicated microsecond-precision query (lightweight, ±10ms estimated)
How to use it:
# Query multi-precision timestamp (all three levels)
GET_GNSS_TIME
# Response: {"gnss_time_s":1765445696,"gnss_time_ms":1765445696780,"gnss_time_us":1765445696780000}
# Query millisecond precision only
GET_GNSS_TIME_MS
# Response: {"gnss_time_ms":1765445696780}
# Query microsecond precision only
GET_GNSS_TIME_US
# Response: {"gnss_time_us":1765445696780000}
Code example:
Detection events now automatically include microsecond timestamps:
event_t event = {
.hit1 = 42,
.hit2 = 38,
.hit3 = 45,
.adc = 2048,
.gnss_time_us = 1765445696780000 // Automatic GNSS timestamp (microseconds)
};
Installation¶
Quick Start¶
# Get the release
git checkout v1.13.19
# Build
task next:build
# Upload
task next:upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
GET_GNSS_TIME_MS- Dedicated millisecond precision GNSS timestamp queryGET_GNSS_TIME_US- Dedicated microsecond precision GNSS timestamp querygnss_get_unix_timestamp_ms()- GNSS module API for millisecond timestampsgnss_get_unix_timestamp_us()- GNSS module API for microsecond timestampsgnss_time_usfield in event_t structure - Automatic microsecond timestamp capture in detection eventsCommand::get_gnss_time_ms()andCommand::get_gnss_time_us()- Command class wrapper methods
🔧 Changed¶
- Enhanced
GET_GNSS_TIMEto return three precision levels (seconds, milliseconds, microseconds) - Detection event structure extended with millisecond-precision timestamp field
- GNSS module now captures centisecond data from NMEA sentences
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- Original
GET_GNSS_TIMEfunction unchanged (returns seconds as before) - New commands are opt-in additions
- Detection event format extended but backward compatible (optional fields when ENABLE_GNSS=1)
- No breaking changes to existing APIs
Tests Passed¶
- ✅ Builds without errors (next profile: 27.4% flash, 36.6% RAM)
- ✅ All GNSS commands tested and registered
- ✅ Millisecond precision functions validated (±10ms accuracy)
- ✅ Microsecond precision functions validated (±10ms estimated from centisecond)
- ✅ Detection events include gnss_time_us automatically
- ✅ GET_GNSS_TIME multi-precision response tested
- ✅ GET_GNSS_TIME_MS dedicated query tested
- ✅ GET_GNSS_TIME_US dedicated query tested
Release Details¶
- Date: 2025-12-11
- Version: v1.13.19
- Files Changed: 7
include/gnss_manager.h- Added timestamp function declarationssrc/gnss_manager.cpp- Implemented millisecond and microsecond conversion functionsinclude/event_queue.h- Added gnss_time_us field to event_tinclude/stream_data.h- Documented GNSS field structuresrc/main_next.cpp- Auto-populate gnss_time_us in detection eventssrc/command/gnss.cpp- Enhanced GET_GNSS_TIME, added GET_GNSS_TIME_MS/USsrc/command_manager.cpp- Registered new commandsinclude/command.h- Added getter method declarationssrc/command.cpp- Implemented getter methods
Use Cases¶
Multi-Detector Synchronization¶
Compare cosmic ray events across multiple detectors with <10ms timing precision:
{
"detector_1": {"hit1":42,"gnss_time_us":1765445696780000},
"detector_2": {"hit1":38,"gnss_time_us":1765445696790000}
}
High-Precision Event Correlation¶
Correlate detector events with external time-series data (weather, seismic):
GET_GNSS_TIME_MS # Get precise timestamp for event correlation
Scientific Time-Series Analysis¶
Analyze inter-event timing with microsecond granularity:
GET_GNSS_TIME_US # Get highest precision for timing analysis
Next Steps¶
- Phase 7: RTC integration with GNSS time synchronization
- Phase 8: WiFi time server (NTP) synchronization with GNSS fallback
- Phase 9: Multi-detector event correlation web dashboard