Liking cljdoc? Tell your friends :D

physics.ops.safety

Operational safety checks: limits, separation, boundaries, and predictive lookahead. Survival Mode: Returns safe defaults (false/unsafe) on corrupt data rather than crashing.

Operational safety checks: limits, separation, boundaries, and predictive lookahead.
Survival Mode: Returns safe defaults (false/unsafe) on corrupt data rather than crashing.
raw docstring

check-dynamicsclj

(check-dynamics state limits)

Check all dynamic limits. Returns set of violated keywords (e.g., #{:speed-limit}).

Check all dynamic limits. Returns set of violated keywords (e.g., #{:speed-limit}).
sourceraw docstring

conservative-predictive-boundary?clj

(conservative-predictive-boundary? state
                                   uncertainty
                                   polygon
                                   constraints
                                   {:keys [horizon dt]
                                    :or {horizon 5.0 dt 0.5}})

Check if the error bubble of a state breaches the boundary or altitude limits. Bubble radius is calculated using uncertainty-map at each time step. Respects :margin in constraints (static buffer inflation). Returns { :safe? bool :violation key :time-of-violation t }

Check if the error bubble of a state breaches the boundary or altitude limits.
Bubble radius is calculated using uncertainty-map at each time step.
Respects :margin in constraints (static buffer inflation).
Returns { :safe? bool :violation key :time-of-violation t }
sourceraw docstring

conservative-predictive-safety?clj

(conservative-predictive-safety? state-a
                                 state-b
                                 unc-a
                                 unc-b
                                 constraints
                                 {:keys [horizon dt] :or {horizon 5.0 dt 0.5}})

Propagate states AND uncertainty bubbles forward. Checks if error bubbles overlap or breach separation. Condition: dist(a, b) >= min-sep + error_a(t) + error_b(t)

Requires uncertainty maps for a and b: {:pos :vel :acc-unknown}

Propagate states AND uncertainty bubbles forward.
Checks if error bubbles overlap or breach separation.
Condition: dist(a, b) >= min-sep + error_a(t) + error_b(t)

Requires uncertainty maps for a and b: {:pos :vel :acc-unknown}
sourceraw docstring

inside-polygon-2d?clj

(inside-polygon-2d? point polygon)

Is 3D point (projected to XY) inside 2D polygon vertices? Ignores Z-axis. Uses Ray Casting + Edge Distance Check for robustness.

Is 3D point (projected to XY) inside 2D polygon vertices?
Ignores Z-axis. Uses Ray Casting + Edge Distance Check for robustness.
sourceraw docstring

inside-prism?clj

(inside-prism? point polygon {:keys [min-alt max-alt]})

Is 3D point inside a volume defined by a 2D polygon and altitude limits? :min-alt and :max-alt are optional (default -Inf, +Inf).

Is 3D point inside a volume defined by a 2D polygon and altitude limits?
:min-alt and :max-alt are optional (default -Inf, +Inf).
sourceraw docstring

predictive-boundary?clj

(predictive-boundary? state
                      constraints
                      {:keys [horizon dt] :or {horizon 5.0 dt 0.5}})

Propagate state forward to check for boundary exit. Checks against :polygon (2D) and optionally :min-alt/:max-alt. Returns { :safe? bool :violation key :time-of-violation t }

Propagate state forward to check for boundary exit.
Checks against :polygon (2D) and optionally :min-alt/:max-alt.
Returns { :safe? bool :violation key :time-of-violation t }
sourceraw docstring

predictive-safety?clj

(predictive-safety? state-a
                    state-b
                    constraints
                    {:keys [horizon dt] :or {horizon 5.0 dt 0.5}})

Propagate state-a (and optionally state-b) forward to check for separation violations. Returns { :safe? bool :violation key :time-of-violation t }

Propagate state-a (and optionally state-b) forward to check for separation violations.
Returns { :safe? bool :violation key :time-of-violation t }
sourceraw docstring

safe-separation?clj

(safe-separation? pos-a pos-b min-sep)

Is dist(a, b) >= min-sep? Optimized: uses squared distance.

Is dist(a, b) >= min-sep?
Optimized: uses squared distance.
sourceraw docstring

valid-speed?clj

(valid-speed? velocity {:keys [max-speed]})

Is |velocity| <= max-speed?

Is |velocity| <= max-speed?
sourceraw docstring

valid-turn-rate?clj

(valid-turn-rate? state {:keys [max-turn-rate]})

Is |angular-velocity| <= max-turn-rate?

Is |angular-velocity| <= max-turn-rate?
sourceraw docstring

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