Skip to content

Instantly share code, notes, and snippets.

View ampledata's full-sized avatar

Greg Albrecht W2GMD ampledata

View GitHub Profile
@ampledata
ampledata / example-pytak_rx.py
Last active April 4, 2023 19:22
PyTAK TAK Server receiver
#!/usr/bin/env python3
"""Example PyTAK Receiver."""
import asyncio
import xml.etree.ElementTree as ET
from configparser import ConfigParser
import pytak
@ampledata
ampledata / node-red-json-to-cot.json
Created August 28, 2022 07:04
Node-RED: JSON to cursor on target CoT example flow.
[
{
"id": "0b934157aa7465fa",
"type": "tab",
"label": "To CoT",
"disabled": false,
"info": "",
"env": []
},
{
@ampledata
ampledata / network_gps.json
Last active August 27, 2021 10:04
Node-RED Flow for adding Network GPS to ATAK & WinTAK
[{"id":"758f7cac.e17e64","type":"tcp request","z":"53dcc9e8.57f8d8","server":"127.0.0.1","port":"2947","out":"sit","splitc":" ","name":"Connect to GPSD TCP Port 2947","x":280,"y":320,"wires":[["12a46902.2a5087"]]},{"id":"90a23821.a7ee88","type":"inject","z":"53dcc9e8.57f8d8","name":"Start","props":[{"p":"payload"}],"repeat":"120","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":240,"wires":[["930d05b5.b70958"]]},{"id":"930d05b5.b70958","type":"function","z":"53dcc9e8.57f8d8","name":"Config GPSD Output","func":"msg.payload = '?WATCH={\"enable\":true,\"json\":true,\"nmea\":true,\"raw\":0,\"scaled\":false,\"timing\":false,\"split24\":false,\"pps\":false}';\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":280,"wires":[["758f7cac.e17e64"]]},{"id":"12a46902.2a5087","type":"function","z":"53dcc9e8.57f8d8","name":"Buffer.toString()","func":"let oldPayload = msg.payload;\nmsg.payload = oldPayload.toString();\nreturn msg;","output
@ampledata
ampledata / node-red_tak.json
Created January 4, 2021 22:42
Node-RED TAK Map Flow
[
{
"id": "c574bf6a.276f2",
"type": "tcp in",
"z": "65e4b241.fe35fc",
"name": "FTS Server",
"server": "client",
"host": "fts.example.com",
"port": "8087",
"datamode": "stream",
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Display buildings in 3D</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js'></script>
<script src='https://npmcdn.com/@turf/turf/turf.min.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css' rel='stylesheet' />
SFFD Dispatches - https://orion.app.link/iieiII6g7S
SFFD Tacticals - https://orion.app.link/mNHJVNSFeT
SFFD EMS4/B16 - https://orion.app.link/3BImZp6g7S
SFFD A1 - https://orion.app.link/WKzktpkFeT
SFFD A2 - https://orion.app.link/HNpwaQiGeT
SFFD A3 - https://orion.app.link/H7cCDXmFeT
SFFD A4 - https://orion.app.link/04OqR7VFeT
@ampledata
ampledata / sfcers.csv
Created November 23, 2018 22:50
talkgroupsFile for SFCERS
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 8 columns, instead of 7 in line 4.
14800,39D,A,SFFD A1,Control A1 Downtown Dispatch,Fire Dispatch,Fire,1
14832,39F,A,SFFD A2,Control A2 NorthWest Dispatch,Fire Dispatch,Fire,1
14864,3A1,A,SFFD A3,Control A3 SouthEast Dispatch,Fire Dispatch,Fire,1
15344,3BF,A,SFFD EMS4,EMS 4 FD-B16 Private Ambulances,EMS-Tac,EMS,1
12848,323,A,SFPD A1,Dispatch Mobiles Southern B Tenderloin J Districts,Law Dispatch,Police
12880,325,A,SFPD A2,Service Portables Southern B Tenderloin J Districts,Law Talk,Police
12912,327,A,SFPD A3,Dispatch Mobiles Bayview C Mission D Districts,Law Dispatch,Police
12944,329,A,SFPD A4,Service Portables Bayview C Mission D Districts,Law Talk,Police
12976,32b,A,SFPD A5,Dispatch Mobiles Central A Northern E Park F Districts,Law Dispatch,Police
13008,32d,A,SFPD A6,Service Portables Central A Northern E Park F Districts,Law Talk,Police
@ampledata
ampledata / config-sfcers.json
Created November 23, 2018 22:49
Trunk Recorder Configuration for SFCERS
{
"sources": [{
"center": 853887500.0,
"rate": 8000000.0,
"error": 12000.0,
"gain": 14,
"ifGain": 24,
"bbGain": 22,
"debugRecorders": 0,
"digitalRecorders": 0,
@ampledata
ampledata / librato_client.py
Last active June 9, 2017 17:09
Librato Client
#!/usr/bin/env python
import librato
librato_api = librato.connect('xxx', 'yyy')
librato_api.submit('hello.world', 1234, description='Hello World')
2016-12-18 19:18:05.535 W2GMD-13 R KG6FIY-9>SSTYXR,RS0ISS*:`.]cl!)[/>"4)}CQ de Endaf DM03=
2016-12-18 19:18:09.450 W2GMD-13 R KO6TZ>APRS,RS0ISS*,ARISS::BLNQSL1/1:RS0ISS,W5SAT-6,KK6OTJ-7,KG6FIY-9,SUNSET,KK6CUS-7
2016-12-18 19:18:21.162 W2GMD-13 R W5SAT-6>APWW10,RS0ISS*:>DM26kc/- Base Station - TS-2000
2016-12-19 01:47:12.692 W2GMD-13 R W5SAT-6>APWW10,RS0ISS*::WD9EWK-9 :Hello Patrick de W5SAT
2016-12-19 01:47:18.623 W2GMD-13 R AE7PK-7>TRQRVR,RS0ISS*:`2KUl#A[/`":p}Hello via ISS from Talent, Oregon! CN82_
2016-12-19 01:47:27.368 W2GMD-13 R WD9EWK-9>APK004,RS0ISS*::AE7PK-7 :Hi from DM43 in AZ. QSL? {1
2016-12-19 01:47:33.564 W2GMD-13 R KG6FIY-9>SSURVQ,RS0ISS*:`.'nl"x[/>"45}CQ de Endaf DM03=
2016-12-19 01:47:41.009 W2GMD-13 R KG6FIY-9>SSURVQ,RS0ISS*:`.'pl"t[/>"4&}CQ de Endaf DM03=
2016-12-20 00:55:35.012 W2GMD-13 R WD9EWK-9>APK004,RS0ISS*::NP4JV-9 :Hi from DM43 in AZ. QSL? {0