diff options
author | Baitinq <you@example.com> | 2022-02-11 11:46:36 +0000 |
---|---|---|
committer | Baitinq <you@example.com> | 2022-02-11 11:46:36 +0000 |
commit | a3a3bea919c7d8fa1af79abd9879fe0201b599de (patch) | |
tree | 11944dc79089f953491d874256a787c8c1abc415 /src/rocket.py | |
parent | Structured source files into src folder (diff) | |
download | OSLS-a3a3bea919c7d8fa1af79abd9879fe0201b599de.tar.gz OSLS-a3a3bea919c7d8fa1af79abd9879fe0201b599de.tar.bz2 OSLS-a3a3bea919c7d8fa1af79abd9879fe0201b599de.zip |
Added specific x and y drag (x drag coefficient and cross sectional area
Diffstat (limited to 'src/rocket.py')
-rw-r--r-- | src/rocket.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/rocket.py b/src/rocket.py index fb8ea7c..372e421 100644 --- a/src/rocket.py +++ b/src/rocket.py @@ -31,13 +31,21 @@ class Rocket(): fuel_mass += stage.fuel_mass return fuel_mass - def s_cross_sectional_area(self): - return self.top_stage().cross_sectional_area + #maybe we should average this with the rest of the stages? + def rocket_x_drag_coefficient(self): + return self.top_stage().x_drag_coefficient - def s_drag_coefficient(self): - return self.top_stage().drag_coefficient + def rocket_x_cross_sectional_area(self): + total_cross_sectional_area = 0 + for stage in self.stages: + total_cross_sectional_area += stage.x_cross_sectional_area + return total_cross_sectional_area + + def rocket_y_drag_coefficient(self): + return self.top_stage().y_drag_coefficient - #TODO: IMPLEMENT rocket_x_drag_coefficient() that adds the x drag coefficient of all stages, same with cross sectional area + def rocket_y_cross_sectional_area(self): + return self.top_stage().y_cross_sectional_area def __str__(self): return "eue" \ No newline at end of file |