build

Build a complete CoT XML <event> document from packet.

The time and start attributes are set to the current wall-clock instant; stale is that instant plus packet.staleSeconds (floored at 45 s). Units are converted back to ATAK's conventions on the way out — speed cm/s → m/s, course degrees×100 → degrees, shape radii cm → m — and palette/ARGB colors are resolved via AtakPalette. A packet with no payload variant (TakPacketV2Data.Payload.None / an implicit PLI) emits just the envelope (<point> + standard <detail> children).

Return

a pretty-printed, multi-line CoT XML string with an <?xml?> prologue. (Callers transmitting on a TAK TCP stream should pass it through CotMeshSanitizer.normalizeCotXml first.)

Parameters

packet

the decoded data model to render.