I already get "The integrator encountered a singularity" when an orbit I've made passes through the exact center of a planet.
But there are a lot of times where I think I have found a great trajectory for gravity assists, only to find that my plan goes -300000 m beneath the surface of a planet. It is kind of annoying to have to repeatedly zoom in to make sure that the orbit will stay outside of both the celestial and its atmosphere.
Is there a way to implement an on-screen warning whenever the periapsis goes beneath the surface (as measured by the indicators?)