Skip to content

Commit

Permalink
added a docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ZegesMenden committed May 3, 2022
1 parent 0cc969d commit 6090797
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pytvc/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ def __init__(self, Kp: float = 0.0, Ki: float = 0.0, Kd: float = 0.0, setpoint:
self.lever_arm = lever_arm

def update(self, input: float, dt: float = 1.0, force: float = 1.0, input_derivitive: float = 0.0) -> None:
"""updates the PID controller
Args:
input (float): the input to the controller
dt (float, optional): the time between this call and the last call of the PID controller. Defaults to 1.0.
force (float, optional): the force that the controller is changing. Defaults to 1.0.
input_derivitive (float, optional): an override of the built in derivitive. Defaults to 0.0.
"""
if input_derivitive == 0.0:
super().update(input, dt)
else:
Expand Down
2 changes: 2 additions & 0 deletions pytvc/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ def calculate_forces(self, mass: float, velocity: Vec3, air_density: float = 1.2

return force_d

# removed for now because it is not working

net_force_dir: Vec3 = (force_d) + force_g
net_force_dir = net_force_dir.normalize()

Expand Down

0 comments on commit 6090797

Please sign in to comment.