Unmanned aerial vehicle (UAV) is widely used by many industries these days such as militaries, agriculture, and surveillance. However, one of the main challenges of UAV is navigating through an environment where global positioning system (GPS) is being denied. The main purpose of this project is to find a solution for UAV to be able to navigate in a GPS-denied surrounding without affecting the drone flight performance. Generally, a 2-D SLAM are use as a solution to help UAV to navigate under a GPS-denied environment with the help of a light detection and ranging (LIDAR). The contribution to this research work is mainly focused on pose graph optimization, where the loop closure threshold and loop closure radius play an important role. The loop closure threshold can affect the accuracy of the trajectory of the drone and the accuracy of mapping the environment as compared to ground truth. On the other hand, the loop closure search radius can increase the processing speed of obtaining the data via pose graph optimization. The main results from this research work is shown that the processing speed can increase up to 45% and the accuracy of the trajectory of the drone and the mapped surrounding at the x-axis and y-axis has improved from 3.97 and 13.75 m to 2.10 m and 10.97 m respectively as compared to ground truth. Currently, the algorithm is being implemented to an actual UAV for a complete system verification.