

def step(self):
    ' integrate state using simple rectangle rule '
    thrust = float(self.action[0])
    rudder = float(self.action[1])
    (h, hdot, v) = self.sensors
    rnd = random.normal(0, 1.0, size=3)
    thrust = min(max(thrust, (- 1)), (+ 2))
    rudder = min(max(rudder, (- 90)), (+ 90))
    drag = ((5 * h) + ((rudder ** 2) + rnd[0]))
    force = ((((30.0 * thrust) - (2.0 * v)) - ((0.02 * v) * drag)) + (rnd[1] * 3.0))
    v = (v + ((h.dt * force) / self.mass))
    v = min(max(v, (- 10)), (+ 40))
    torque = ((- v) * (((rudder + h) + (1.0 * hdot)) + (rnd[2] * 10.0)))
    last_hdot = hdot
    hdot += (torque / self.I)
    hdot = min(max(hdot, (- 180)), 180)
    h += ((hdot + last_hdot) / 2.0)
    if (h > 180.0):
        h -= 360.0
    elif (h < (- 180.0)):
        h += 360.0
    self.sensors = (h, hdot, v)

dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/shipsteer/shipsteer.py ShipSteeringEnvironment.step/VarMisuse@172/202 `self`->`h`