// HYDROLOGICAL PHYSICS, KALMAN ESTIMATION & GRAPH ROUTING SPECIFICATION

HYDROLOGY, KALMAN LAWS & ARCHITECTURE

Governing Saint-Venant kinematic wave equations, 1D Kalman innovation gating, Manning open-channel discharge formulas, dynamic Dijkstra edge weighting, and system design tradeoffs.

GOVERNING MATHEMATICAL LAWS // 5 EQUATIONS DRIVING THE DIGITAL TWINREALTIME SOLVER
LAW 01 // STAGE RANGINGNON-CONTACT TIME-OF-FLIGHT WATER STAGE CONVERSION
h_raw(t) = H_datum - (c · t_echo) / 2 = H_datum - (t_µs × 0.000343 m/µs) / 2

Mounted beneath a river bridge at known datum elevation H_datum above the riverbed, the transducer measures round-trip acoustic/radar echo duration t_µs to the water surface and subtracts distance-to-surface from H_datum.

LAW 02 // EDGE ESTIMATION1D KALMAN FILTER WITH 3.8σ INNOVATION GATE DEBRIS REJECTION
P_k⁻ = P_{k-1} + Q | R_eff = 65·R if |z_k - x̂_k⁻| > 0.45m else R | K_k = P_k⁻/(P_k⁻ + R_eff) | x̂_k = x̂_k⁻ + K_k(z_k - x̂_k⁻)

Physical rivers cannot rise by >0.45 m within a 1-second sampling interval. When floating logs or debris cause a sudden spike in z_k, the innovation gate scales measurement noise covariance R by 65x, driving Kalman gain K_k near zero so the state estimate x̂_k remains uncorrupted.

LAW 03 // OPEN-CHANNEL FLOWMANNING'S HYDRAULIC DISCHARGE & SOIL SATURATION RUNOFF
Q = A(h) · (1 / n) · R_h(h)^(2/3) · S_0^(1/2) | C_r(θ_v) = 1.0 + 0.6 · max(0, (θ_v - 50) / 50)

Open-channel volumetric flow Q (m³/s) scales non-linearly with wetted cross-sectional area A(h), hydraulic radius R_h, channel roughness n, and bed slope S_0. As volumetric soil moisture θ_v exceeds 50%, infiltration drops and surface runoff C_r amplifies flood wave growth.

LAW 04 // WAVE PROPAGATION1D SAINT-VENANT CONTINUITY & KINEMATIC WAVE CELERITY
∂A/∂t + ∂Q/∂x = q_lateral | c_k = dQ/dA ≈ (5 / 3) · v_mean | Δt_lag = Δx / c_k

Upstream cloudbursts and dam spillway releases propagate downstream at kinematic wave celerity c_k = (5/3)·v_mean with distance attenuation. Fusing upstream excess head with local dh/dt yields +15m, +30m, +60m, and +120m water stage forecasts.

LAW 05 // GRAPH ROUTINGDYNAMIC DIJKSTRA SHORTEST SAFE EVACUATION PATH ON G(V, E)
w(e, t) = ∞ if h(node_e, t) ≥ H_submerge(e) | w(e, t) = 3.2·d(e) if h ≥ H_submerge - 0.65m | min ∑ w(e, t)

Community road corridors are modeled as a weighted graph G(V, E). Whenever a river node crosses a bridge's submergence threshold, edge weight becomes infinite and Dijkstra's algorithm automatically recomputes high-ground shelter paths.

SYSTEMS ENGINEERING DECISIONS // ARCHITECTURAL RATIONALEEDGE + MESH + GRAPH

Why run a 1D Kalman Filter with an Innovation Gate on the ESP32-S3 instead of a simple moving average?

A N-sample moving average introduces phase lag during genuine flash-flood surges while still getting pulled upward by a +2.0m floating timber reflection. By gating on the innovation residual |z_k - x̂_k⁻| > 0.45m and inflating measurement covariance R by 65x only during physically impossible 1-second jumps, the Kalman filter achieves zero-lag tracking of real flood waves while completely rejecting debris spikes.

Why model evacuation routing as a dynamic weighted graph G(V, E) rather than static map directions?

The shortest road from a riverside settlement to a relief camp almost always crosses low-lying suspension bridges or causeways that submerge first. Coupling graph edge weights directly to real-time Kalman water stages ensures evacuation alerts never direct citizens onto flooded bridges.

Why pair 4G-LTE MQTT with an 865 MHz SX1276 LoRaWAN P2P mesh fallback?

Cellular base stations rely on grid power and fiber backhaul, both of which frequently fail during cloudbursts and landslides. Operating a sub-GHz 865 MHz LoRa mesh (168 dB link budget, SF9) allows upstream nodes to hop telemetry node-to-node down the river valley without any telecom infrastructure.

CURRENT BOUNDARIES VS. V2 PRODUCTION ROADMAP4 ARCHITECTURAL UPGRADES
[LIM_01] 1D Cross-Sectional Channel Approximation

1D Saint-Venant kinematic equations assume uniform cross-sectional velocity and simplified floodplain geometry.

V2 UPGRADE // 2D Shallow-Water GPU Solver + LiDAR DEM Bathymetry

Integrates 1-meter resolution Digital Elevation Models (DEM) to compute street-by-street 2D hydrodynamic inundation vectors.

[LIM_02] Heavy Foam & Turbulence Acoustic Scattering

40 kHz ultrasonic pulses suffer signal attenuation over aerating whitewater rapids and thick monsoon surface foam.

V2 UPGRADE // 77 GHz FMCW Millimeter-Wave Radar + Dual-Pressure Piezometer

Fuses non-contact 77 GHz radar with a submerged vented hydrostatic pressure transducer for dual-redundant stage lock.

[LIM_03] Linear Kinematic Extrapolation Over Long Horizons

Kinematic wave travel-time lag works well up to +120 minutes but does not capture multi-day synoptic cyclone trajectories.

V2 UPGRADE // Spatio-Temporal Graph Neural Network (ST-GNN) + IMD Doppler Radar

Ingests gridded satellite precipitation nowcasts into a Graph Attention Network across all tributary nodes for 24-hour lead times.

[LIM_04] Terrestrial LoRa Line-of-Sight Canyon Shadowing

Deep Himalayan gorges can obstruct 865 MHz terrestrial P2P paths beyond 8–10 km without elevated repeater relays.

V2 UPGRADE // NTN Satellite IoT (LoRa-FHSS / Iridium SBD) Emergency Uplink

Adds direct-to-satellite LoRa-FHSS fallback on headwater gateway nodes when both 4G cellular and terrestrial mesh links fail.

Ready to test 1D Kalman debris rejection and dynamic Dijkstra rerouting live?