Fixed bug with altitude graph added tests for altitude graph reduce

Signed-off-by: Nicholas Jackson <nic@thatlondon.com>