diff options
author | Baitinq <you@example.com> | 2022-02-09 10:17:11 +0000 |
---|---|---|
committer | Baitinq <you@example.com> | 2022-02-09 10:26:05 +0000 |
commit | 97337879d2e60c3b6ee73e283547f6c61cf6067a (patch) | |
tree | 56957b3a2a0a1955fcef83fa9061191cc9462a48 /engine.py | |
parent | Add support for rocket stages (diff) | |
download | OSLS-97337879d2e60c3b6ee73e283547f6c61cf6067a.tar.gz OSLS-97337879d2e60c3b6ee73e283547f6c61cf6067a.tar.bz2 OSLS-97337879d2e60c3b6ee73e283547f6c61cf6067a.zip |
Fixed thrust calculation by taking g into account
Diffstat (limited to 'engine.py')
-rw-r--r-- | engine.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engine.py b/engine.py index bc08a43..f1da646 100644 --- a/engine.py +++ b/engine.py @@ -6,8 +6,9 @@ class Engine(): self.max_flow_rate = max_flow_rate self.isp = isp - def thrust(self, throttle: int): - return self.flow_rate(throttle) * self.isp + def thrust(self, throttle: int, g: float): + #https://www.grc.nasa.gov/www/k-12/airplane/specimp.html + return self.flow_rate(throttle) * self.isp * g def flow_rate(self, throttle: int): return self.max_flow_rate * (throttle / 100) \ No newline at end of file |