Quadcopter Navigation System with Waypoint Method through Flight Controller at Ground Station

In a quadcopter, a navigation system is needed to monitor the position and control the movement of the quadcopter. In recent years, a navigation system based on longitude and latitude coordinates has been developed, namely a waypoint system. This flight control system works to maintain the actual position and direction of the quadcopter to its destination. Thus, the authors designed a navigation control system using the waypoint method on a quadcopter which can walk autonomously from one coordinate point to another coordinate point or destination. This navigation system works using GPS (Global Positioning System), and GY-81 as a magnetometer sensor. The application of the waypoint method can help the robot to determine the direction toward the destination and how far the target is from the robot's current position. This is evidenced in the movement of the robot with an accuracy value of up to 99.48% and an average time to reach the target in about 50-65 seconds. The application of the PID method gives better heading results compared to those without using the PID method. This is evidenced by the stable robot movement and fairly accurate compass sensor readings. Based on the test results using the PID method on the seacoast, the error = 2.15% and the accuracy = 97.85%, while in the test without the PID method on the land surface, the error = 3.33% and the accuracy = 96.6%. For testing using the PID method in paddy fields, an error result = 1.85% and an accuracy result = of 98.1%, while testing without the PID method on the surface of the water obtained an error result = 2.75% and an accuracy result = 97.25%.


Introduction
Quadcopter is a type of UAV "Unmanned Aerial Vehicle" which has an automatic or manual control system, including the type of UAV with four rotor drives. To be able to control and fly the quadcopter according to the user's wishes, a remote control can be used that uses radio wave transmission media or Wi-Fi. In addition, the quadcopter can also be controlled using a smartphone or joystick [1]- [11]. One of the ways to develop a quadcopter navigation system is to create a quadcopter control system so that it can always face the coordinates of the intended location so that when the quadcopter is flown, it moves forward until it reaches the intended location.
Several previous studies discussed a lot about the navigation system of the Autonomous Surface Vehicle (ASV) robot or better known as an unmanned ship robot, to go from one point to another [3], [5]- [7], [9], [12]- [16]. The method used is the waypoint navigation method, whose output is in the form of controlling the direction of motion of the ASV robot to go to a point specified by the user. From the test results, it can be concluded that the system carried out shows that the ASV robot can move automatically or manually.
Based on this description, this study will discuss a navigation control system using the waypoint method on a quadcopter that can face obstacles to reach the intended position. The GPS sensor that will read the Longitude and Latitude values is used as a parameter in the waypoint method. The BMP-85 sensor reads height data as an altitude parameter. To facilitate ground station control, an active servo motor actuator is used. The proposed control system uses the waypoint method to determine the quadcopter's movement to reach the desired position. The proposed method for obstacle avoidance techniques uses the fuzzy logic controller method.

Research Method
A good mechanical design will support the quadcopter's movement for the better [17]- [21]. Therefore, the quadcopter frame must be symmetrical and light enough to fly easily. The frame design uses a DJI F450-type X-frame frame. The type of UAV in this design is a quadcopter with four driving rotors. The total weight of the quadcopter is around 1250gr.  The ground station to be made has dimensions of 22 cm in length, 22 cm in width, and 26 cm in height. Meanwhile, the drive frame for the stick has a distance of 10 cm, a width of 8 cm, and a height of 4 cm. composed divided into two parts, the components that are located inside and those that are outside. Inside is the HC-12 module, battery, Arduino Uno, and DC-DC step-down module. At the top is a remote radio control, servo, and LCD. The waypoint method through a flight controller on a ground station is one of the navigation techniques for unmanned aerial vehicles (drones) that uses the Global Positioning System (GPS) to control the aircraft's movement [3], [5]- [7], [9], [12]- [16]. This method allows users to create a flight path by determining specific waypoints that the aircraft will pass through during its flight.
Using the waypoint method on a ground station begins with creating a flight route on the ground station software connected to the flight controller inside the aircraft. Precise GPS coordinates determine each waypoint, and the aircraft will automatically move from one waypoint to the next using preprogrammed instructions [7], [11].
During the flight, the aircraft will continuously update its GPS position to ensure that it moves along the predetermined flight path and avoids collisions or accidents. The waypoint method through a flight controller on a ground station is widely used in various applications such as surveying, mapping, environmental monitoring, and aerial photography. This method is very useful for speeding up and simplifying the process of unmanned aircraft flights by avoiding human errors in controlling the aircraft and optimizing fuel usage efficiency and time.  The algorithm for implementing the Waypoint method with the Flight Controller at the Quadcopter ground station is as follows. 1. The first is the preparation stage, the first thing to do is equip the drone with a flight controller and ground station. Furthermore, it is necessary to ensure that the drone is connected to a ground station and has a strong GPS signal. 2. The second stage is in the form of a flight plan; at this stage it is necessary to make a flight plan using ground station software connected to the drone. 3. The third stage is configuration; at this stage it is necessary to configure the drone to ensure that it is ready to fly. Next, the inspection stage and ensure that all systems on the drone are functioning correctly, including GPS, sensors, and cameras. 4. The fourth stage is take-off. At this stage, it is necessary to take off using the remote control. The drone will fly toward the starting point of the flight plan. 5. The fifth stage is flying. After the drone reaches the starting point of the flight plan, the drone will follow a predetermined flight path by automatically flying from one path point to another. The drone constantly updates its GPS position to ensure it moves according to a predetermined flight path. The last stage is landing, at this point, after the flight is completed, the drone will return to the starting point, and the user can land with the remote control. Through the Flight Controller on the Ground Station, the Waypoint method allows users to fly drones automatically by following a predetermined flight route. This method is very useful for various applications such as surveys, mapping, environmental monitoring, and aerial photography [9], [12], [13], [22]- [25].

