direction, distance error when there are waypoints -> fixed

Change-Id: Icb2d927c078b22ad2fbbe03fc4d60c6fc34e5172
Signed-off-by: gom105mari <gom105mari@gmail.com>