flightpath: check for output length before adding elevations

This should fix #288