Resolve "Change PedestrianPositionProcessor to use interpolation of PedestrianFootStepProcessor"
requested to merge 260-change-pedestrianpositionprocessor-to-use-interpolation-of-pedestrianfootstepprocessor into master
Closes #260 (closed) Closes #262 (closed)
-
Simplify tests -
Write text into CHANGELOG -
Write tests for the interpolation method -
overwrite Pedestrian.getPosition()
withPedestrian.getPosition(simTimeSec)
, which would then use the interpolation method? -
in clearFootSteps()
should we keep the last entry (which can be used for interpolation)? --> No, new fieldcurrentFootStep
, this is because there the whole list is saved & used in "FootStepProcessors" and they would need to make sure to ignore double occurrences -
Look at code where pedestrian.getPosition() would make sense to get exchanged to the interpolated position? E.g. in NelderMead or OverlapProcessor? --> This would be in a new issue/branch then -
Remove the "currentFootStep" field in Pedestrian again and use the "LastFootSteps" provided in VTrajectory (then with a minimum capacity of 1)? -
resolve #263 (closed) first -
How to deal with requested interpolation if a Pedestrian has an outdated FootStep? Check with @hm-kleinmei
if(currentFootStep == null){
return getPosition();
}else{
if(time > currentFootStep.getEndTime()){
// This happens for example if a pedestrian is waiting (see Events)
// TODO: check with Bene K. if this is okay, or a better way?
return currentFootStep.getEnd();
}else{
return FootStep.interpolateFootStep(currentFootStep, time);
}
}
Edited by Ghost User