v1.13.21 - GNSS Centisecond Debug Command (2025-12-11)¶
What Changed?¶
This release adds a debug command for troubleshooting GNSS timestamp precision issues. The GET_GNSS_CENTISECOND (alias: GET_GNSS_CS) command exposes the raw centisecond value extracted from NMEA sentences, enabling users to diagnose why millisecond/microsecond timestamps may appear static or not updating as expected. This complements the millisecond and microsecond precision commands from v1.13.19.
What's New¶
Main Feature: GNSS Centisecond Debug Command¶
What it does: Returns the raw centisecond component (0-99) from the most recent GPRMC NMEA sentence. Each NMEA sentence contains centisecond-precision timing data; this command exposes that value directly for debugging sub-second precision issues.
How to use it:
# Query the current centisecond value
GET_GNSS_CS
# Response: {"centisecond":97}
# Run multiple times to verify the value is updating
GET_GNSS_CS
GET_GNSS_CS
GET_GNSS_CS
Expected behavior:
- Centisecond value should change (increment or roll over) with each NMEA sentence received
- If the value never changes, GNSS data is not updating from the hardware
- If it changes, the millisecond precision calculation is working correctly (ms = centiseconds × 10)
Code example:
// Check if centisecond is updating
uint16_t cs = Command::getInstance().get_gnss_centisecond();
if (cs >= 0 && cs <= 99) {
Serial.printf("GNSS centiseconds: %d\n", cs);
Serial.printf("Milliseconds: %d\n", cs * 10); // convert to ms
}
Installation¶
Quick Start¶
# Get the release
git checkout v1.13.21
# Build
task next:build
# Upload
task next:upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
GET_GNSS_CENTISECONDcommand (alias:GET_GNSS_CS) - Debug command for GNSS centisecond value inspectionCommand::get_gnss_centisecond()- Command class method for accessing raw centisecond data- Debug-focused documentation for troubleshooting timestamp precision issues
🔧 Changed¶
- Enhanced GNSS command suite with low-level debug access to raw timestamp components
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- No changes to existing commands or APIs
- Debug command is purely additive (read-only)
- All v1.13.19 features remain unchanged
- No impact on production firmware behavior
Tests Passed¶
- ✅ Builds without errors (next profile: 27.4% flash, 36.6% RAM)
- ✅ GET_GNSS_CS command registered and callable
- ✅ Centisecond value correctly retrieved from GNSS state
- ✅ Command response properly formatted in JSON
- ✅ No additional memory overhead
Release Details¶
- Date: 2025-12-11
- Version: v1.13.21
- Files Changed: 4
include/command.h- Added get_gnss_centisecond() declarationsrc/command.cpp- Implemented get_gnss_centisecond() methodsrc/command/gnss.cpp- Added handle_get_gnss_centisecond() handlersrc/command_manager.cpp- Registered GET_GNSS_CS command in dispatch table
Use Cases¶
Troubleshooting Timestamp Precision Issues¶
When GET_GNSS_TIME_MS returns static values (e.g., always ending in 970), use this command to verify that the underlying centisecond data is updating:
# Check if millisecond value is static
GET_GNSS_TIME_MS
# Response: {"gnss_time_ms":1765449640970} # Always ends in 970
# Diagnose by checking raw centisecond
GET_GNSS_CS
# Response: {"centisecond":97}
# Run again - should see different value if GPS is working
GET_GNSS_CS
# Response: {"centisecond":98} # Value changed → hardware is working
Verifying GNSS Data Updates¶
Confirm that NMEA sentences are being received and parsed correctly:
- Static centisecond value → GNSS communication problem
- Changing centisecond value → GNSS is functioning correctly
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