def step(self):
        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 + self.dt * force / self.mass
        v = min(max(v, -10), +40)
        torque = -v * (rudder + h + 1.0 * hdot + rnd[2] * 10.)
        last_hdot = hdot
        hdot += torque / self.I
        hdot = min(max(hdot, -180), 180)
        h += (hdot + last_hdot) / 2.0
        if h > 180.:
            h -= 360.
        elif h < -180.:
            h += 360.
        self.sensors = (h, hdot, v)
integrate state using simple rectangle rule
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/shipsteer/shipsteer.py/ShipSteeringEnvironment.step