def __init__(self,p_term=1,i_term=0.3,d_term=0.06,Dv_constant=0.4,ideal_angle=0.9):
     self.pid_adjustment=PID(P=p_term,I=i_term,D=d_term)
     self.sail=0
     self.maxsail=math.pi/12*5
     
     self.Dv_constant=Dv_constant
     self.ideal_angle=ideal_angle
Exemplo n.º 2
0
 def __init__(self):
     self.command_generator = PID(P=0.8, I=0.2, D=0.1)
     self.rudder = 0
     self.maxrudder = math.pi / 4  ##max angle of rudder
     self.command_generator.setBoundary(self.maxrudder, -self.maxrudder)
     self.sign_signal = 1