From: chakradhar pogiri Date: Fri, 19 Jun 2020 08:18:08 +0000 (+0530) Subject: Fix to get precise value of distance in location_manager_get_distance X-Git-Tag: submit/tizen/20200619.111507^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbfa72f3500a1864598ac754f8c7a946ae845b5e;p=platform%2Fcore%2Fapi%2Flocation-manager.git Fix to get precise value of distance in location_manager_get_distance Change-Id: I4a7685b62298e3d7588a521884e4df69a2e688c5 --- diff --git a/src/locations.c b/src/locations.c index 942f4c1..18d86e7 100755 --- a/src/locations.c +++ b/src/locations.c @@ -1239,7 +1239,7 @@ EXPORT_API int location_manager_get_distance(double start_latitude, double start LOCATIONS_CHECK_CONDITION(end_longitude >= -180 && end_longitude <= 180, LOCATIONS_ERROR_INVALID_PARAMETER, "LOCATIONS_ERROR_INVALID_PARAMETER"); int ret = LOCATION_ERROR_NONE; - ulong u_distance; + double u_distance; LocationPosition *start = location_position_new(0, start_latitude, start_longitude, 0, LOCATION_STATUS_2D_FIX); LocationPosition *end = location_position_new(0, end_latitude, end_longitude, 0, LOCATION_STATUS_2D_FIX); @@ -1250,7 +1250,7 @@ EXPORT_API int location_manager_get_distance(double start_latitude, double start if (ret != LOCATION_ERROR_NONE) return __convert_error_code(ret); //LCOV_EXCL_LINE - *distance = (double)u_distance; + *distance = u_distance; return LOCATIONS_ERROR_NONE; }