< 0:delay_time = 0.1elif delay_time > 60:delay_time = 60print(delay_time)time.sleep(0.1)if __name__ == '__main__':is_fly_land_reset()prearm_check()vehicle.mode = "GUIDED"vehicle.wait_for_mode("GUIDED")while vehicle.armed == False:vehicle.arm(True)print("vehicle armed...")# vehicle.simple_takeoff(alt=12)vehicle.wait_simple_takeoff(alt= 12,epsilon=2)while vehicle.location.local_frame.down > -8:print(vehicle.location.local_frame.down)time.sleep(0.5)print("Begin to navigation...")while True:lat = 39.1036 + random.random() * 32 * 1e-4lon = 117.16 + random.random() * 66 * 1e-4alt = 30location_send = dronekit.LocationGlobalRelative(lat, lon, alt)# vehicle.simple_goto(location=location_send)# goto(-100, -130, goto_position_target_global_int)goto_position_target_global_int(location_send)# goto_position_target_local_ned(vehicle,5,2,-20)# master.mav.set_position_target_global_int_send(#0,#master.target_system,#master.target_component,#6,#lat*1e7,#lon*1e7,#alt,#0,0,0,#0,0,0,#0,0,0, force_mavlink1=True)print("target lat=%f,\t lon=%f,\t current lat=%f,\t lon=%f"%(lat, lon, vehicle.location.global_frame.lat, vehicle.location.global_frame.lon))random_time = random.random()*9.9+0.1time.sleep(random_time)
- 西山汇
- *生解析帝王驾崩之谜:蔡桓公究竟得了什么*
- 宋徽宗的靖康之变究竟给岳飞带来了怎样的耻辱
- 龙虎山悬棺之谜
- 本能寺之变真相揭露,明智光秀亲笔信记录其谋反的动机
- 《北史》的独特之处:二史和八书有着相当的删减
- 史上王敦之乱是怎么回事关于王敦的小故事
- 秦国一代名将蒙恬如何甘愿*于赵高之手?
- 吕不韦*亡之谜历史上的吕不韦是怎么*的?
- 千古之谜:秦朝的百万雄师在三年内消失