HOW IT WORKS: THE MILITARY TELEMETRY PIPELINE
The system operates as an autonomous, low-overhead edge telemetry pipeline deployed on a Raspberry Pi (ARM64). It bridges live meteorological sensors and numerical models directly into tactical operational decision matrices conforming to FM 34-81-1 and TB MED 507/81.
base_id & timestamp_zulu pushed directly to columnar scanners, skipping disk I/O.
1.1 Dual-Feed Meteorological Sourcing
Modern military decision-making demands both high-resolution forward projections and legally authoritative, certified airfield observations. The system queries two primary data providers simultaneously:
- Open-Meteo Numerical Weather Prediction (NWP): Queries surface temperature, apparent temperature, relative humidity, precipitation, weather code (WMO), surface pressure, wind vectors, wind gusts, cloud cover layers (low/mid/high), cloud base, solar direct radiation, and 7-day numerical forecast projections.
- NOAA Aviation Weather Center (AWC) Live METARs: Official METAR observations from co-located military and joint-use airfields (e.g., KPOB at Fort Liberty, KHLR at Fort Cavazos, KFBG at Fort Moore, EDDN for USAG Bavaria). Provides certified ceiling, runway visibility, flight categories, altimeter settings, and present weather codes.
-
Order of Battle (OOB) Enrichment:
Every observation is joined with
installations_oob.jsonto attach the host command (e.g., FORSCOM, USARPAC, USAREUR-AF), tenant combat formations, primary weapon platforms (Apache, Abrams, HIMARS), and mission profile.
1.2 Batch Query Optimization & Network Fallback
# All 43 installation coordinates queried in 1 single HTTP GET
params = {
"latitude": "41.3918,35.1391,31.1352,...",
"longitude": "-73.9563,-79.0060,-97.7758,...",
"current": "temperature_2m,dew_point_2m,relative_humidity_2m,"
"wind_speed_10m,wind_gusts_10m,visibility,cloud_cover",
"hourly": "temperature_2m,dew_point_2m,cloud_base,direct_radiation",
"forecast_days": "7",
"timezone": "auto"
}
# Typical execution: ~1.2s across all 43 installations worldwide
Network Resilience: If the primary batched request fails due to temporary connection drops on the Pi, the engine automatically falls back to sequential per-base queries with exponential backoff (retrying at 2s, 4s, and 8s).
Raw numbers (e.g., "18 km/h wind" or "28Β°C") are meaningless without operational military context. In doctrine.py, raw metrics are mapped into tactical units (knots, feet AGL, statute miles) and evaluated against authoritative Department of the Army doctrine.
1. Aviation / Rotorcraft
Evaluates flight envelope limits for Army aviation platforms (UH-60, AH-64, CH-47):
2. Ground Maneuver
Evaluates soil trafficability and target acquisition for armored & motorized forces:
3. Dismounted Infantry
Calculates thermal injury risk and outdoor physical activity controls:
Previously, time-series history was accumulated in an unbounded JSON file that grew to thousands of lines. To optimize storage, reduce microSD card wear, and accelerate analytical queries on the Raspberry Pi, the system replaced raw JSON history with an embedded DuckDB analytical engine and automatic Apache Parquet archival.
3.1 Append-Only Relational Schema (weather_observations)
Every hourly collection run extracts a strictly typed 15-column observation record and performs a batch insert:
| Column Name | SQL Type | Physical Unit | Doctrinal / Tactical Purpose |
|---|---|---|---|
base_id |
VARCHAR |
Identifier | Unique installation key (e.g. usma_west_point, fort_liberty) |
timestamp_zulu |
TIMESTAMP |
UTC DateTime | Standardized Zulu observation epoch for time-series alignment |
temp_c |
FLOAT |
Β°Celsius | Surface ambient temperature (METAR / Open-Meteo) |
dew_point_c |
FLOAT |
Β°Celsius | Dew point temperature (Magnus-Tetens calculation or METAR) |
rel_humidity |
FLOAT |
% (0β100) | Surface relative humidity for thermal stress & fog formation |
wind_speed_kts |
FLOAT |
Knots (kt) | Sustained 10-meter surface wind speed |
wind_gust_kts |
FLOAT |
Knots (kt) | Peak wind gusts (checked against 25 kt and 35 kt limits) |
ceiling_agl_ft |
INTEGER |
Feet AGL | Lowest cloud ceiling above ground level (checked against 500' / 1,000') |
visibility_sm |
FLOAT |
Statute Miles | Surface horizontal visibility (checked against 1.0 SM / 3.0 SM) |
wbgt_c |
FLOAT |
Β°Celsius | Derived Wet Bulb Globe Temperature for heat category determination |
heat_category |
VARCHAR |
Flag Category | TB MED 507 flag category (Category 1 through Category 5) |
aviation_posture |
VARCHAR |
Status Badge | Rotary & fixed-wing flight operational status (GO, CAUTION, NO-GO) |
ground_posture |
VARCHAR |
Status Badge | Ground maneuver & trafficability status (GO, CAUTION, NO-GO) |
infantry_posture |
VARCHAR |
Status Badge | Dismounted infantry heat & cold stress status (GO, CAUTION, NO-GO) |
limiting_factor |
VARCHAR |
Text String | Specific doctrinal threshold that triggered the caution or hazard status |
Monthly Partitioned Parquet
After batch insertion into DuckDB, data is automatically exported to Snappy-compressed Parquet files organized in Hive-style directory partitions:
data/history/
βββ year=2026/
β βββ month=08/
β β βββ data_0.parquet (Snappy compressed)
β βββ month=09/
β βββ data_0.parquet (Snappy compressed)
Snappy Compression: Achieves a >85% compression ratio compared to raw JSON while enabling zero-decompression random seek access.
Raspberry Pi MicroSD Card Protection
Raspberry Pi single-board computers often suffer unexpected power losses. The storage architecture incorporates dual-layer write safety:
- DuckDB WAL (Write-Ahead Logging): In-flight transactions are committed with ACID durability to ensure database integrity.
- Atomic Snapshot Write: Dashboard state is written to
data.json.tmp, flushed withos.fsyncto physical flash media, and moved via atomicos.replace. - Automated Fallback (.bak): If primary storage is ever compromised, the system automatically recovers from the backup.
4.1 What is Predicate Pushdown?
In traditional database querying, all rows from disk are loaded into RAM before applying a WHERE filter. On a Raspberry Pi, this wastes CPU cycles and exhausts memory.
With Predicate Pushdown, DuckDB pushes the filter conditions directly into the storage scan operator:
base_id = 'fort_liberty' down to Parquet metadata → Skip 98% of row groups without reading them → Read only relevant rows.βββββββββββββββββββββββββββββββββββββββ
β READ_PARQUET β
β Function: READ_PARQUET β
β Projections: base_id, temp_c, ... β
β Filters: base_id = 'usma_west_pointβ <-- PUSHED DOWN!
β Partition Filter: year='2026' β <-- SKIPS OTHER YEARS!
βββββββββββββββββββββββββββββββββββββββ
4.2 Historical REST API Endpoints
auto, duckdb, or parquet).// Live JSON output from DuckDB/Parquet engine will be rendered here...
Installation Detail Drawer
An off-canvas side drawer that slides in when clicking "β± Logs" on any installation card. Directly calls /api/base/<id>/logs and /api/base/<id>/trends, presenting 24-hour tabular readings and 7-day posture breakdown bars without requiring a full page reload.
Dual-Mode Command Directory
The main landing page serves tactical officers with an instant dual-mode switcher: a rich Card Grid with individual 7-day forecast outlook strips, and a compact High-Density Table for TOC display boards with multi-column alphabetical and numeric sorting.
Server-Side Trend Graphics
Rendered using Matplotlib's non-interactive Agg backend, producing 24-hour multi-variable tactical plots (temperature, apparent heat, wind gusts, precipitation). Enforces a strict 48-hour pruning policy to protect microSD storage.
Offline Synthetic Speech (Piper TTS)
Converts Bottom Line Up Front (BLUF) briefings into natural spoken English audio using an offline ONNX neural model (en_US-lessac-medium). Stored as unique per-base/per-date audio files ({base_id}_{date}.wav) with 48h rotation.
Signal Two-Way Verification
Verified subscribers receive daily tactical briefings and attached audio via signal-cli. Inbound web subscriptions trigger a verification challenge requiring a "YES" reply, polled every 5 minutes by a dedicated background daemon.
Historical D-Day Analog Tracker
An Operation Overlord comparative scoring tool that continuously scores current installation forecasts against the historic June 6, 1944 invasion threshold constraints (winds ≤ 15 kt, ceiling ≥ 2,500 ft).