fixed distance calculation

This commit is contained in:
Christopher Moyer 2023-01-04 21:29:11 -05:00
parent 3e8b0bcf56
commit 6ea9f2fff5

View file

@ -69,7 +69,7 @@ public class CamelConfiguration extends RouteBuilder {
.process(exchange -> { .process(exchange -> {
JsoCall jsoCall = exchange.getIn().getBody(JsoCall.class); JsoCall jsoCall = exchange.getIn().getBody(JsoCall.class);
if (Point2D.distance(jsoCall.getPoint().getLat(), jsoCall.getPoint().getLng(), appProperties.myLat(), appProperties.myLong()) if (Point2D.distance(jsoCall.getPoint().getLat(), jsoCall.getPoint().getLng(), appProperties.myLat(), appProperties.myLong())
>= appProperties.telegramNotificationThreshold()) { <= appProperties.telegramNotificationThreshold()) {
exchange.setRouteStop(true); exchange.setRouteStop(true);
} }
}) })