x, y, triangle_rad= self.projected_x_y(idx) com.move( x, y, self.height, BODY_OFFSET_ENU=False) time.sleep(4) # commander.turn() requires angle in Degree com.turn(triangle_rad * 180.0 /math.pi) time.sleep(2.5) print("Target Reached!") if __name__ == '__main__': com = Commander() # 1st circle #circle = fly_circle(com, height=3, building_radius=17, n=20) #circle.visualize_path() #circle.fly() # 2nd circle circle = fly_circle(com, height=5, building_radius=17, n=20) circle.fly() # land! com.land()
print "moving 3 meter to the right" con.move(0, -3, 0) time.sleep(8) print "turn 90 degrees anticlockwise" con.turn(180) time.sleep(10) print "moving 3 meter to the right" con.move(0, -3, 0) time.sleep(8) print "turn 90 degrees anticlockwise" con.turn(270) time.sleep(10) print "moving 3 meter to the right" con.move(0, -3, 0) time.sleep(8) print "turn 90 degrees anticlockwise" con.turn(360) time.sleep(10) time.sleep(3) # land! print "Land!" con.land()