A calculation method for the heave an pitch motions of a hydrofoil boat in waves