Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 3c969e0d authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

quick fix in PedestrianVelocityProcessor: the velocity was NaN if the duration...

quick fix in PedestrianVelocityProcessor: the velocity was NaN if the duration was 0.0 now the velocity will be 0.0
parent 87eaa64e
......@@ -75,7 +75,7 @@ public class PedestrianVelocityProcessor extends DataProcessor<TimestepPedestria
VPoint posNow = pedPosProc.getValue(new TimestepPedestrianIdKey(timeStep, pedId));
double duration = (currentSimTime - lastSimTimes.getFirst());
double velocity = posNow.subtract(posBefore).scalarMultiply(1 / duration).distanceToOrigin();
double velocity = duration > 0 ? posNow.subtract(posBefore).scalarMultiply(1 / duration).distanceToOrigin() : 0;
return velocity;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment