def __init__(self): self.chi_inf = np.radians( 60) # approach angle for large distance from straight-line path self.k_path = 0.011 # proportional gain for straight-line path following self.k_orbit = 2 # proportional gain for orbit following self.gravity = 9.8 self.autopilot_commands = msgAutopilot() # message sent to autopilot
sensor_view = sensor_viewer() # initialize view of sensor data plots if VIDEO is True: from chap2.video_writer import videoWriter video = videoWriter(video_name="chap7_video.avi", bounding_box=(0, 0, 2000, 1000), output_rate=SIM.ts_video) # initialize elements of the architecture wind = windSimulation(SIM.ts_simulation) mav = mavDynamics(SIM.ts_simulation) ctrl = autopilot(SIM.ts_simulation) # autopilot commands from message_types.msg_autopilot import msgAutopilot commands = msgAutopilot() Va_command = signals(dc_offset=25.0, amplitude=3.0, start_time=2.0, frequency=0.01) h_command = signals(dc_offset=100.0, amplitude=10.0, start_time=0.0, frequency=0.02) chi_command = signals(dc_offset=np.radians(180), amplitude=np.radians(45), start_time=5.0, frequency=0.015) # initialize the simulation time sim_time = SIM.start_time