diff --git a/droneCode/drone_controll/Mobile-SDK-Android-master/Sample Code/app/build.gradle b/droneCode/drone_controll/Mobile-SDK-Android-master/Sample Code/app/build.gradle
index c943f72eaef2516a45c9cdec7afd7993f95dbdd2..04ffb68dec583e66585481fa543ed4a9573b64bf 100644
--- a/droneCode/drone_controll/Mobile-SDK-Android-master/Sample Code/app/build.gradle	
+++ b/droneCode/drone_controll/Mobile-SDK-Android-master/Sample Code/app/build.gradle	
@@ -72,6 +72,9 @@ android {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
+    buildFeatures {
+        viewBinding = true
+    }
 }
 
 dependencies {
diff --git a/server/data_processing/area_processing.py b/server/data_processing/area_processing.py
index 646ccd8a0f5bf547a5240f93a6851c7122af99a2..5dfb6e8590eb480372f701812b197172d3a0eaa3 100644
--- a/server/data_processing/area_processing.py
+++ b/server/data_processing/area_processing.py
@@ -10,19 +10,15 @@ METER = (1 / ((2 * pi / 360) * EARTH)) / 1000  # 1 meter in degree
 # p - area using real world coordinate
 # l - area using lidar coordinate(pointcloud)
 # max_limit - maximum area limit of a lidar scann in real world coordinates
-def position_relative_to_pointcloud(l1, l2, p1, p2, center_l, center_p, max_lim):
+def position_relative_to_pointcloud(l1, l2, p1, p2, center_p, max_lim):
+    center_l = tuple((a+b)/2 for a, b in zip(max_lim[0],max_lim[1]))
     return [
-        ((center_p[0] - p1[0]) * ((l1[0] - l2[0]) / (max_lim[1][0] - max_lim[3][0])) + center_l[0],
-            (center_p[1] - p1[1]) * ((l1[1] - l2[1]) / (max_lim[1][1] - max_lim[3][1])) + center_l[1]),
         ((center_p[0] - p2[0]) * ((l1[0] - l2[0]) / (max_lim[1][0] - max_lim[3][0])) + center_l[0],
-            (center_p[1] - p2[1]) * ((l1[1] - l2[1]) / (max_lim[1][1] - max_lim[3][1])) + center_l[1])
+            (center_p[1] - p2[1]) * ((l1[1] - l2[1]) / (max_lim[1][1] - max_lim[3][1])) + center_l[1]),
+        ((center_p[0] - p1[0]) * ((l1[0] - l2[0]) / (max_lim[1][0] - max_lim[3][0])) + center_l[0],
+            (center_p[1] - p1[1]) * ((l1[1] - l2[1]) / (max_lim[1][1] - max_lim[3][1])) + center_l[1])
     ]
-    #return [(((min[0] - max[0]) * ((start[0] - limit[1][0]) / (limit[1][0] - limit[3][0]))) + center[0],
-    #        (((min[1] - max[1]) * ((start[1] - limit[1][0]) / (limit[1][1] - limit[3][1]))) + center[1])),
-    #        ((((min[0] - max[0]) * ((end[0] - limit[1][0]) / (limit[1][0] - limit[3][0]))) + center[0],
-    #        (((min[1] - max[1]) * ((end[1] - limit[1][0]) / (limit[1][1] - limit[3][1])))) + center[1]))]
-
-print(position_relative_to_pointcloud((-5,5), (-2,2), (1.2,1.6), (1.8,1.4), (-3.5,3.5), (1.5,1.5), [(0,0),(1,2),(0,0),(2,1)]))
+print(position_relative_to_pointcloud((-20,30), (-10,20), (1,3), (2,2), (1.5,2.5), [(0,0),(0,5),(0,0),(5,0)]))
 
 # check if lidar points is within range of the area selected
 def inArea(position, areaRange):
diff --git a/server/data_processing/process_lidar_data.py b/server/data_processing/process_lidar_data.py
index b0f3bb1bbe841dd8d2fc0c902f0b553d76a9ca42..7c268cfdd9cf67067c5eb08257d5ab83b62925dd 100644
--- a/server/data_processing/process_lidar_data.py
+++ b/server/data_processing/process_lidar_data.py
@@ -98,7 +98,7 @@ def calculate_area_data(center, body_of_water):
             #test data
             # zone coordinates sett to be relative to the lidar data's point cloud
             areazone = position_relative_to_pointcloud(min_point, max_point, start, end, center, area_limit)
-
+            print("area",areazone)
             # calculate map zones height
             ys, xs = start
             ye, xe = end