shoing this error fo the belwo ocde
deepin@deepin-o2i:/media/deepin/Deepin Pen Drive/main/drone_swarm_3/v2/test$ python test_2.py 
Traceback (most recent call last):
  File "test_2.py", line 67, in <module>
    master_drone = Drone(2, the_connection)
TypeError: Drone() takes no arguments


from pymavlink import mavutil
import math
import time



the_connection = mavutil.mavlink_connection('/dev/ttyUSB0', baud=57600)
class Drone:

    def init(self, system_id, connection):
        self.system_id = system_id
        self.connection = connection

    def set_mode(self, mode):
        self.connection.mav.set_mode_send(
            self.system_id,
            mavutil.mavlink.MAV_MODE_FLAG_CUSTOM_MODE_ENABLED,
            mode
        )

    def arm(self, arm=True):
        self.connection.mav.command_long_send(self.system_id, self.connection.target_component,
                                              mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, int(arm), 0, 0, 0, 0, 0,
                                              0)

    def takeoff(self, altitude):
        self.connection.mav.command_long_send(self.system_id, self.connection.target_component,
                                              mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 0, 0, 0, 0, 0, 0, altitude)

    def send_waypoint(self, wp, next_wp, speed):
        # Print wp and next_wp
        print("Current waypoint: {} | Next waypoint: {}".format(wp, next_wp))
        vx, vy, vz = calculate_velocity_components(wp, next_wp, speed)
        # Print velocity components
        print("Velocity components: vx={}, vy={}, vz={}".format(vx, vy, vz))
        self.connection.mav.send(mavutil.mavlink.MAVLink_set_position_target_global_int_message(
            10,
            self.system_id,
            self.connection.target_component,
            mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT,
            int(0b110111111000),
            int(wp[0] * 10 ** 7),
            int(wp[1] * 10 ** 7),
            wp[2],
            vx, 
            vy, 
            vz, 
            0, 
            0, 
            0, 
            0,
            0  # Set vx, vy, and vz from calculated components
        ))

    def get_position(self):
        self.connection.mav.request_data_stream_send(
            self.system_id, self.connection.target_component,
            mavutil.mavlink.MAV_DATA_STREAM_POSITION, 1, 1)

        while True:
            msg = self.connection.recv_match(type='GLOBAL_POSITION_INT', blocking=True)
            if msg.get_srcSystem() == self.system_id:
                return (msg.lat / 10 ** 7, msg.lon / 10 ** 7, msg.alt / 10 ** 3)


master_drone = Drone(2, the_connection)

follower_drone = Drone(3, the_connection)



def calculate_follower_coordinates(wp, distance, angle):
    earth_radius = 6371000.0  # in meters
    latitude_change = (180 * distance * math.cos(math.radians(angle))) / (math.pi * earth_radius)
    longitude_change = (180 * distance * math.sin(math.radians(angle))) / (
            math.pi * earth_radius * math.cos(math.radians(wp[0])))
    new_latitude = wp[0] + latitude_change
    new_longitude = wp[1] + longitude_change
    print("Calculated follower coordinates: lat={}, lon={}, alt={}".format(new_latitude, new_longitude, wp[2]))
    return (new_latitude, new_longitude, wp[2])

def calculate_velocity_components(current_wp, next_wp, speed):
    dx = next_wp[0] - current_wp[0]
    dy = next_wp[1] - current_wp[1]
    dz = next_wp[2] - current_wp[2]
    dx2 = dx ** 2
    dy2 = dy ** 2
    dz2 = dz ** 2
    distance = math.sqrt(dx2 + dy2 + dz2)
    vx = (dx / distance) * speed
    vy = (dy / distance) * speed
    vz = (dz / distance) * speed
    return vx, vy, vz

def abort():
    print("Type 'abort' to return to Launch and disarm motors.")
    start_time = time.monotonic()
    while time.monotonic() - start_time < 7:
        user_input = input("Time left: {} seconds \n".format(int(7 - (time.monotonic() - start_time))))
        if user_input.lower() == "abort":
            print("Returning to Launch and disarming motors…")
            for drone in [master_drone, follower_drone]:
                drone.set_mode(6)  # RTL mode
                drone.arm(False)  # Disarm motors
            return True
    print("7 seconds have passed. Proceeding with waypoint task…")
    return False

waypoints = [
    (28.5861474, 77.3421320, 10)
]

distance = 5  # Distance in meters
angle = 60  # Angle in degrees


# Set mode to Guided and arm both drones
for drone in [master_drone, follower_drone]:
    drone.set_mode(4)
    drone.arm()
    drone.takeoff(10)
mode = the_connection.mode_mapping()[the_connection.flightmode]
print(f"the drone is currectly at mode {mode}")

time_start = time.time()
while mode == 4:
    if abort():
        exit()

    if time.time() - time_start >= 1:
        for index, master_wp in enumerate(waypoints[:-1]):
            next_wp = waypoints[index + 1]  
            master_drone.send_waypoint(master_wp, next_wp, speed=2)
            follower_position = master_drone.get_position()
            
            # Print follower position
            print("Follower position: {}".format(follower_position))
            
            if follower_position is None:
                for drone in [master_drone, follower_drone]:
                    drone.set_mode(6)
                    drone.arm(False)      
                break
            
            follower_wp = calculate_follower_coordinates(follower_position, distance, angle)

            follower_drone.send_waypoint(follower_wp, next_wp, speed=2)
            if abort():
                exit()
        break

    # set the mode to rtl and disarms the drone
    for drone in [master_drone, follower_drone]:
        drone.set_mode(6)
        drone.arm(False)

the_connection.close()