*/
int location_manager_get_velocity(location_manager_h manager, double *climb, double *direction, double *speed, time_t *timestamp);
-
/**
* @brief Gets the current accuracy information.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
int location_manager_get_accuracy(location_manager_h manager, location_accuracy_level_e *level, double *horizontal, double *vertical);
+/**
+ * @brief Gets the current velocity accuracy information.
+ * @since_tizen @6.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/location
+ * @param[in] manager The location manager handle
+ * @param[out] velocity_accuracy The velocity accuracy (m/s)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #LOCATIONS_ERROR_NONE Successful
+ * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
+ * @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled
+ * @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start().
+ */
+int location_manager_get_velocity_accuracy(location_manager_h manager, double *velocity_accuracy);
/**
* @brief Gets the last position information which is recorded.
return LOCATIONS_ERROR_NONE;
}
+EXPORT_API int location_manager_get_velocity_accuracy(location_manager_h manager, double *velocity_accuracy)
+{
+ LOCATIONS_LOGD("location_manager_get_velocity_accuracy");
+ LOCATIONS_NOT_SUPPORTED_CHECK(__is_location_supported());
+ LOCATIONS_NULL_ARG_CHECK(manager);
+ LOCATIONS_NULL_ARG_CHECK(velocity_accuracy);
+ location_manager_s *handle = (location_manager_s *) manager;
+
+ int ret;
+ LocationPosition *pos = NULL;
+ LocationAccuracy *acc = NULL;
+ ret = location_get_position(handle->object, &pos, &acc);
+ if (ret != LOCATION_ERROR_NONE)
+ return __convert_error_code(ret); //LCOV_EXCL_LINE
+
+ if (acc == NULL)
+ return __convert_error_code(LOCATION_ERROR_NOT_AVAILABLE); //LCOV_EXCL_LINE
+
+ *velocity_accuracy = acc->vertical_accuracy;
+ location_position_free(pos);
+ location_accuracy_free(acc);
+ return LOCATIONS_ERROR_NONE;
+}
+
EXPORT_API int location_manager_get_last_position(location_manager_h manager, double *altitude, double *latitude, double *longitude, time_t *timestamp)
{
LOCATIONS_LOGD("location_manager_get_last_position");