Silly me. I had forgotten to account for the elevation’s negative range values. Works like a charm now!