code wiki / _hdl_build / nx_geo_gate.nx
nx_geo_gate.nx
buildroot/runtime/_hdl_build/nx_geo_gate.nx
about
nx_geo_gate.nx -- GATE (runnable) for the integer-exact geofence floor (nx_geo). Proves:
POLYGON: square center IN, EXACT edge resolution (1 microdeg in=IN/out=OUT), concave L notch OUT
+ both bars IN (true ray-casting), bbox computed + pre-filter agrees
RADIUS : within-R fence exact boundary (d2==r2 -> IN, +1 -> OUT) AND cos longitude-compression
proven: at 45 deg a point 12000 microdeg EAST is IN while 12000 microdeg NORTH is OUT
(a lon microdegree covers less ground than a lat one) -- all integer, no sqrt.
Evidence -> knowledge/status/geo_gate.log (GEOGATE authored=organ ... verdict=GREEN).
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_geo.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const GG_LOG: *u8 = "knowledge/status/geo_gate.log" |
functions
| 15 | func gg_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 16 | func gg_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 18 | func gg_set(p: *i64, idx: i64, lat: i64, lon: i64) -> i64 { p[idx * 2] = lat; p[idx * 2 + 1] = lon; return 0 } called by 1: main |
| 20 | func gg_emit(fd: i64, ctr: i64, jin: i64, jout: i64, notch: i64, bar1: i64, bar2: i64, bxagree: i64, rNin: i64, rNout: i64, rEin: i64, rEdge: i64, ok: i64) -> i64 |
| 36 | func main() -> i64 |