code wiki / _hdl_build / nx_geo_query.nx
nx_geo_query.nx
buildroot/runtime/_hdl_build/nx_geo_query.nx
about
nx_geo_query.nx -- LIB: GEO-009 spatial QUERY primitives, composing the rungs below.
geo_nearest -- nearest candidate point to a query (the "find nearest store/place" query)
geo_within -- all candidates within R meters (the ad engine's "offer near the visitor")
geo_bearing -- compass bearing A->B in whole degrees (navigation / routing direction)
nearest/within REUSE GEO-003 geo_distance_m; bearing adds a vectoring-mode CORDIC atan2 that
REUSES fx.nx's atan table (fx_cordic_atan) -- no reinvention, fx.nx untouched. All integer/
fixed-point -> deterministic. license_tier: ORIGINAL
dependencies 3 imports · 3 importers
imports: nx_geo_distance.nxfx.nxnx_syscalls.nx
imported by: nx_geo_geocode_gate.nxnx_geo_haversine.nxnx_geo_query_gate.nx
structs
| none |
consts
| 11 | const K_MAGIC_360000000: i64 = 360000000 |
functions
| 14 | func geo_nearest(qlat: i64, qlon: i64, pts: *i64, npts: i64) -> i64 |
| 27 | func geo_within(qlat: i64, qlon: i64, radius_m: i64, pts: *i64, npts: i64, out_idx: *i64) -> i64 |
| 40 | func geo_atan2(y: i64, x: i64) -> i64 |
| 76 | func geo_bearing(lat1: i64, lon1: i64, lat2: i64, lon2: i64) -> i64 |