Skip to content

Commit

Permalink
gravity! (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaxwell24 authored Feb 17, 2024
1 parent d5010f8 commit 5d5c1c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion subsystems/shootersubsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def update(self, currentTime) -> None:
elapsedTime = currentTime - self.initialTime
self.xc = self.xi + self.vx * elapsedTime
self.yc = self.yi + self.vy * elapsedTime
self.zc = self.zi + self.vz * elapsedTime - 9.8 / 2 * elapsedTime**2
self.zc = (
self.zi
+ self.vz * elapsedTime
- constants.kGravity / 2 * elapsedTime**2
)


class ShooterSubsystem(Subsystem):
Expand Down

0 comments on commit 5d5c1c2

Please sign in to comment.