I had a problem where given two points: an origin and a direction, I needed to find a 3rd point at a given distance away from the origin point. I needed to use the distance along the earth surface when calculating the destination point. No tunneling through the earth or flying above it.
Cesium already has an easy way to do this with the EllipsoidGeodesic class. In my case I just needed to provide it the origin and direction points. Then I could use the interpolateUsingSurfaceDistance function to find the point at a given distance.
See the Sandcastle demo.