BAE Systems USA interview question

Agile, algorithm to predict when a door will close