diff options
Diffstat (limited to 'stage.py')
-rw-r--r-- | stage.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stage.py b/stage.py index e2c32d1..bb05eaf 100644 --- a/stage.py +++ b/stage.py @@ -22,11 +22,13 @@ class Stage(): def total_mass(self): return (self.stage_mass + self.fuel_mass) - def current_thrust(self, g: float) -> (float, float): + def current_thrust(self, g: float, heading: int) -> (float, float): if(self.engines_on and self.fuel_mass > 0): total_thrust = self.engine.thrust(self.throttle, g) * self.engine_number - thrust_x = (math.sin(math.radians(self.gimbal)) * total_thrust) - thrust_y = (math.cos(math.radians(self.gimbal)) * total_thrust) + #gimbal and heading components + thrust_x = (math.sin(math.radians(self.gimbal + heading)) * total_thrust) + thrust_y = (math.cos(math.radians(self.gimbal + heading)) * total_thrust) + return (thrust_x, thrust_y) else: return (0, 0) |