+EXPORT_API int location_manager_get_last_location(location_manager_h manager, double *altitude, double *latitude, double *longitude, double *climb, double *direction, double *speed, location_accuracy_level_e * level, double *horizontal, double *vertical, time_t * timestamp)
+{
+ LOCATIONS_NULL_ARG_CHECK(manager);
+ LOCATIONS_NULL_ARG_CHECK(altitude);
+ LOCATIONS_NULL_ARG_CHECK(latitude);
+ LOCATIONS_NULL_ARG_CHECK(longitude);
+ LOCATIONS_NULL_ARG_CHECK(climb);
+ LOCATIONS_NULL_ARG_CHECK(direction);
+ LOCATIONS_NULL_ARG_CHECK(speed);
+ LOCATIONS_NULL_ARG_CHECK(level);
+ LOCATIONS_NULL_ARG_CHECK(horizontal);
+ LOCATIONS_NULL_ARG_CHECK(vertical);
+ LOCATIONS_NULL_ARG_CHECK(timestamp);
+
+ location_manager_s *handle = (location_manager_s *) manager;
+
+ int ret;
+ LocationPosition *last_pos = NULL;
+ LocationVelocity *last_vel = NULL;
+ LocationAccuracy *last_acc = NULL;
+ ret = location_get_last_position_ext(handle->object, &last_pos, &last_vel, &last_acc);
+ if (ret != LOCATION_ERROR_NONE) {
+ return __convert_error_code(ret);
+ }
+
+ if (last_pos->status == LOCATION_STATUS_NO_FIX) {
+ *altitude = -1;
+ *latitude = -1;
+ *longitude = -1;
+ } else {
+ if (last_pos->status == LOCATION_STATUS_3D_FIX) {
+ *altitude = last_pos->altitude;
+ } else {
+ *altitude = -1;
+ }
+ *latitude = last_pos->latitude;
+ *longitude = last_pos->longitude;
+ }
+ *timestamp = last_pos->timestamp;
+ *climb = last_vel->climb;
+ *direction = last_vel->direction;
+ *speed = last_vel->speed;
+ *level = last_acc->level;
+ *horizontal = last_acc->horizontal_accuracy;
+ *vertical = last_acc->vertical_accuracy;
+ location_position_free(last_pos);
+ location_velocity_free(last_vel);
+ location_accuracy_free(last_acc);
+ return LOCATIONS_ERROR_NONE;
+}
+
+EXPORT_API int location_manager_get_last_velocity(location_manager_h manager, double *climb, double *direction, double *speed, time_t * timestamp)