moved origin to get more space from geofence

This commit is contained in:
2026-03-02 12:15:01 -08:00
parent 1d4f59734b
commit 5408a31d56
16 changed files with 64 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ function obj = run(obj, domain, partitioning, timestepIndex, index, agents)
% Guard against near-zero gradient: when sensor performance is saturated
% or near-zero across the whole partition, rateFactor -> Inf and pNext
% explodes. Stay put instead.
if gradNorm < 1e-10
if gradNorm < 1e-100
pNext = obj.pos;
else
pNext = obj.pos + (targetRate / gradNorm) * gradC;