mirror of
https://github.com/meshtastic/protobufs.git
synced 2026-04-20 22:13:55 +00:00
fix(atak): rename GeoPoint -> CotGeoPoint to avoid device_ui collision
The typed geometry payloads added in c61fcb5 introduced a top-level
`message GeoPoint` for delta-encoded vertices in DrawnShape / RangeAndBearing
/ Route. That collides with the pre-existing `meshtastic.GeoPoint` in
device_ui.proto (an unrelated zoom/latitude/longitude type used by the
on-device map UI).
protoc alone doesn't catch the duplicate because the SDK's build only
compiles atak.proto in isolation, but Wire (used by Meshtastic-Android
to generate Kotlin classes for the whole meshtastic package) does, and
refuses to build atak.proto with:
meshtastic/atak.proto needs to import meshtastic/device_ui.proto
for field vertices ... in message meshtastic.DrawnShape
Rename the new type to CotGeoPoint — matches the existing CotType /
CotHow naming convention in atak.proto, keeps the meaning obvious, and
doesn't touch the device_ui schema or any caller of the old map-UI
GeoPoint. Field numbers and wire format are unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c61fcb5ea9
commit
01d2901266
2 changed files with 18 additions and 13 deletions
|
|
@ -30,12 +30,14 @@
|
|||
|
||||
# --- Typed geometry payloads (v2 protocol extension) ---
|
||||
#
|
||||
# GeoPoint: sint32 deltas from the enclosing event's latitude_i/longitude_i.
|
||||
# CotGeoPoint: sint32 deltas from the enclosing event's latitude_i/longitude_i.
|
||||
# For nearby vertices (telestrations, small rectangles) the varint+zigzag
|
||||
# encoding is 2-3 bytes per field, cutting telestration vertex data in half
|
||||
# versus sfixed32. int_size:32 keeps the C type a plain int32.
|
||||
*GeoPoint.lat_delta_i int_size:32
|
||||
*GeoPoint.lon_delta_i int_size:32
|
||||
# Named with a `Cot` prefix to avoid a collision with `meshtastic.GeoPoint`
|
||||
# in device_ui.proto, which is an unrelated zoom/latitude/longitude type.
|
||||
*CotGeoPoint.lat_delta_i int_size:32
|
||||
*CotGeoPoint.lon_delta_i int_size:32
|
||||
#
|
||||
# DrawnShape pool sizing. `kind` and `style` are varint enums (no int_size
|
||||
# needed). stroke_color / fill_color are Team enum, also varint. stroke_argb
|
||||
|
|
|
|||
|
|
@ -768,7 +768,10 @@ message AircraftTrack {
|
|||
}
|
||||
|
||||
/*
|
||||
* Compact geographic vertex used by repeated vertex lists in geometry payloads.
|
||||
* Compact geographic vertex used by repeated vertex lists in TAK geometry
|
||||
* payloads. Named with a `Cot` prefix to avoid a namespace collision with
|
||||
* `meshtastic.GeoPoint` in `device_ui.proto`, which is an unrelated zoom/
|
||||
* latitude/longitude type used by the on-device map UI.
|
||||
*
|
||||
* Encoded as a signed DELTA from TAKPacketV2.latitude_i / longitude_i (the
|
||||
* enclosing event's anchor point). The absolute coordinate is recovered by
|
||||
|
|
@ -784,7 +787,7 @@ message AircraftTrack {
|
|||
* per field, which is why TAKPacketV2's top-level latitude_i / longitude_i
|
||||
* stay sfixed32 — only small values win with sint32.
|
||||
*/
|
||||
message GeoPoint {
|
||||
message CotGeoPoint {
|
||||
/*
|
||||
* Latitude delta from TAKPacketV2.latitude_i, in 1e-7 degree units.
|
||||
* Add to the enclosing event's latitude_i to recover the absolute latitude.
|
||||
|
|
@ -935,7 +938,7 @@ message DrawnShape {
|
|||
* the nanopb pool; senders MUST truncate longer inputs and set
|
||||
* `truncated = true`.
|
||||
*/
|
||||
repeated GeoPoint vertices = 12;
|
||||
repeated CotGeoPoint vertices = 12;
|
||||
/*
|
||||
* True if the sender truncated `vertices` to fit the pool.
|
||||
*/
|
||||
|
|
@ -1058,15 +1061,15 @@ message Marker {
|
|||
* Range and bearing measurement line from the event anchor to a target point.
|
||||
*
|
||||
* Covers CoT type u-rb-a. The anchor position is on
|
||||
* TAKPacketV2.latitude_i/longitude_i; the target endpoint is carried as an
|
||||
* absolute GeoPoint (not a delta) since RAB lines are cheap and the numeric
|
||||
* text is load-bearing for display.
|
||||
* TAKPacketV2.latitude_i/longitude_i; the target endpoint is carried as a
|
||||
* CotGeoPoint — same delta-from-anchor encoding used by DrawnShape.vertices
|
||||
* so a self-anchored RAB (common case) encodes in zero bytes.
|
||||
*/
|
||||
message RangeAndBearing {
|
||||
/*
|
||||
* Target/anchor endpoint
|
||||
* Target/anchor endpoint (delta-encoded from TAKPacketV2.latitude_i/longitude_i).
|
||||
*/
|
||||
GeoPoint anchor = 1;
|
||||
CotGeoPoint anchor = 1;
|
||||
/*
|
||||
* Anchor UID (from <link uid="anchor-1"/>). Empty = free-standing.
|
||||
*/
|
||||
|
|
@ -1154,9 +1157,9 @@ message Route {
|
|||
*/
|
||||
message Link {
|
||||
/*
|
||||
* Waypoint position (absolute, not delta).
|
||||
* Waypoint position (delta-encoded from TAKPacketV2.latitude_i/longitude_i).
|
||||
*/
|
||||
GeoPoint point = 1;
|
||||
CotGeoPoint point = 1;
|
||||
/*
|
||||
* Optional UID (empty = receiver derives).
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue