Phase to height/Displacement/Elevation Conversion

please avoid cross-posting the same issue over various topics: Java heao error