code wiki / _hdl_build / nx_geo_query.nx

nx_geo_query.nx

buildroot/runtime/_hdl_build/nx_geo_query.nx

3343 B87 linesdepth 5pulls 6 transitivereach 4 importersview sourcekind librarytopic geo
docsdependenciesstructsconstsfunctions

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

nx_geo_distance.nx fx.nx nx_syscalls.nx nx_geo_query.nx nx_geo_geocode_gate.nx nx_geo_haversine.nx nx_geo_query_gate.nx

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

11const K_MAGIC_360000000: i64 = 360000000

functions

14func geo_nearest(qlat: i64, qlon: i64, pts: *i64, npts: i64) -> i64
called by 2: mainmain calls 1: geo_distance_m
27func geo_within(qlat: i64, qlon: i64, radius_m: i64, pts: *i64, npts: i64, out_idx: *i64) -> i64
called by 1: main calls 1: geo_distance_m
40func geo_atan2(y: i64, x: i64) -> i64
76func geo_bearing(lat1: i64, lon1: i64, lat2: i64, lon2: i64) -> i64
called by 1: main calls 2: fx_cosgeo_atan2