def predictPosition(position, speedOrientation, control, maxSpeed=None):
    """Predicts the position (moving.Point) at the next time step with given control input (deltaSpeed, deltaTheta)
    speedOrientation is the other encoding of velocity, (speed, orientation)
    speedOrientation and control are NormAngle"""
    predictedSpeedTheta = speedOrientation + control
    if maxSpeed is not None:
        predictedSpeedTheta.norm = min(predictedSpeedTheta.norm, maxSpeed)
    predictedPosition = position + predictedSpeedTheta.getPoint()
    return predictedPosition, predictedSpeedTheta
