code wiki / _hdl_build / nx_skill_coach_dance.nx

nx_skill_coach_dance.nx

buildroot/runtime/_hdl_build/nx_skill_coach_dance.nx

5099 B74 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic skill
docsdependenciesstructsconstsfunctions

about

nx_skill_coach_dance.nx -- SKILL-COACH vision/DANCE vertical, the COACH LOOP (parallel to audio R1). Given pose KEYPOINTS (joint x,y), compute JOINT ANGLES, grade vs a reference pose, diagnose WHICH joint is off (too bent / too straight) -> drill. This is the dance-coach core; the PERCEPTION (camera->keypoints = a sovereign bits-up pose-net) is the RESEARCHER-owned research arc CAP-COACH-POSE -- here keypoints are synthetic (the pose-net is the separate long-pole, exactly as nx_pitch was the separate perception for audio R1). Pure integer (cos via dot/|.|, isqrt; NO floats, NO acos -- compare cosines: larger cos = smaller angle = more bent). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_skill_coach_dance.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main dc_puts sys_write sys_mmap dc_coach_joint dc_jcos dc_jx dc_jy dc_isqrt dc_puts ↻ dc_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap dc_putn ↻

structs

none

consts

9const DC_MAGIC_16384: i64 = 16384
11const DC_TOL: i64 = 3000 // Q14 cosine-difference tolerance (data-driven; R2 rubric-store could hold it)

functions

13func dc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: dc_coach_jointmain calls 1: sys_write
18func dc_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: dc_coach_jointmain calls 1: nxi_out
19func dc_isqrt(n: i64) -> i64
called by 1: dc_jcos
26func dc_jx(p: *i64, j: i64) -> i64 { return p[2 * j] }
called by 1: dc_jcos
27func dc_jy(p: *i64, j: i64) -> i64 { return p[2 * j + 1] }
called by 1: dc_jcos
29func dc_jcos(p: *i64, ja: i64, jb: i64, jc: i64) -> i64
called by 1: dc_coach_joint calls 3: dc_jxdc_jydc_isqrt
42func dc_coach_joint(pose: *i64, ref: *i64, ja: i64, jb: i64, jc: i64, name: *u8) -> i64
called by 1: main calls 3: dc_jcosdc_putsdc_putn
51func main() -> i64