tak-cot-sender lets you build, serialize, and transmit
Cursor-on-Target (CoT) messages to any TAK Server directly from
DuckDB SQL — no middleware, no boilerplate.
-- Load extension once
LOAD 'tak_cot_sender';
-- Configure & connect
SELECT tak_configure('tak.example.mil', 8089, 'tcp+tls');
SELECT tak_connect();
-- Send CoT from any SQL query
SELECT tak_send(
cot_event(
uid, cot_type('a','f','G-U-C'),
lat, lon, altitude,
9999999, 9999999,
now(), now(), now() + INTERVAL '5 min'
)
)
FROM units_table;
Six focused functional areas — from event construction to GIS translation — all expressed as composable SQL functions.
Build standards-compliant CoT events from SQL values.
cot_event(), cot_type(), and
cot_detail() handle all field validation including
coordinate bounds and timestamp ordering.
Output to CoT base-schema XML or TAK-framed Protocol Buffers.
Switch formats with a single call to tak_set_format() —
no code changes needed.
Connect over plain TCP, one-way TLS, or mutual TLS using PEM certificates stored in DuckDB. Full OpenSSL 3.x integration with detailed certificate error reporting.
tak_send_batch() sends arrays of CoT events in a
single call, with per-row status and error reporting. Errors on
individual rows never abort the rest of the batch.
Convert DuckDB GEOMETRY values — points, lines,
polygons — directly to CoT events. Works seamlessly with the
DuckDB spatial extension and duckdb_featureserv.
An in-memory ring-buffer of up to 10,000 entries surfaces
every send, error, and connection event through
tak_log() — no external log viewer needed.
tak-cot-sender is the last mile in your data pipeline. Pair it with any DuckDB data source — live APIs, files, databases, message queues — and your data reaches TAK clients in seconds.
Real-time ingestion is out of scope by design — users configure it via existing DuckDB community extensions. This lets you pull data from virtually anywhere without changing your CoT pipeline.
-- Poll a REST API every 30s → forward to TAK
SELECT cronjob_create(
'feed_tak', '*/30 * * * * *',
$$
SELECT tak_send(
cot_event(
device_id,
cot_type('a','f','G-U-C'),
latitude, longitude, altitude,
9999999, 9999999,
now(), now(),
now() + INTERVAL '5 min'
)
)
FROM read_json_auto(
'https://api.example.mil/units'
);
$$
);
Build from source using CMake and vcpkg on Windows, Linux, or macOS. The extension links against OpenSSL 3.x for TLS and ships with full SQL smoke test coverage out of the box.
# 1. Clone with submodules
git clone --recurse-submodules <repo-url>
# 2. Bootstrap vcpkg
.\vcpkg\bootstrap-vcpkg.bat
# 3. Configure
cmake -S . -B build/release -G "Visual Studio 18 2026" -A x64
# 4. Build
cmake --build build/release --config Release --target tak_cot_sender_loadable_extension
From a single location ping to a full GIS feature layer, tak-cot-sender makes it a SQL query. Read the docs, watch the promo deck, or tune in to the podcast to learn more.
ATAK · WinTAK · iTAK · WebTAK · any CoT-compatible endpoint
TCP · TCP+TLS · mTLS with X.509 client certificates via OpenSSL 3.x
CoT XML (all clients) · TAK Protocol Buffers (ATAK/WinTAK) · automatic per-session format selection