Repository navigation
feat(tagxl): ts2 GPS receiver config and port 10 hAcc/speed - #215
Open
StefanSmile wants to merge 3 commits into
Open
StefanSmile wants to merge 3 commits into
StefanSmile wants to merge 3 commits into
Conversation
ts2 firmware extends the 0xD2 GPS receiver reply from 2 to 5 bytes: - gpsDynamicModel: u-blox CFG-NAVSPG-DYNMODEL (0 portable, 3 pedestrian, 4 automotive, ...) - gpsStaticHoldSpeed: CFG-MOT speed threshold in cm/s (0 = off) - gpsStaticHoldDistance: CFG-MOT exit distance in m The 2-byte reply from older firmware still decodes; the new fields stay null.
ts2 firmware appends two bytes to the active GNSS uplink: - byte 20: horizontal accuracy estimate (hAcc) in m, exposed via GetAccuracy - byte 21: speed over ground in km/h Both are optional: 20-byte uplinks from older firmware decode as before with accuracy and speed left nil.
- port 10: hAcc capped at 255 with speed 0, and a 23-byte uplink rejected as too long (documents the max-length check) - 0xD2: 3-byte reply (dynamic model only) and 6-byte reply (extra byte ignored)
|
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two ts2 firmware additions for Loros, both backwards compatible with older firmware.
Port 10 (active GNSS uplink): optional hAcc and speed
ts2 appends two bytes to the 20-byte payload:
accuracy: horizontal accuracy estimate (hAcc)GetAccuracy()speed: speed over groundBoth are optional fields: 20-byte uplinks decode as before with
accuracy/speed=null; a 21-byte uplink gets onlyaccuracy.Why this is urgent: the released
v1.6.0-rc4rejects the new uplinks (payload length 22 is greater than maximum allowed length 20), so Loros on the hAcc firmware currently loses its active-GNSS positions. Port 10's max length is derived from the configured fields, so any byte added in future firmware will be rejected the same way until the decoder knows it (a test documents this).The bridge stores
GetAccuracy()as the position accuracy, so after the bridge bump Loros port 10 positions get a real accuracy.Port 151
0xD2: GPS receiver config grows from 2 to 5 bytesgpsDynamicModel: u-bloxCFG-NAVSPG-DYNMODEL(0 portable, 2 stationary, 3 pedestrian, 4 automotive, 5 sea, 6–8 airborne, 9 wrist, 10 bike)gpsStaticHoldSpeed:CFG-MOTspeed threshold, cm/s (0 = off)gpsStaticHoldDistance:CFG-MOTexit distance, mThe 2-byte reply from older firmware still decodes (new fields
null); partial lengths fill only what's present; extra bytes are ignored.Known firmware issue (unchanged here)
The new
PUBX,00parser reads fields 15/16/17 as PDOP/HDOP/VDOP, but inPUBX,00they are HDOP/VDOP/TDOP. So the port 10pdopbyte currently carries HDOP. A firmware fix is pending; the decoder keeps decoding the byte as before.Testing
0xD2at 2/3/5/6 bytesgo mod tidy -diff, gofmt,go vet ./..., staticcheck,make check-json-tags,make check-metrics,go test ./...(all packages)port10.go100%,port151.go92.1%,decoder.go81.9% (threshold 75%)Summary by CodeRabbit