fixed distance calculation
This commit is contained in:
parent
f5a97fa9c6
commit
3e8b0bcf56
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ public class CamelConfiguration extends RouteBuilder {
|
||||||
.filter(exchange -> exchange.getIn().getBody(JsoCall.class).getPoint() != null)
|
.filter(exchange -> exchange.getIn().getBody(JsoCall.class).getPoint() != null)
|
||||||
.process(exchange -> {
|
.process(exchange -> {
|
||||||
JsoCall jsoCall = exchange.getIn().getBody(JsoCall.class);
|
JsoCall jsoCall = exchange.getIn().getBody(JsoCall.class);
|
||||||
if (Point2D.distance(jsoCall.getPoint().getLat(), appProperties.myLat(), jsoCall.getPoint().getLng(), 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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue