def __init__(self, pitch_p, pitch_i, pitch_d, elevator_p, elevator_i, elevator_d, dt): self.target_altitude = 1000.0 self.pitch_pid = PID(pitch_p, pitch_d, pitch_d, -15.0, 15.0, dt, 0.0) self.elevator_pid = PID(elevator_p, elevator_i, elevator_d, -1.0, 1.0, dt, 200.0)
def __init__(self, roll_p, roll_i, roll_d, aileron_p, aileron_i, aileron_d, dt): self.target_heading = 180.0 self.course_pid = PID(roll_p, roll_i, roll_d, -15.0, 15.0, dt, 0.0) self.aileron_pid = PID(aileron_p, aileron_i, aileron_d, -1.0, 1.0, dt, 10.0)
def __init__(self, throttle_p, throttle_i, throttle_d, dt): self.target_airspeed = 65.0 self.throttle_pid = PID(throttle_p, throttle_i, throttle_d, 0.0, 1.0, dt, 10.0)