TAK
DuckDB Community Extension

tak-cot-sender

Construct and transmit Cursor-on-Target messages to TAK Servers directly from SQL. Query anything. Send anywhere.

24+
SQL Functions
11
Data Source Extensions
mTLS
Security Support
C++17
Native Performance
The Ecosystem

What is the TAK Ecosystem?

TAK (Team Awareness Kit) is a geospatial situational awareness platform used by military, first responders, and emergency managers. It visualizes real-time position reports and events from any connected device or sensor.

  • 📱
    ATAKAndroid Team Awareness Kit — the field device app
  • 🖥️
    WinTAK / WebTAKDesktop and browser-based TAK clients
  • 🖧
    TAK ServerCentral broker — federates CoT between all clients
📱
ATAK
Field devices
↕ CoT XML / Protobuf
🖧
TAK Server
Central federation broker
↕ TCP / TLS
🦆
tak-cot-sender
SQL CoT injection point
The Protocol

What is Cursor-on-Target?

CoT is an XML-based protocol for sharing geospatial events. Every message has an event element (uid, type, time, stale) and a point element (lat, lon, hae, ce, le). Optional detail sub-elements carry callsign, group, battery, track, and sensor metadata.

Type strings follow MIL-STD-2525B dot-notation: a-f-G-U-C = atom / friendly / ground unit / combat.

<?xml version="1.0"?> <event version="2.0" uid="UNIT-001" type="a-f-G-U-C" time="2025-01-15T14:30:00Z" stale="2025-01-15T14:35:00Z"> <point lat="34.0522" lon="-118.2437" hae="71.0" ce="10.0" le="10.0"/> <detail> <callsign>ALPHA-1</callsign> </detail> </event>
The Problem

Data is Everywhere.
TAK Doesn't Know About It.

Your organization has GPS data in REST APIs, sensor telemetry in databases, geospatial features in shapefiles, radio AIS feeds, and drone telemetry. None of it flows to ATAK automatically — every source requires a custom integration.

🗄️ SQL Databases
isolated
🌐 REST / HTTP APIs
isolated
📡 Radio / AIS Feeds
isolated
🛩️ Drone Telemetry
isolated
🗺️ GIS / Shapefiles
isolated
☁️ Cloud Storage
isolated
The Solution

SQL as the Universal Connector

tak-cot-sender makes DuckDB the integration layer. Query any data source that DuckDB can reach, transform it with SQL, and stream it to TAK — in a single statement.

  • 🦆
    DuckDB handles data accessHTTP, Parquet, CSV, databases, spatial files
  • 📐
    SQL handles transformationFilter, join, aggregate, project — standard SQL
  • 📡
    tak-cot-sender handles deliveryCoT construction, XML serialization, TCP/TLS send
-- Fetch JSON → build CoT → send to TAK SELECT tak_send(cot_event( vehicle_id, cot_type('a','f','G-U-C'), gps_lat, gps_lon, altitude_m, 10.0, 10.0, now(), now(), now() + INTERVAL '30s' )) FROM read_json( 'https://api.fleet.io/vehicles' ) WHERE status = 'active';
Architecture

How It Works

🌐
Data Sources
HTTP · SQL · Files
GIS · Radio · Cloud
🦆
DuckDB SQL
Filter · Join · Aggregate
cot_event() · cot_type()
📦
tak-cot-sender
Serialize → XML/Proto
TCP+TLS socket send
🖧
TAK Server
Broker → ATAK
WinTAK · WebTAK

The extension lives entirely inside DuckDB — no sidecar processes, no message brokers, no external dependencies beyond OpenSSL.

Ecosystem

Plug In Any Data Source

Load community DuckDB extensions to connect tak-cot-sender to virtually any data source without writing custom code.

🌐
http_client
REST APIs & webhooks
⏱️
cronjob
Scheduled polling
🌊
tributary
Kafka / MQTT streams
📡
radio
SDR & AIS feeds
📂
webdavfs
WebDAV remote files
🔑
sshfs
SSH filesystem mounts
🗺️
spatial
GeoJSON / Shapefile
🕸️
crawler
Web scraping
Security

Production-Ready Security

TAK networks carry sensitive operational data. tak-cot-sender implements the full TAK security model.

  • 🔐
    Mutual TLS (mTLS)Client certificates issued by TAK Server CA, full handshake verification
  • 📜
    PEM Certificate LoadingRead certs from files using DuckDB's read_text()
  • 🗑️
    In-Memory Key StoragePrivate keys never touch disk — session-lifetime only
  • 🔒
    OpenSSL BackendIndustry-standard TLS 1.2/1.3 via libssl
-- Full mTLS in 3 SQL statements SELECT tak_configure( 'tak.mission.mil', 8089, 'tcp+tls' ); SELECT tak_configure_tls( read_text('client.pem'), read_text('client.key'), read_text('ca-chain.pem') ); -- Performs full mTLS handshake SELECT tak_connect();
Use Cases

What People Are Building

🚗
Fleet Tracking

Poll vehicle GPS APIs every 30s, stream positions to TAK as friendly ground units with callsigns and group colours.

🔥
Wildfire Response

Query NIFC fire perimeter GeoJSON feeds, convert polygons to CoT areas, broadcast to incident command ATAK.

Maritime AIS

Ingest AIS vessel transponder data via the radio extension, classify vessels, push to WinTAK as maritime CoT icons.

🛩️
Drone Telemetry

Subscribe to drone MAVLink telemetry streams, convert to CoT air units, display on ATAK with battery and altitude.

🏥
Mass Casualty Events

Push patient triage locations from hospital intake databases to TAK to coordinate medical transport and field hospital positions.

🌐
Intel Fusion

Correlate multiple intelligence feeds in SQL — OSINT, SIGINT, sensor data — and push fused target locations to TAK in real time.

1 / 10 ← → arrow keys · F for fullscreen