okffi / maas-server

OKFFI Fluency Navigator MaaS server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to harmonic mean for aggregating speeds

haphut opened this issue · comments

When the distance is fixed but the time spent traveling it varies, we are interested in the average time expressed in terms of speed. Wikipedia describes it in other words. So instead of mean(speeds), calculate 1 / mean(1 ./ speeds).