Results and Discussion
The Arduino program for the Waypoint method via flight controller on the ground station depends on the type of flight controller and sensor used on the drone [26]. Here is the Arduino program for APM (ArduPilot Mega) flight controller, GPS sensor, and compass sensor.

Communication Range Testing
The communication testing process between two ESP-32s is carried out by constantly sending values based on given commands. In the experiment, one ESP-32 is placed on a quadcopter and the other one is placed on the ground station. Figure 6. Communication testing between two ESP-32s using a push button The ESP-32 on the ground station reads the value of the push button, which is either 0 or 1 (binary), after a conversion process. The push button is read on digital ports 1, 2, 3, and 4. Then, each push button is assigned a unique number to be sent. In this test, the data sent consists of the letters A, B, C, and D. Below is the source code for the binary conversion. butValue1 = digitalRead(1); butValue2 = digitalRead(2); butValue3 = digitalRead(3); butValue4 = digitalRead(4); butValue5 = digitalRead (5);

Ultrasonic Sensor Testing US-15
In this quadcopter circuit, the US-15 ultrasonic sensor is used to detect and avoid an obstacle located in front, diagonally to the right, and diagonally to the left of the robot with a reading range of 30-100 meters. Figure 7 shows the ultrasonic sensor reading an object at a distance of 10 cm. Jarak = sonar1.ping_cm(); Serial.print("Jarak = "); Serial.print(" cm"); Serial.println(); Figure 7. Reading data from the US-15 ultrasonic sensor

Stepper Motor Testing
Stepper Motor Angle Comparison Testing. The testing was conducted to operate the comparison between the angle on the protractor and the angle in the stepper motor. The testing was done with three angles, namely 0 degrees, 45 degrees, and 90 degrees. Figure 4.13 shows the stepper motor electronics of the ground station system. The testing steps were to make a stepper motor implementable to the ground station system. In this test, the stepper motor will move a 17-tooth gear made of 5mm-thick acrylic material. This gear will move a straight gear that will move the joystick on the quadcopter remote control. The experiment was performed on each motor using the same supporting electronic components. The stepper position testing values in degrees can be seen in Figure 8.  Figure 9 shows the reading data from GY-81. The reading results from the GY-81 sensor obtained sensor data, namely tilt/gyro data, acceleration/accelerometer data, altitude, compass, and pressure.  Figure 10. Reading altitude and compass data The reading of altitude and compass data will be used to provide real-time information on the quadcopter's flying conditions. The data generated by the sensor will be sent to the ground station as a reference for the altitude limit.

3.5.Testing the Ublox Neo-7M Sensor Module
The sensor used is Ublox Neo-7M to input in determining the position of the quadcopter. Figure 11 shows the reading data from Ublox Neo-7M. The result of the reading on the Ublox Neo-7M sensor, obtained the sensor reading data, namely latitude and longitude data.

Conclusion
Based on the accuracy test results of the Neo7N GPS using the U-blox center application, according to the Neo7N GPS datasheet, the maximum error value is 3 meters. All three test results indicate that the accuracy of the Neo7N GPS is below 2.88 meters, so the GPS accuracy in long-range testing is 100%. The compass sensor readings and the application of the PID method affect the robot's movement response to maintain the yaw angle. The flight process using the waypoint method as the quadcopter navigation control can be carried out effectively and comprehensively. The quadcopter takes 5-10 seconds to face the heading or set point using the heading method and more than 20 seconds for those who don't use it, depending on the initial degree difference. The average flight time of the quadcopter from the starting position to the destination 30 meters away is 2 minutes. The data transmitted through wifi communication on 2 ESP-32s can work well up to a distance of 32.4 meters. From the comparison data results, it can be concluded that using the heading method will provide better results than not.Use either SI or CGS as primary units. (SI units are preferred.) English units may be used as secondary units (in parentheses). An exception would be the use of English units as identifiers in trade, such as "3.5 inch disk drive".