From 8f7e94e482d8fc190ea751f8ea9efd7897d7517b Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sat, 30 Oct 2021 12:43:54 +0200 Subject: [PATCH] comparison of lat and long made on 3 decimals only --- include/db.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/db.class.php b/include/db.class.php index fd4667d..1cdc726 100644 --- a/include/db.class.php +++ b/include/db.class.php @@ -98,7 +98,7 @@ class db function newPlane() //return 0 on error { global $base_url; - if ($this->startLat==$this->destLat && $this->startLon==$this->destLon) + if (round($this->startLat,3,PHP_ROUND_HALF_DOWN)==round($this->destLat,3,PHP_ROUND_HALF_DOWN) && round($this->startLon,3,PHP_ROUND_HALF_DOWN)==round($this->destLon,3,PHP_ROUND_HALF_DOWN)) { $this->destLon+=0.001; $this->destLat+=0.001;