Liking cljdoc? Tell your friends :D

tv-mount-planner (Clojure)

Planning math for a wall-mounted TV, as a small Clojure library with no dependencies beyond Clojure: screen width and height from the diagonal (16:9 by default), the screen-center height, bottom and top edge, vertical viewing angles, whether the center is within 15 degrees of the line of sight, and a bracket rating of 1.5 x the TV weight. Inches, pounds, degrees.

(require '[tv-mount-planner.core :as tv])

(tv/plan {:diagonal 65 :weight 55 :eye 42 :distance 108})
;; => {:center 42.0, :angle-center 0.0, :comfortable? true, :bracket-rating-lb 83, ...}

(tv/plan {:diagonal 65 :weight 55 :eye 42 :distance 72 :mantel 54 :gap 6})
;; => {:center 75.93..., :angle-center 25.23..., :comfortable? false, :bracket-rating-lb 83, ...}

Plain wall: the center is the eye height clamped to 42-48 in. With :mantel, center = mantel + gap (default 6) + half the screen height. Invalid input throws ex-info.

Coordinates (Clojars): net.clojars.santaclaritatvmounting/tv-mount-planner {:mvn/version "0.1.2"}.

Tests

run_tests.sh (JVM + Clojure 1.12.0): 7 tests, 123 assertions, 10 of the cases are golden vectors produced by the real tv_mount_planner Ruby gem, compared to 1e-9. Also hand-checkable anchors (65 in = 56.65 x 31.87 in, clamp 42/45/48, bottom edge exactly gap above the mantel, bracket rounding 83/60/16) and invalid input. Built jar loaded on its own classpath and called (see ../test_output.txt). Tested on Clojure 1.12.0 only; the pom asks for 1.10.0 or later and uses nothing newer.

About the numbers

The reference ranges follow the guides of Santa Clarita TV Mounting, an independent installer in Santa Clarita, California (not a licensed contractor). A planning aid, not a quote and not an engineering check.

MIT licensed. Build: python3 build.py. Deploy (with a Clojars deploy token): deploy.sh.

Can you improve this documentation? These fine people already did:
santaclaritatvmounting & Santa Clarita TV Mounting
Edit at git repository

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close