Fixed wifi position calc.
separated from wifi position calc, to remove circular dependency
use median for wifi position calculation