The spatial mean velocity and density are calculated by taking a segment in a corridor as the measurement area.
The velocity of each person is defined as the length of the measurement area divided by the time he or she needs to cross the area:
where and are the times a person enters and exits the measurement area, respectively.
The density for each person is calculated as:
where is the width of the measurement area while is the number of person in this area at a time .