## 7 Results and Discussion  
The validation of the developed 3D path planner was conducted through both SITL and preliminary real flight tests. Gazebo 3D model simulation environment was thoroughly used to develop and validate our 3D path planner prior to its upload into Pixhawk autopilot. The Gazebo environment shown in Figure 6 was set in such a way that it has obstacles like human, window, poles, tunnel, trees, and nets. These obstacles implicate the plausible encounters that the drone may face during missions such as package delivery, disaster monitoring, law enforcement, and first aid. For a complete navigation from the left section to the right section of the environment, the drone has to avoid collision with any of the mentioned obstacles and safely land at the landing pad. Rigorous simulation tests were done where the two randomly arranged environments shown in Figure 7 are some of the environments in which the tests were done. The path followed by the quadcopter in the environment in Figure (a)a is shown in Figure (c)c. Similarly, the path followed in the environment in Figure (b)b is shown in Figure (d)d. As can be seen in these figures, the quadcopter followed two different trajectories in response to the two different arrangements of the obstacles in the environments. Moreover, the setpoints sent by the path planner and the estimated locations of the quadcopter overlap throughout the trajectories. This overlap validates the effectiveness of the path planner to autonomously navigate the quadcopter in a cluttered and GPS-denied environment. Components of position and attitude responses in the two environments, Figure (a,b), are shown in Figure 10. The well-traced setpoints of both position and attitude prove the efficiency of the path planner. In the path planner, a setpoint acceptance radius is set to 0.30 m. The differences observed at setpoint nodes are due to this acceptance radius. The quadcopter advances to the next setpoint assuming that the current setpoint is achieved at the moment the quadcopter crosses the acceptance radius, though the quadcopter may not reach the actual setpoint. This causes a gap between the estimated position and position setpoint. The attitude estimates of the quadcopter in both environments conform to the setpoints. Figure 13: Real flight test for path planner efficiency validation. The preliminary real flight tests were conducted for collision avoidance with pedestrians. Machine learning was done for a pedestrian with different posture, clothes, and light exposures. As shown in Figure 9a, the quadcopter attempts to avoid collision with the pedestrian by rolling either right or left, implementing the conditions given in the pseudo-algorithm. For reference, the recorded two short videos on pedestrian collision avoidance are submitted with this manuscript. For a complete mission test, a real environment, similar to the simulated environment shown in Figure 6, should have been constructed. This would take time and money. For this report, the real environment was modeled by an ROS node that publishes required information to the 3D path planner. This node publishes simulated locations of obstacles, and the 3D path planner takes those locations and calculates an obstacle-free path. With this, the UAV was commanded to autonomously head to the landing pad avoiding all possible obstacles on its way. The path followed by the UAV during this mission is shown in Figure 12. The overlap of the estimated quadcopter positions and intended setpoints shows that the 3D path planner effectively executed the mission. In the real flight test, which was conducted in an open field, the quadcopter localization was limited to GPS and LiDAR. LiDAR is only for altitude estimation. ZED mini stereo camera, combined with GPS for quadcopter localization, does not provide proper localization of the quadcopter in an open field as it is required to get reflected rays from objects in its operation range.