The above algorithm was implemented using a cropbox filter from point cloud library, whose dimensions change based on the flight dynamics. Another cropbox filter was used to clear the points captured by the LIDAR that come from parts of the vehicle. The picture below shows raw point cloud and filtered point cloud based on flight envelope.