Example #1
0
def run():
    custom_path_width = 2  # leave the value 0 and it's calculated using the drone FOV specified

    # Routing(  2D-array of global coordinates specifying the corners of the map,
    #           plot padding,
    #           user defined path width in meters - used for testing
    #               - leave the value 0 and it's calculated using the drone FOV specified)
    sohn = Routing(odin_arr, 0.00002, custom_path_width)
    sohn.get_local_coordinates()
    sohn.analyze_coordinates()

    # get_to_route( path limit points,
    #               origo global coordinates,
    #               relay box coordinates,
    #               path functions  )
    get_to_route(sohn.get_path_limit_points(), sohn.get_origo(),
                 odin_relay_box, sohn.get_path_functions())

    # search_route( path width (meters) - if default pass obj.get_path_width as parameter,
    #               path limit points,
    #               origo global points,
    #               path functions,
    #               drone speed (m/s) - default value 1 if 0 is passed as a parameter )
    search_route(custom_path_width, sohn.get_path_limit_points(),
                 sohn.get_origo(), sohn.get_path_functions(), 0)

    # print(cmd_string)

    cmd_string = go_home(sohn.get_path_limit_points(), odin_relay_box,
                         sohn.get_origo())

    parser(cmd_string)