add location calculation to obstacle