build
Build a complete CoT XML <event> document from packet.
The time and start attributes carry the sender's own start when TakPacketV2Data.startEpochLo14 is present and reconstructs plausibly, so a report that spent time in transit is not presented as current; they fall back to the current wall-clock instant otherwise. stale is unaffected by that and stays measured from arrival, the decode instant plus packet.staleSeconds (floored at 45 s), so an honest start never shortens an event's life. 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).
This overload cannot tell you WHICH of those happened, and the fallback is indistinguishable from a genuine start once it is in the XML while reading as maximally fresh. Anything that orders two copies of one event wants buildWithOrigin instead.
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
the decoded data model to render.