v1.13.15 - GET_TIME Command and GNSS Handler Enhancements (2025-12-11)¶
What Changed?¶
This release adds comprehensive time synchronization diagnostics with the new GET_TIME command, which simultaneously retrieves device uptime, RTC time, GNSS-synchronized time, and their difference. Additionally, the GNSS command handler suite has been significantly expanded to provide individual query commands for all position and status fields, complementing the master GET_GNSS command. All enhancements maintain full backward compatibility.
What's New¶
Main Feature: GET_TIME Command - Time Synchronization Diagnostics¶
What it does: The GET_TIME command retrieves four time-related values in a single response: device uptime (milliseconds since boot), RTC time (device real-time clock unix timestamp), GNSS time (GPS-synchronized unix timestamp), and the difference between RTC and GNSS times. This enables real-time verification of time source synchronization and tracking of clock drift between the two time sources.
How to use it:
Send the GET_TIME command via serial interface. The response includes all four fields as a JSON object.
Code example:
# Via serial terminal
GET_TIME
# Response
{"type":"response","status":"ok","sent_at":12345,"uptime_ms":123456789,"rtc_time":1732046789,"gnss_time":1732046795,"time_diff":6}
Secondary Feature: Expanded GNSS Command Suite¶
What it does:
Complements the existing master GET_GNSS command with nine individual query commands for specific GNSS fields:
- GET_GNSS_LATITUDE - Geographic latitude (-90 to 90 degrees)
- GET_GNSS_LONGITUDE - Geographic longitude (-180 to 180 degrees)
- GET_GNSS_ALTITUDE - Altitude above sea level (meters)
- GET_GNSS_POSITION - Combined position data (latitude, longitude, altitude)
- GET_GNSS_TIME - GNSS-synchronized unix timestamp
- GET_GNSS_SATELLITES - Number of visible satellites
- GET_GNSS_QUALITY - Fix quality indicator (0=invalid, 1=GPS, 2=DGPS, etc.)
- GET_GNSS_VALID - Fix validity status (true/false)
- GET_GNSS_HDOP - Horizontal Dilution of Precision (accuracy measure)
How to use it: Query individual GNSS fields as needed. For comprehensive data retrieval, use GET_GNSS or GET_GNSS_POSITION.
Code example:
# Query latitude only
GET_GNSS_LATITUDE
# Response
{"type":"response","status":"ok","sent_at":12345,"latitude":35.6762}
Installation¶
Quick Start¶
# Get the release
git checkout v1.13.15
# Build
task build
# Upload
task upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
- GET_TIME command for comprehensive time synchronization diagnostics (uptime_ms, rtc_time, gnss_time, time_diff)
- GET_GNSS master command for retrieving all GNSS data in single response
- GET_GNSS_POSITION command for combined geographic position queries
- Individual GNSS query commands: GET_GNSS_LATITUDE, GET_GNSS_LONGITUDE, GET_GNSS_ALTITUDE, GET_GNSS_TIME, GET_GNSS_SATELLITES, GET_GNSS_QUALITY, GET_GNSS_VALID, GET_GNSS_HDOP
- Forward declarations and dispatch table entries for all 10 GNSS handlers
🔧 Changed¶
- Updated command_manager.cpp dispatch table to include all 10 GNSS commands (previously 4)
- All GNSS handlers now follow Phase 6 Payload Pointer Pattern (static JsonDocument with pointer-based responses)
🐛 Fixed¶
- Removed undefined handler references (handle_sync_time, handle_get_gnss_status) from command dispatcher
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- All new GET_TIME and GET_GNSS commands are additive; no existing commands were modified
- Existing users unaware of these commands will not be affected
- No breaking changes to serial protocol or response formats
- All changes only activate when ENABLE_GNSS=1 is set (optional feature)
Tests Passed¶
- ✅ Builds without errors (verified with task build)
- ✅ All GNSS handlers forward declarations properly resolved
- ✅ Command dispatch table correctly maps 10 GNSS commands
- ✅ GET_TIME command returns all four required fields (uptime_ms, rtc_time, gnss_time, time_diff)
Release Details¶
- Date: 2025-12-11
- Version: v1.13.15
- Files Changed: 3(src/command/time.cpp (new)、src/command_manager.cpp、src/command/gnss.cpp)
Next Steps¶
- Phase 6 Completion: Continue Phase 6 Payload Pointer Pattern migration for remaining command handlers(WiFi, configuration commands)
- CommandParser Class: Implement unified command argument parsing framework to consolidate validation logic scattered across text_command_manager
- GNSS Integration: Expand GNSS module with real-time satellite tracking and atmospheric correction capabilities
- Performance Optimization: Profile command response latency under high-frequency queries