How slateintegrations-git/script-spidertracks-pycot works
This is a small asynchronous integration script: it polls the Spidertracks AFF feed, processes aircraft features and their timestamps, converts positions to Cursor-on-Target (CoT), and sends batches to a TAK server. The main loop owns polling, pagination, sending, reconnection, and scheduling; the feed and CoT helpers provide the internal processing layers. The README confirms the overall fetch-and-convert purpose. Some loop details are omitted from the source excerpt, so links for feature conversion follow that documented workflow rather than a fully visible call site.
Main entry points: spidertracks.py Async main loop
Components 10
Polling and control
- Async main loop
spidertracks.py
AFF feed processing
- AFF fetch
spidertracks.py - Feature extraction
spidertracks.py - Feature ordering
spidertracks.py - Cursor tracking
spidertracks.py
CoT delivery
- CoT conversion
spidertracks.py - Batch sender
spidertracks.py
Other components
- Operator
- Spidertracks AFF API
- TAK server
Connections 9
- Operator → Async main loop: configures and starts
- Async main loop → AFF fetch: polls feed
- AFF fetch → Spidertracks AFF API: requests AFF data
- Async main loop → Feature extraction: extracts results
- Async main loop → Feature ordering: sorts features
- Async main loop → Cursor tracking: advances cursor
- Async main loop → CoT conversion: converts positions
- Async main loop → Batch sender: sends batches
- Batch sender → TAK server: writes CoT messages