diff --git a/Descriptors/DescriptionFactory.h b/Descriptors/DescriptionFactory.h index ed22a11cb..11eb28220 100644 --- a/Descriptors/DescriptionFactory.h +++ b/Descriptors/DescriptionFactory.h @@ -71,7 +71,7 @@ public: ) { //compute distance/duration for route summary intToString(round(distance), lengthString); - int travel_time = time/10; + int travel_time = round(time/10.); intToString(std::max(travel_time, 1), durationString); } } summary; diff --git a/Descriptors/JSONDescriptor.h b/Descriptors/JSONDescriptor.h index c54632cf4..7b0522017 100644 --- a/Descriptors/JSONDescriptor.h +++ b/Descriptors/JSONDescriptor.h @@ -129,6 +129,8 @@ public: return; } + SimpleLogger().Write(logDEBUG) << "distance: " << raw_route.lengthOfShortestPath; + //check if first segment is non-zero std::string road_name; road_name = facade->GetEscapedNameForNameID(phantom_nodes.source_phantom.name_id); @@ -488,7 +490,7 @@ public: intToString(necessary_segments_running_index, temp_length); reply.content.push_back(temp_length); reply.content.push_back(","); - intToString(segment.duration/10, temp_duration); + intToString(round(segment.duration/10.), temp_duration); reply.content.push_back(temp_duration); reply.content.push_back(",\""); intToString(segment.length, temp_length);