Skip to main content

Crate uas_cot

Crate uas_cot 

Source
Expand description

Turn drone telemetry into Cursor on Target (CoT) events for TAK (ATAK, WinTAK, iTAK, TAK Server, FreeTAKServer, OpenTAKServer).

SourceModuleEvents
Drone Remote ID (ASTM F3411 / EN 4709-002) via the remoteid crateridthe aircraft, and its operator
MISB ST 0601 KLV from drone video via the misb cratefmvthe platform with its sensor field of view, and the sensor point of interest
MAVLink GLOBAL_POSITION_INT / HEARTBEAT payloadsmavlinkthe vehicle
MAVLink-M (military.xml) PARTICIPANT_POSITION, feature mavlink-mmavlink_mfriendly position reports, plus a framing and checksum checker; target, track, fires and engagement messages are refused

Event is the CoT 2.0 event model; Event::to_xml writes the XML that TAK clients and servers accept (validated against the MITRE public release schemas in the tests). net sends events to the SA multicast group or a TAK Server TCP input.

use uas_cot::{Event, Point, Track};

let mut e = Event::new("rid-1596F35074529ABCDEFG", "a-u-A-M-F-Q", 1_700_000_000_000_000, 30);
e.point = Point::new(38.8895, -77.0353, 120.0);
e.callsign = Some("1596F35074529ABCDEFG".into());
e.track = Some(Track { course: 92.0, speed: 11.5 });
let xml = e.to_xml();
assert!(xml.starts_with("<?xml version=\"1.0\" encoding=\"UTF-8\"?><event version=\"2.0\""));
assert!(xml.contains("<point lat=\"38.8895000\" lon=\"-77.0353000\" hae=\"120.0\""));

Re-exports§

pub use remoteid;
pub use misb;

Modules§

fmv
MISB ST 0601 (the KLV metadata in STANAG 4609 drone video) to CoT, using the misb crate.
mavlink
MAVLink to CoT without a MAVLink dependency: decode the two payloads that matter for a map marker (HEARTBEAT for the vehicle type, GLOBAL_POSITION_INT for position and velocity) from raw frame payloads, as returned by mavlink-tlog, rust-mavlink or any parser.
mavlink_m
MAVLink-M (the Dronecode military MAVLink dialect, military.xml) friendly position reports to CoT, and a conformance checker for MAVLink-M framing.
net
Sending events: UDP (the TAK SA multicast group, or a TAK Server UDP input) and TCP (a TAK Server plain streaming input, usually port 8087). For TLS inputs (port 8089), wrap your own TLS stream and call write_event.
rid
Remote ID (ASTM F3411, ASD-STAN EN 4709-002) to CoT, using the remoteid crate’s merged per-aircraft record (remoteid::UasData, as kept by remoteid::Tracker).

Structs§

Event
A CoT 2.0 event.
Iso8601
Formats microseconds since 1970 as YYYY-MM-DDTHH:MM:SS.mmmZ.
Link
<link>: a reference to another event (for example the platform that produced a sensor point of interest).
Point
A WGS84 point. hae is metres above the ellipsoid; ce and le are the 1-sigma horizontal and vertical errors in metres.
Sensor
<sensor>: where a camera on the platform is looking. ATAK draws it as a field of view wedge.
Track
<track>: course over ground (degrees true) and speed (m/s).

Constants§

UNKNOWN_ERROR
“Unknown” circular and linear error, as CoT defines it.

Functions§

now_us
Microseconds since 1970 UTC, from the system clock.