te the total distance in meters and plot:</p><pre class="codeinput">d = pathdistps(lat,lon);

subplot(1,2,2)
plot(d,lon)
xlabel <span class="string">'distance relative to the grounding line (m)'</span>
ylabel <span class="string">'longitude (deg)'</span>
</pre><img vspace="5" hspace="5" src="pathdistps_documentation_02.png" alt=""> <p>Alternatively, calculate total distance in kilometers, referenced to (66.8575 S, 143.5678 E), which is a point near the ICESat track's intersection with the grounding line:</p