Wrote the height calculator.

Haven't tested it yet.