code wiki / _hdl_build / nx_geo_los.nx

nx_geo_los.nx

buildroot/runtime/_hdl_build/nx_geo_los.nx

1837 B37 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic geo
docsdependenciesstructsconstsfunctions

about

nx_geo_los.nx -- LIB: GEO-022 LINE-OF-SIGHT / viewshed over a terrain elevation profile (DEM). Given an elevation profile sampled along a transect (heights[0..n]), an observer at index 0 and a target at index n (each with an eye/structure height above ground), the target is VISIBLE iff no intermediate terrain sample rises above the straight sight-line from observer to target. THE EXCEED ANGLE: the sight-line test is INTEGER and cross-multiplied -- compare heights[i]*n against obsH*n + (tgtH-obsH)*i (no division, no float) -> the visible/blocked verdict is EXACT and deterministic, even when a terrain sample sits exactly on the sight-line (decided, not an epsilon coin-flip). Sovereign + offline; the DEM is seeded data, not a service. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_geo_los.nx nx_geo_los_gate.nx

imports: nx_syscalls.nx

imported by: nx_geo_los_gate.nx

structs

none

consts

none

functions

15func geo_line_of_sight(heights: *i64, n: i64, obs_eye: i64, tgt_eye: i64) -> i64
called by 1: main
28func geo_los_blocker(heights: *i64, n: i64, obs_eye: i64, tgt_eye: i64) -> i64
called by 1: main