https://github.com/Rosuav/KerbalSpaceModding
This is barely more than a "Hello World" or "My First Mod", but hey, maybe there's something in here that could be of use. If you're attempting surface navigation to a waypoint, the navball can tell you how to point your craft, but it won't tell you how far you still have to go. This mod looks at your lat/long and the lat/long of the navigation mark, calculates the angle between them, and the great circle distance (approximately equal to the shortest distance across the surface, ignoring your altitude).
Question: How can this best be brought in-game? Currently, its output is made to a log file, so the way to read it is to tail|grep that log (as mentioned in the README, which assumes Linux).
Question: Would it be (a) possible, and (b) useful, to show mission-elapsed-time at arrival time? Currently it says "1900 seconds" but it's not really counting down, since your velocity will change slightly.
Code is all MIT licensed.