Calculations/MOT Capture Process Simulation/@MOTSimulator/computeCollisionProbability.m

9 lines
308 B
Matlab

function ret = computeCollisionProbability(this)
collision = rand(1);
CollisionProbability = 1 - exp(-this.TimeSpentInInteractionRegion/this.CollisionTime);
if this.BackgroundCollision && collision <= CollisionProbability
ret = true;
else
ret = false;
end
end