def iterate(self, snapshot):
        accelerator = snapshot['accelerator_pedal_position']
        engine_speed = snapshot['engine_speed']
        engine_running = snapshot['engine_running']
        gear_number = self.gear_numbers[snapshot['transmission_gear_position']]
        gear_number = gear_number - 1  #First gear is the basline.
        if gear_number < 1:
            gear_number = 1

        # Giving sixth gear half the torque of first.
        gear_ratio = (gear_number * .1) - 1
        
        drag = engine_speed * self.engine_to_torque
        power = accelerator * 15 * gear_ratio
        if engine_running:
            self.data = power - drag
        else:
            self.data = -drag
dataset/ETHPy150Open openxc/openxc-vehicle-simulator/data/torque_calc.py/TorqueCalc.iterate/swapped operands of `-`