Pix4D React for TAK
Marshall Frith · ~8:31
Easy · script · python
Tiny CLI that cuts a capture window from a timestamped NMEA file for playback or sharing.
<epoch> !AIVDM…nmea_window.py.python3 nmea_window.py capture.nmea --hours 12 -o last12.nmealast12.nmea into your playback exporter or share the slice.#!/usr/bin/env python3
import argparse
from pathlib import Path
ap = argparse.ArgumentParser(description="Slice last N hours from stamped NMEA")
ap.add_argument("log")
ap.add_argument("--hours", type=float, default=12)
ap.add_argument("-o", "--out", required=True)
a = ap.parse_args()
lines = Path(a.log).read_text(errors="replace").splitlines()
stamps = []
for ln in lines:
parts = ln.split(None, 1)
if len(parts) != 2: continue
try: stamps.append(float(parts[0]))
except ValueError: continue
if not stamps:
raise SystemExit("no timestamps")
t1 = max(stamps)
t0 = t1 - a.hours * 3600
out = []
for ln in lines:
parts = ln.split(None, 1)
if len(parts) != 2: continue
try: t = float(parts[0])
except ValueError: continue
if t0 <= t <= t1:
out.append(ln)
Path(a.out).write_text("\n".join(out) + "\n")
print(f"wrote {len(out)} lines → {a.out}")
Related watch — Marshall Pix4D/DTED2, TAK Syndicate, Meshtastic. Spelling lock: ATAK.
Marshall Frith · ~8:31
Marshall Frith · ~4:02
The TAK Syndicate · ~2h
The TAK Syndicate · ~9:20
Meshtastic · ~9:24