Return previos radius calculatuion logic

This commit is contained in:
Eugene Burmakin 2024-08-25 20:51:58 +02:00
parent ace93f7534
commit 656dc97490
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.12.0] — 2024-08-25
The visit suggestion release.
### The visit suggestion release
1. With this release deployment, data migration will work, starting visits suggestion process for all users.
2. After initial visit suggestion process, new suggestions will be calculated every 24 hours, based on points for last 24 hours.

View file

@ -29,7 +29,7 @@ class Visits::Prepare
def calculate_radius(center_point, group)
max_distance = group.map { |point| center_point.distance_to(point) }.max
max_distance.to_f.ceil
(max_distance / 10.0).ceil * 10
end
def prepare_day_result(grouped_points)